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 * @brief Rank 1 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -21,7 +21,10 @@
namespace tensors { namespace tensors {
/** A rank 1 tensor. Actually stores data. */ /**
* A rank 1 tensor. Actually stores data.
* @ingroup tensors
*/
template<int N> template<int N>
class Tensor1 { class Tensor1 {
double T[N]; ///< Storage 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 * @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -29,6 +29,7 @@ namespace tensors {
* Templated class to provide a rank 1 tensor interface to a class. * 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. * This class does not store any data but the result of an expression.
* It is associated with an index. * It is associated with an index.
* @ingroup tensors
*/ */
template<class A, class I> class Tensor1Expression { 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 * @brief Rank 2 Tensor based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -21,7 +21,10 @@
namespace tensors { namespace tensors {
/** Rank 2 Tensor */ /**
* Rank 2 Tensor
* @ingroup tensors
*/
template<int N1, int N2> template<int N1, int N2>
class Tensor2 { class Tensor2 {
protected: 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 * @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -24,7 +24,10 @@
namespace tensors { 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 { template<class A, class I, class J> class Tensor2Expression {
private: 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 * @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 * @author: Frank Dellaert
*/ */
@ -21,7 +21,10 @@
namespace tensors { namespace tensors {
/** Rank 3 Tensor */ /**
* Rank 3 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3> template<int N1, int N2, int N3>
class Tensor3 { class Tensor3 {
Tensor2<N1, N2> T[N3]; ///< Storage 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 * @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -23,7 +23,10 @@
namespace tensors { 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 { template<class A, class I, class J, class K> class Tensor3Expression {
A iter; 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 * @brief Rank 4 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 12, 2010 * @date Feb 12, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -21,7 +21,10 @@
namespace tensors { namespace tensors {
/** Rank 3 Tensor */ /**
* Rank 4 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3, int N4> template<int N1, int N2, int N3, int N4>
class Tensor4 { 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 * @brief Rank 5 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 12, 2010 * @date Feb 12, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -21,7 +21,10 @@
namespace tensors { namespace tensors {
/** Rank 3 Tensor */ /**
* Rank 5 Tensor
* @ingroup tensors
*/
template<int N1, int N2, int N3, int N4, int N5> template<int N1, int N2, int N3, int N4, int N5>
class Tensor5 { 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 * @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #pragma once
@ -23,7 +23,10 @@
namespace tensors { 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 { template<class A, class I, class J, class K, class L, class M> class Tensor5Expression {
A iter; A iter;

View File

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

View File

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

View File

@ -9,11 +9,11 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
/* /**
* tensorInterface.h * @file tensorInterface.h
* @brief Interfacing tensors template library and gtsam * @brief Interfacing tensors template library and gtsam
* Created on: Feb 12, 2010 * @date Feb 12, 2010
* @author: Frank Dellaert * @author Frank Dellaert
*/ */
#pragma once #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 * @brief Tensor expression templates based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf
* Created on: Feb 10, 2010 * @date Feb 10, 2010
* @author: Frank Dellaert * @author Frank Dellaert
* @defgroup tensors
*/ */
#pragma once #pragma once