when copying a ReturnByValue into a MatrixBase, first eval it to a PlainMatrixType.

This allows to limit the number of instantiations of the big template method evalTo.
Also allows to get rid of the dummy MatrixBase::resize().
See "TODO" comment.
This commit is contained in:
Benoit Jacob
2009-09-26 22:48:16 -04:00
parent e82ab8a5dd
commit 924b55e9a9
2 changed files with 16 additions and 15 deletions

View File

@@ -190,19 +190,6 @@ template<typename Derived> class MatrixBase
* i.e., the number of rows for a columns major matrix, and the number of cols otherwise */
int innerSize() const { return (int(Flags)&RowMajorBit) ? this->cols() : this->rows(); }
/** Only plain matrices, not expressions may be resized; therefore the only useful resize method is
* Matrix::resize(). The present method only asserts that the new size equals the old size, and does
* nothing else.
*/
void resize(int size)
{ ei_assert(size == this->size() && "MatrixBase::resize() does not actually allow to resize."); }
/** Only plain matrices, not expressions may be resized; therefore the only useful resize method is
* Matrix::resize(). The present method only asserts that the new size equals the old size, and does
* nothing else.
*/
void resize(int rows, int cols)
{ ei_assert(rows == this->rows() && cols == this->cols() && "MatrixBase::resize() does not actually allow to resize."); }
#ifndef EIGEN_PARSED_BY_DOXYGEN
/** \internal the plain matrix type corresponding to this expression. Note that is not necessarily
* exactly the return type of eval(): in the case of plain matrices, the return type of eval() is a const