aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Row.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-12 17:17:36 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-12 17:17:36 +0000
commit2ee68a074efc1163358fb3b51fb4b23e83a05f97 (patch)
tree48df581770a55f8eb9f632aee54c777816478b64 /Eigen/src/Core/Row.h
parent01572b9f54e769a7d1bb3d5073c264a5fbc7ce42 (diff)
generalized ei_traits<>.
Finally the importing macro is named EIGEN_BASIC_PUBLIC_INTERFACE because it does not only import the ei_traits, it also makes the base class a friend, etc.
Diffstat (limited to 'Eigen/src/Core/Row.h')
-rw-r--r--Eigen/src/Core/Row.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/Eigen/src/Core/Row.h b/Eigen/src/Core/Row.h
index 3a50297d3..57a56852c 100644
--- a/Eigen/src/Core/Row.h
+++ b/Eigen/src/Core/Row.h
@@ -46,18 +46,25 @@
* \sa MatrixBase::row()
*/
template<typename MatrixType>
-struct Scalar<Row<MatrixType> >
-{ typedef typename Scalar<MatrixType>::Type Type; };
+struct ei_traits<Row<MatrixType> >
+{
+ typedef typename MatrixType::Scalar Scalar;
+ enum {
+ RowsAtCompileTime = 1,
+ ColsAtCompileTime = MatrixType::ColsAtCompileTime,
+ MaxRowsAtCompileTime = 1,
+ MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
+ };
+};
template<typename MatrixType> class Row
: public MatrixBase<Row<MatrixType> >
{
public:
- typedef typename Scalar<MatrixType>::Type Scalar;
+
+ EIGEN_BASIC_PUBLIC_INTERFACE(Row)
+
typedef typename MatrixType::AsArg MatRef;
- friend class MatrixBase<Row>;
- friend class MatrixBase<Row>::Traits;
- typedef MatrixBase<Row> Base;
Row(const MatRef& matrix, int row)
: m_matrix(matrix), m_row(row)
@@ -68,12 +75,6 @@ template<typename MatrixType> class Row
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Row)
private:
- enum {
- RowsAtCompileTime = 1,
- ColsAtCompileTime = MatrixType::Traits::ColsAtCompileTime,
- MaxRowsAtCompileTime = 1,
- MaxColsAtCompileTime = MatrixType::Traits::MaxColsAtCompileTime
- };
const Row& _asArg() const { return *this; }