diff options
-rw-r--r-- | Eigen/src/Array/VectorwiseOp.h | 3 | ||||
-rw-r--r-- | Eigen/src/Cholesky/LDLT.h | 4 | ||||
-rw-r--r-- | Eigen/src/Cholesky/LLT.h | 1 | ||||
-rw-r--r-- | Eigen/src/Core/Map.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/ProductBase.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/util/ForwardDeclarations.h | 5 | ||||
-rw-r--r-- | Eigen/src/Core/util/XprHelper.h | 38 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/ComplexEigenSolver.h | 2 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/EigenSolver.h | 4 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/HessenbergDecomposition.h | 4 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h | 2 | ||||
-rw-r--r-- | Eigen/src/Eigenvalues/Tridiagonalization.h | 8 | ||||
-rw-r--r-- | Eigen/src/Householder/Householder.h | 4 | ||||
-rw-r--r-- | Eigen/src/LU/FullPivLU.h | 4 | ||||
-rw-r--r-- | Eigen/src/LU/PartialPivLU.h | 2 | ||||
-rw-r--r-- | Eigen/src/QR/ColPivHouseholderQR.h | 12 | ||||
-rw-r--r-- | Eigen/src/QR/FullPivHouseholderQR.h | 14 | ||||
-rw-r--r-- | Eigen/src/QR/HouseholderQR.h | 8 | ||||
-rw-r--r-- | Eigen/src/SVD/JacobiSVD.h | 7 | ||||
-rw-r--r-- | Eigen/src/SVD/SVD.h | 6 |
20 files changed, 80 insertions, 58 deletions
diff --git a/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index 50cfa7a5e..44fb138f7 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -60,7 +60,8 @@ struct ei_traits<PartialReduxExpr<MatrixType, MemberOp, Direction> > ColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::MaxColsAtCompileTime, - Flags = (unsigned int)_MatrixTypeNested::Flags & HereditaryBits, + Flags0 = (unsigned int)_MatrixTypeNested::Flags & HereditaryBits, + Flags = (Flags0 & ~RowMajorBit) | (RowsAtCompileTime == 1 ? RowMajorBit : 0), TraversalSize = Direction==Vertical ? RowsAtCompileTime : ColsAtCompileTime }; #if EIGEN_GNUC_AT_LEAST(3,4) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index 1a4a4a8eb..f92a72c7b 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -65,9 +65,7 @@ template<typename _MatrixType> class LDLT }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; - typedef Matrix<Scalar, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> VectorType; - typedef Matrix<int, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> IntColVectorType; - typedef Matrix<int, 1, RowsAtCompileTime, Options, 1, MaxRowsAtCompileTime> IntRowVectorType; + typedef typename ei_plain_col_type<MatrixType, int>::type IntColVectorType; /** \brief Default Constructor. * diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index d552e4e8a..51a0e44ae 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -65,7 +65,6 @@ template<typename _MatrixType, int _UpLo> class LLT }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; - typedef Matrix<Scalar, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> VectorType; enum { PacketSize = ei_packet_traits<Scalar>::size, diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index 0608c784f..04d750a80 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -165,8 +165,8 @@ template<typename MatrixType, int Options, typename StrideType> class Map StrideType m_stride; }; -template<typename _Scalar, int _Rows, int _Cols, int _StorageOrder, int _MaxRows, int _MaxCols> -inline Matrix<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols> +template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> +inline Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> ::Matrix(const Scalar *data) { _set_noalias(Eigen::Map<Matrix>(data)); diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 789aecfb6..be32189e1 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -42,8 +42,10 @@ struct ei_traits<ProductBase<Derived,_Lhs,_Rhs> > //: ei_traits<typename ei_clea ColsAtCompileTime = ei_traits<Rhs>::ColsAtCompileTime, MaxRowsAtCompileTime = ei_traits<Lhs>::MaxRowsAtCompileTime, MaxColsAtCompileTime = ei_traits<Rhs>::MaxColsAtCompileTime, - Flags = EvalBeforeNestingBit | EvalBeforeAssigningBit | NestByRefBit, // Note that EvalBeforeNestingBit and NestByRefBit - // are not used in practice because ei_nested is overloaded for products + Flags = (RowsAtCompileTime==1 ? RowMajorBit : 0) + | EvalBeforeNestingBit | EvalBeforeAssigningBit | NestByRefBit, + // Note that EvalBeforeNestingBit and NestByRefBit + // are not used in practice because ei_nested is overloaded for products CoeffReadCost = 0 // FIXME why is it needed ? }; }; diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index eb7e93b91..3218f1e49 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -137,7 +137,10 @@ struct IOFormat; // Array module template<typename _Scalar, int _Rows, int _Cols, - int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign, + int _Options = AutoAlign | + ( (_Rows==1 && _Cols!=1) ? RowMajor + : (_Cols==1 && _Rows!=1) ? ColMajor + : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ), int _MaxRows = _Rows, int _MaxCols = _Cols> class Array; template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select; template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr; diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 4259ebb92..83104551f 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -185,16 +185,16 @@ template<typename T> struct ei_eval<T,Dense> }; // for matrices, no need to evaluate, just use a const reference to avoid a useless copy -template<typename _Scalar, int _Rows, int _Cols, int _StorageOrder, int _MaxRows, int _MaxCols> -struct ei_eval<Matrix<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols>, Dense> +template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> +struct ei_eval<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense> { - typedef const Matrix<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols>& type; + typedef const Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type; }; -template<typename _Scalar, int _Rows, int _Cols, int _StorageOrder, int _MaxRows, int _MaxCols> -struct ei_eval<Array<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols>, Dense> +template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> +struct ei_eval<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense> { - typedef const Array<_Scalar, _Rows, _Cols, _StorageOrder, _MaxRows, _MaxCols>& type; + typedef const Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type; }; @@ -355,4 +355,30 @@ template <typename A> struct ei_promote_storage_type<A,A> typedef A ret; }; +/** \internal gives the plain matrix type to store a row/column/diagonal of a matrix type. + * \param Scalar optional parameter allowing to pass a different scalar type than the one of the MatrixType. + */ +template<typename MatrixType, typename Scalar = typename MatrixType::Scalar> +struct ei_plain_row_type +{ + typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime, + MatrixType::PlainObject::Options | RowMajor, 1, MatrixType::MaxColsAtCompileTime> type; +}; + +template<typename MatrixType, typename Scalar = typename MatrixType::Scalar> +struct ei_plain_col_type +{ + typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1, + MatrixType::PlainObject::Options & ~RowMajor, MatrixType::MaxRowsAtCompileTime, 1> type; +}; + +template<typename MatrixType, typename Scalar = typename MatrixType::Scalar> +struct ei_plain_diag_type +{ + enum { diag_size = EIGEN_SIZE_MIN(MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime), + max_diag_size = EIGEN_SIZE_MIN(MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime) + }; + typedef Matrix<Scalar, diag_size, 1, MatrixType::PlainObject::Options & ~RowMajor, max_diag_size, 1> type; +}; + #endif // EIGEN_XPRHELPER_H diff --git a/Eigen/src/Eigenvalues/ComplexEigenSolver.h b/Eigen/src/Eigenvalues/ComplexEigenSolver.h index dae6091fe..fe320c3a0 100644 --- a/Eigen/src/Eigenvalues/ComplexEigenSolver.h +++ b/Eigen/src/Eigenvalues/ComplexEigenSolver.h @@ -51,7 +51,7 @@ template<typename _MatrixType> class ComplexEigenSolver typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef std::complex<RealScalar> Complex; - typedef Matrix<Complex, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> EigenvalueType; + typedef typename ei_plain_col_type<MatrixType, Complex>::type EigenvalueType; typedef Matrix<Complex, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, ColsAtCompileTime> EigenvectorType; /** diff --git a/Eigen/src/Eigenvalues/EigenSolver.h b/Eigen/src/Eigenvalues/EigenSolver.h index 579585618..3fcd8295c 100644 --- a/Eigen/src/Eigenvalues/EigenSolver.h +++ b/Eigen/src/Eigenvalues/EigenSolver.h @@ -55,9 +55,9 @@ template<typename _MatrixType> class EigenSolver typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef std::complex<RealScalar> Complex; - typedef Matrix<Complex, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> EigenvalueType; + typedef typename ei_plain_col_type<MatrixType, Complex>::type EigenvalueType; typedef Matrix<Complex, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> EigenvectorType; - typedef Matrix<RealScalar, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> RealVectorType; + typedef typename ei_plain_col_type<MatrixType, RealScalar>::type RealVectorType; /** * \brief Default Constructor. diff --git a/Eigen/src/Eigenvalues/HessenbergDecomposition.h b/Eigen/src/Eigenvalues/HessenbergDecomposition.h index f87c0b842..de833528d 100644 --- a/Eigen/src/Eigenvalues/HessenbergDecomposition.h +++ b/Eigen/src/Eigenvalues/HessenbergDecomposition.h @@ -53,8 +53,8 @@ template<typename _MatrixType> class HessenbergDecomposition }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; - typedef Matrix<Scalar, SizeMinusOne, 1, Options, MaxSizeMinusOne, 1> CoeffVectorType; - typedef Matrix<Scalar, 1, Size, Options, 1, MaxSize> VectorType; + typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType; + typedef typename ei_plain_col_type<MatrixType>::type VectorType; /** This constructor initializes a HessenbergDecomposition object for * further use with HessenbergDecomposition::compute() diff --git a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h index 209624c0a..b31f77e9b 100644 --- a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h @@ -52,7 +52,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; typedef std::complex<RealScalar> Complex; - typedef Matrix<RealScalar, ColsAtCompileTime, 1, Options, MaxColsAtCompileTime, 1> RealVectorType; + typedef typename ei_plain_col_type<MatrixType, RealScalar>::type RealVectorType; typedef Tridiagonalization<MatrixType> TridiagonalizationType; // typedef typename TridiagonalizationType::TridiagonalMatrixType TridiagonalMatrixType; diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index 3ef493fa7..9549e2c97 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -57,10 +57,10 @@ template<typename _MatrixType> class Tridiagonalization PacketSize = ei_packet_traits<Scalar>::size }; - typedef Matrix<Scalar, SizeMinusOne, 1, Options, MaxSizeMinusOne, 1> CoeffVectorType; - typedef Matrix<RealScalar, Size, 1, Options, MaxSize, 1> DiagonalType; - typedef Matrix<RealScalar, SizeMinusOne, 1, Options, MaxSizeMinusOne, 1> SubDiagonalType; - typedef Matrix<Scalar, 1, Size, Options, 1, MaxSize> RowVectorType; + typedef Matrix<Scalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> CoeffVectorType; + typedef typename ei_plain_col_type<MatrixType>::type DiagonalType; + typedef Matrix<RealScalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> SubDiagonalType; + typedef typename ei_plain_row_type<MatrixType>::type RowVectorType; typedef typename ei_meta_if<NumTraits<Scalar>::IsComplex, typename Diagonal<MatrixType,0>::RealReturnType, diff --git a/Eigen/src/Householder/Householder.h b/Eigen/src/Householder/Householder.h index 3c55e9e9c..12093b78d 100644 --- a/Eigen/src/Householder/Householder.h +++ b/Eigen/src/Householder/Householder.h @@ -96,7 +96,7 @@ void MatrixBase<Derived>::applyHouseholderOnTheLeft( } else { - Map<Matrix<Scalar, 1, Base::ColsAtCompileTime, PlainObject::Options, 1, Base::MaxColsAtCompileTime> > tmp(workspace,cols()); + Map<typename ei_plain_row_type<PlainObject>::type> tmp(workspace,cols()); Block<Derived, EssentialPart::SizeAtCompileTime, Derived::ColsAtCompileTime> bottom(derived(), 1, 0, rows()-1, cols()); tmp.noalias() = essential.adjoint() * bottom; tmp += this->row(0); @@ -118,7 +118,7 @@ void MatrixBase<Derived>::applyHouseholderOnTheRight( } else { - Map<Matrix<Scalar, Base::RowsAtCompileTime, 1, PlainObject::Options, Base::MaxRowsAtCompileTime, 1> > tmp(workspace,rows()); + Map<typename ei_plain_col_type<PlainObject>::type> tmp(workspace,rows()); Block<Derived, Derived::RowsAtCompileTime, EssentialPart::SizeAtCompileTime> right(derived(), 0, 1, rows(), cols()-1); tmp.noalias() = right * essential.conjugate(); tmp += this->col(0); diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 4092567a6..1fe15bfd2 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -68,8 +68,8 @@ template<typename _MatrixType> class FullPivLU }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; - typedef Matrix<int, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> IntRowVectorType; - typedef Matrix<int, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> IntColVectorType; + typedef typename ei_plain_row_type<MatrixType, int>::type IntRowVectorType; + typedef typename ei_plain_col_type<MatrixType, int>::type IntColVectorType; typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationQType; typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationPType; diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 8ff9c5b03..63b924926 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -71,7 +71,7 @@ template<typename _MatrixType> class PartialPivLU }; typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; - typedef Matrix<int, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> PermutationVectorType; + typedef typename ei_plain_col_type<MatrixType, int>::type PermutationVectorType; typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationType; diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index 7ec477153..27f80e046 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -52,18 +52,16 @@ template<typename _MatrixType> class ColPivHouseholderQR ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime), - MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN(MaxColsAtCompileTime,MaxRowsAtCompileTime) + MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, Options, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, DiagSizeAtCompileTime, 1, Options, MaxDiagSizeAtCompileTime, 1> HCoeffsType; + typedef typename ei_plain_diag_type<MatrixType>::type HCoeffsType; typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationType; - typedef Matrix<int, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> IntRowVectorType; - typedef Matrix<Scalar, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> RowVectorType; - typedef Matrix<RealScalar, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> RealRowVectorType; + typedef typename ei_plain_row_type<MatrixType, int>::type IntRowVectorType; + typedef typename ei_plain_row_type<MatrixType>::type RowVectorType; + typedef typename ei_plain_row_type<MatrixType, RealScalar>::type RealRowVectorType; typedef typename HouseholderSequence<MatrixType,HCoeffsType>::ConjugateReturnType HouseholderSequenceType; /** diff --git a/Eigen/src/QR/FullPivHouseholderQR.h b/Eigen/src/QR/FullPivHouseholderQR.h index cc0b6e4ed..7f3e0915e 100644 --- a/Eigen/src/QR/FullPivHouseholderQR.h +++ b/Eigen/src/QR/FullPivHouseholderQR.h @@ -52,19 +52,17 @@ template<typename _MatrixType> class FullPivHouseholderQR ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime), - MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN(MaxColsAtCompileTime,MaxRowsAtCompileTime) + MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, Options, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, DiagSizeAtCompileTime, 1, Options, MaxDiagSizeAtCompileTime, 1> HCoeffsType; - typedef Matrix<int, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> IntRowVectorType; + typedef typename ei_plain_diag_type<MatrixType>::type HCoeffsType; + typedef Matrix<int, 1, ColsAtCompileTime, RowMajor, 1, MaxColsAtCompileTime> IntRowVectorType; typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> PermutationType; - typedef Matrix<int, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> IntColVectorType; - typedef Matrix<Scalar, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> RowVectorType; - typedef Matrix<Scalar, RowsAtCompileTime, 1, Options, MaxRowsAtCompileTime, 1> ColVectorType; + typedef typename ei_plain_row_type<MatrixType, int>::type IntColVectorType; + typedef typename ei_plain_row_type<MatrixType>::type RowVectorType; + typedef typename ei_plain_col_type<MatrixType>::type ColVectorType; /** \brief Default Constructor. * diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index 42ad94030..c4abc16ff 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -56,15 +56,13 @@ template<typename _MatrixType> class HouseholderQR ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, - MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime), - MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN(MaxColsAtCompileTime,MaxRowsAtCompileTime) + MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, ei_traits<MatrixType>::Flags&RowMajorBit ? RowMajor : ColMajor, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixQType; - typedef Matrix<Scalar, DiagSizeAtCompileTime, 1, Options, MaxDiagSizeAtCompileTime, 1> HCoeffsType; - typedef Matrix<Scalar, 1, ColsAtCompileTime, Options, 1, MaxColsAtCompileTime> RowVectorType; + typedef typename ei_plain_diag_type<MatrixType>::type HCoeffsType; + typedef typename ei_plain_row_type<MatrixType>::type RowVectorType; typedef typename HouseholderSequence<MatrixType,HCoeffsType>::ConjugateReturnType HouseholderSequenceType; /** diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 94375725f..b7cab023b 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -84,10 +84,9 @@ template<typename MatrixType, unsigned int Options> class JacobiSVD Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime>, DummyMatrixType>::ret MatrixVType; - typedef Matrix<RealScalar, DiagSizeAtCompileTime, 1, - MatrixOptions, MaxDiagSizeAtCompileTime, 1> SingularValuesType; - typedef Matrix<Scalar, 1, RowsAtCompileTime, MatrixOptions, 1, MaxRowsAtCompileTime> RowType; - typedef Matrix<Scalar, RowsAtCompileTime, 1, MatrixOptions, MaxRowsAtCompileTime, 1> ColType; + typedef typename ei_plain_diag_type<MatrixType, RealScalar>::type SingularValuesType; + typedef typename ei_plain_row_type<MatrixType>::type RowType; + typedef typename ei_plain_col_type<MatrixType>::type ColType; typedef Matrix<Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime> WorkMatrixType; diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index bd1ba3cf3..ed0e69f91 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -58,12 +58,12 @@ template<typename _MatrixType> class SVD MatrixOptions = MatrixType::Options }; - typedef Matrix<Scalar, RowsAtCompileTime, 1, MatrixOptions, MaxRowsAtCompileTime, 1> ColVector; - typedef Matrix<Scalar, ColsAtCompileTime, 1, MatrixOptions, MaxColsAtCompileTime, 1> RowVector; + typedef typename ei_plain_col_type<MatrixType>::type ColVector; + typedef typename ei_plain_row_type<MatrixType>::type RowVector; typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime> MatrixUType; typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime> MatrixVType; - typedef Matrix<Scalar, ColsAtCompileTime, 1, MatrixOptions, MaxColsAtCompileTime, 1> SingularValuesType; + typedef ColVector SingularValuesType; /** * \brief Default Constructor. |