Documentation and creation of Doxygen module "tensors"

release/4.3a0
Frank Dellaert 2011-09-07 05:02:17 +00:00
parent 5cc106a24b
commit 56879579f5
13 changed files with 124 additions and 68 deletions

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor1.h
/**
* @file Tensor1.h
* @brief Rank 1 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -21,7 +21,10 @@
namespace tensors {
/** A rank 1 tensor. Actually stores data. */
/**
* A rank 1 tensor. Actually stores data.
* @ingroup tensors
*/
template<int N>
class Tensor1 {
double T[N]; ///< Storage

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor1Expression.h
/**
* @file Tensor1Expression.h
* @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -29,6 +29,7 @@ namespace tensors {
* Templated class to provide a rank 1 tensor interface to a class.
* This class does not store any data but the result of an expression.
* It is associated with an index.
* @ingroup tensors
*/
template<class A, class I> class Tensor1Expression {

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor2.h
/**
* @file Tensor2.h
* @brief Rank 2 Tensor based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -21,7 +21,10 @@
namespace tensors {
/** Rank 2 Tensor */
/**
* Rank 2 Tensor
* @ingroup tensors
*/
template<int N1, int N2>
class Tensor2 {
protected:

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor2Expression.h
/**
* @file Tensor2Expression.h
* @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -24,7 +24,10 @@
namespace tensors {
/** Templated class to hold a rank 2 tensor expression. */
/**
* Templated class to hold a rank 2 tensor expression.
* @ingroup tensors
*/
template<class A, class I, class J> class Tensor2Expression {
private:

View File

@ -9,10 +9,10 @@
* -------------------------------------------------------------------------- */
/*
* Tensor3.h
/**
* @file Tensor3.h
* @brief Rank 3 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @date Feb 10, 2010
* @author: Frank Dellaert
*/
@ -21,7 +21,10 @@
namespace tensors {
/** Rank 3 Tensor */
/**
* Rank 3 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3>
class Tensor3 {
Tensor2<N1, N2> T[N3]; ///< Storage

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor3Expression.h
/**
* @file Tensor3Expression.h
* @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -23,7 +23,10 @@
namespace tensors {
/** templated class to interface to an object A as a rank 3 tensor */
/**
* templated class to interface to an object A as a rank 3 tensor
* @ingroup tensors
*/
template<class A, class I, class J, class K> class Tensor3Expression {
A iter;

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor4.h
/**
* @file Tensor4.h
* @brief Rank 4 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 12, 2010
* @author: Frank Dellaert
* @date Feb 12, 2010
* @author Frank Dellaert
*/
#pragma once
@ -21,7 +21,10 @@
namespace tensors {
/** Rank 3 Tensor */
/**
* Rank 4 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3, int N4>
class Tensor4 {

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor5.h
/**
* @file Tensor5.h
* @brief Rank 5 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 12, 2010
* @author: Frank Dellaert
* @date Feb 12, 2010
* @author Frank Dellaert
*/
#pragma once
@ -21,7 +21,10 @@
namespace tensors {
/** Rank 3 Tensor */
/**
* Rank 5 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3, int N4, int N5>
class Tensor5 {

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* Tensor5Expression.h
/**
* @file Tensor5Expression.h
* @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
*/
#pragma once
@ -23,7 +23,10 @@
namespace tensors {
/** templated class to interface to an object A as a rank 3 tensor */
/**
* templated class to interface to an object A as a rank 5 tensor
* @ingroup tensors
*/
template<class A, class I, class J, class K, class L, class M> class Tensor5Expression {
A iter;

View File

@ -9,10 +9,10 @@
* -------------------------------------------------------------------------- */
/*
* projectiveGeometry.cpp
/**
* @file projectiveGeometry.cpp
* @brief Projective geometry, implemented using tensor library
* Created on: Feb 12, 2010
* @date Feb 12, 2010
* @author: Frank Dellaert
*/

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* projectiveGeometry.h
/**
* @file projectiveGeometry.h
* @brief Projective geometry, implemented using tensor library
* Created on: Feb 12, 2010
* @author: Frank Dellaert
* @date Feb 12, 2010
* @author Frank Dellaert
*/
#pragma once
@ -23,15 +23,24 @@
namespace gtsam {
/** 2D Point */
/**
* 2D Point
* @ingroup tensors
*/
typedef tensors::Tensor1<3> Point2h;
Point2h point2h(double x, double y, double w);
/** 2D Line */
/**
* 2D Line
* @ingroup tensors
*/
typedef tensors::Tensor1<3> Line2h;
Line2h line2h(double a, double b, double c);
/** 2D Point corrrespondence */
/**
* 2D Point corrrespondence
* @ingroup tensors
*/
struct Correspondence {
Point2h first, second;
Correspondence(const Point2h &p1, const Point2h &p2) :
@ -47,13 +56,22 @@ namespace gtsam {
}
};
/** 2D-2D Homography */
/**
* 2D-2D Homography
* @ingroup tensors
*/
typedef tensors::Tensor2<3, 3> Homography2;
/** Fundamental Matrix */
/**
* Fundamental Matrix
* @ingroup tensors
*/
typedef tensors::Tensor2<3, 3> FundamentalMatrix;
/** Triplet of points */
/**
* Triplet of points
* @ingroup tensors
*/
struct Triplet {
Point2h first, second, third;
Triplet(const Point2h &p1, const Point2h &p2, const Point2h &p3) :
@ -67,18 +85,30 @@ namespace gtsam {
}
};
/** Trifocal Tensor */
/**
* Trifocal Tensor
* @ingroup tensors
*/
typedef tensors::Tensor3<3, 3, 3> TrifocalTensor;
/** 3D Point */
/**
* 3D Point
* @ingroup tensors
*/
typedef tensors::Tensor1<4> Point3h;
Point3h point3h(double X, double Y, double Z, double W);
/** 3D Plane */
/**
* 3D Plane
* @ingroup tensors
*/
typedef tensors::Tensor1<4> Plane3h;
Plane3h plane3h(double a, double b, double c, double d);
/** 3D to 2D projective camera */
/**
* 3D to 2D projective camera
* @ingroup tensors
*/
typedef tensors::Tensor2<3, 4> ProjectiveCamera;
} // namespace gtsam

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */
/*
* tensorInterface.h
/**
* @file tensorInterface.h
* @brief Interfacing tensors template library and gtsam
* Created on: Feb 12, 2010
* @author: Frank Dellaert
* @date Feb 12, 2010
* @author Frank Dellaert
*/
#pragma once

View File

@ -9,11 +9,12 @@
* -------------------------------------------------------------------------- */
/*
* tensors.h
/**
* @file tensors.h
* @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010
* @author: Frank Dellaert
* @date Feb 10, 2010
* @author Frank Dellaert
* @defgroup tensors
*/
#pragma once