OLD | NEW |
1 // This file is part of Eigen, a lightweight C++ template library | 1 // This file is part of Eigen, a lightweight C++ template library |
2 // for linear algebra. Eigen itself is part of the KDE project. | 2 // for linear algebra. Eigen itself is part of the KDE project. |
3 // | 3 // |
4 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> | 4 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> |
5 // Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr> | 5 // Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr> |
6 // | 6 // |
7 // Eigen is free software; you can redistribute it and/or | 7 // Eigen is free software; you can redistribute it and/or |
8 // modify it under the terms of the GNU Lesser General Public | 8 // modify it under the terms of the GNU Lesser General Public |
9 // License as published by the Free Software Foundation; either | 9 // License as published by the Free Software Foundation; either |
10 // version 3 of the License, or (at your option) any later version. | 10 // version 3 of the License, or (at your option) any later version. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 /** type of the equivalent square matrix */ | 161 /** type of the equivalent square matrix */ |
162 typedef Matrix<Scalar,EIGEN_ENUM_MAX(RowsAtCompileTime,ColsAtCompileTime), | 162 typedef Matrix<Scalar,EIGEN_ENUM_MAX(RowsAtCompileTime,ColsAtCompileTime), |
163 EIGEN_ENUM_MAX(RowsAtCompileTime,ColsAtCompileTime)> S
quareMatrixType; | 163 EIGEN_ENUM_MAX(RowsAtCompileTime,ColsAtCompileTime)> S
quareMatrixType; |
164 #endif // not EIGEN_PARSED_BY_DOXYGEN | 164 #endif // not EIGEN_PARSED_BY_DOXYGEN |
165 | 165 |
166 /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ | 166 /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ |
167 inline int rows() const { return derived().rows(); } | 167 inline int rows() const { return derived().rows(); } |
168 /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ | 168 /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ |
169 inline int cols() const { return derived().cols(); } | 169 inline int cols() const { return derived().cols(); } |
170 /** \returns the number of coefficients, which is \a rows()*cols(). | 170 /** \returns the number of coefficients, which is rows()*cols(). |
171 * \sa rows(), cols(), SizeAtCompileTime. */ | 171 * \sa rows(), cols(), SizeAtCompileTime. */ |
172 inline int size() const { return rows() * cols(); } | 172 inline int size() const { return rows() * cols(); } |
| 173 /** \returns the size of the main diagonal, which is min(rows(),cols()). |
| 174 * \sa rows(), cols(), SizeAtCompileTime. */ |
| 175 inline int diagonalSize() const { return std::min(rows(),cols()); } |
173 /** \returns the number of nonzero coefficients which is in practice the num
ber | 176 /** \returns the number of nonzero coefficients which is in practice the num
ber |
174 * of stored coefficients. */ | 177 * of stored coefficients. */ |
175 inline int nonZeros() const { return derived().nonZeros(); } | 178 inline int nonZeros() const { return derived().nonZeros(); } |
176 /** \returns true if either the number of rows or the number of columns is e
qual to 1. | 179 /** \returns true if either the number of rows or the number of columns is e
qual to 1. |
177 * In other words, this function returns | 180 * In other words, this function returns |
178 * \code rows()==1 || cols()==1 \endcode | 181 * \code rows()==1 || cols()==1 \endcode |
179 * \sa rows(), cols(), IsVectorAtCompileTime. */ | 182 * \sa rows(), cols(), IsVectorAtCompileTime. */ |
180 inline bool isVector() const { return rows()==1 || cols()==1; } | 183 inline bool isVector() const { return rows()==1 || cols()==1; } |
181 /** \returns the size of the storage major dimension, | 184 /** \returns the size of the storage major dimension, |
182 * i.e., the number of columns for a columns major matrix, and the number o
f rows otherwise */ | 185 * i.e., the number of columns for a columns major matrix, and the number o
f rows otherwise */ |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 415 |
413 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType sta
rt(void); | 416 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType sta
rt(void); |
414 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe start() const; | 417 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe start() const; |
415 | 418 |
416 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType end
(); | 419 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType end
(); |
417 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe end() const; | 420 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe end() const; |
418 | 421 |
419 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType seg
ment(int start); | 422 template<int Size> typename BlockReturnType<Derived,Size>::SubVectorType seg
ment(int start); |
420 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe segment(int start) const; | 423 template<int Size> const typename BlockReturnType<Derived,Size>::SubVectorTy
pe segment(int start) const; |
421 | 424 |
422 DiagonalCoeffs<Derived> diagonal(); | 425 Band<Derived,0> diagonal(); |
423 const DiagonalCoeffs<Derived> diagonal() const; | 426 const Band<Derived,0> diagonal() const; |
424 | 427 |
425 template<int Id> DiagonalCoeffs<Derived,Id> diagonal(); | 428 template<int Index> Band<Derived,Index> band(); |
426 template<int Id> const DiagonalCoeffs<Derived,Id> diagonal() const; | 429 template<int Index> const Band<Derived,Index> band() const; |
427 | 430 ···· |
| 431 Band<Derived, Dynamic> band(int index); |
| 432 const Band<Derived, Dynamic> band(int index) const; |
| 433 ···· |
428 template<unsigned int Mode> Part<Derived, Mode> part(); | 434 template<unsigned int Mode> Part<Derived, Mode> part(); |
429 template<unsigned int Mode> const Part<Derived, Mode> part() const; | 435 template<unsigned int Mode> const Part<Derived, Mode> part() const; |
430 | 436 |
431 | 437 |
432 static const ConstantReturnType | 438 static const ConstantReturnType |
433 Constant(int rows, int cols, const Scalar& value); | 439 Constant(int rows, int cols, const Scalar& value); |
434 static const ConstantReturnType | 440 static const ConstantReturnType |
435 Constant(int size, const Scalar& value); | 441 Constant(int size, const Scalar& value); |
436 static const ConstantReturnType | 442 static const ConstantReturnType |
437 Constant(const Scalar& value); | 443 Constant(const Scalar& value); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 | 676 |
671 template<typename OtherDerived,typename OtherEvalType> | 677 template<typename OtherDerived,typename OtherEvalType> |
672 Derived& operator=(const ReturnByValue<OtherDerived,OtherEvalType>& func); | 678 Derived& operator=(const ReturnByValue<OtherDerived,OtherEvalType>& func); |
673 | 679 |
674 #ifdef EIGEN_MATRIXBASE_PLUGIN | 680 #ifdef EIGEN_MATRIXBASE_PLUGIN |
675 #include EIGEN_MATRIXBASE_PLUGIN | 681 #include EIGEN_MATRIXBASE_PLUGIN |
676 #endif | 682 #endif |
677 }; | 683 }; |
678 | 684 |
679 #endif // EIGEN_MATRIXBASE_H | 685 #endif // EIGEN_MATRIXBASE_H |
OLD | NEW |