aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-06-03 15:50:09 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-06-03 15:50:09 +0000
commit915587d03dd03ba4229fa42a0d230e94a21347d3 (patch)
tree1046672fbc601fee52488fbffcd601733b4812fe /Eigen/src/Core
parent196f38f5db5b4621f4e74919fcef9209febe4a5c (diff)
* add CommaInitializer::finished to allow the use of (Matrix3() << v0, v1, v2).finished()
as an argument of a function. Other possibilities for the name could be "end" or "matrix" ?? * various update in Quaternion, in particular I added a lot of FIXME about the API options, these have to be discussed and fixed.
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/CommaInitializer.h9
-rw-r--r--Eigen/src/Core/MatrixBase.h10
2 files changed, 14 insertions, 5 deletions
diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h
index 0a555e1b7..61a004780 100644
--- a/Eigen/src/Core/CommaInitializer.h
+++ b/Eigen/src/Core/CommaInitializer.h
@@ -93,6 +93,15 @@ struct MatrixBase<Derived>::CommaInitializer
&& "Too few coefficients passed to Matrix::operator<<");
}
+ /** \returns the built matrix once all its coefficients have been set.
+ * Calling finished is 100% optional. Its purpose is to write expressions
+ * like this:
+ * \code
+ * quaternion.fromRotationMatrix((Matrix3f() << axis0, axis1, axis2).finished());
+ * \endcode
+ */
+ inline Derived& finished() { return m_matrix; }
+
Derived& m_matrix;
int m_row; // current row id
int m_col; // current col id
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index 1ae2c4562..ea693b7a9 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.h
@@ -71,14 +71,14 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
* by the \a Derived type. If a value is not known at compile-time,
* it is set to the \a Dynamic constant.
* \sa MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime */
-
+
SizeAtCompileTime = (ei_size_at_compile_time<ei_traits<Derived>::RowsAtCompileTime,
ei_traits<Derived>::ColsAtCompileTime>::ret),
/**< This is equal to the number of coefficients, i.e. the number of
* rows times the number of columns, or to \a Dynamic if this is not
* known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
-
+
MaxRowsAtCompileTime = ei_traits<Derived>::MaxRowsAtCompileTime,
/**< This value is equal to the maximum possible number of rows that this expression
* might have. If this expression might have an arbitrarily high number of rows,
@@ -89,7 +89,7 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
*
* \sa RowsAtCompileTime, MaxColsAtCompileTime, MaxSizeAtCompileTime
*/
-
+
MaxColsAtCompileTime = ei_traits<Derived>::MaxColsAtCompileTime,
/**< This value is equal to the maximum possible number of columns that this expression
* might have. If this expression might have an arbitrarily high number of columns,
@@ -100,7 +100,7 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
*
* \sa ColsAtCompileTime, MaxRowsAtCompileTime, MaxSizeAtCompileTime
*/
-
+
MaxSizeAtCompileTime = (ei_size_at_compile_time<ei_traits<Derived>::MaxRowsAtCompileTime,
ei_traits<Derived>::MaxColsAtCompileTime>::ret),
/**< This value is equal to the maximum possible number of coefficients that this expression
@@ -119,7 +119,7 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
* columns is known at compile-time to be equal to 1. Indeed, in that case,
* we are dealing with a column-vector (if there is only one column) or with
* a row-vector (if there is only one row). */
-
+
Flags = ei_traits<Derived>::Flags,
/**< This stores expression \ref flags flags which may or may not be inherited by new expressions
* constructed from this one. See the \ref flags "list of flags".