mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
the Index types change.
As discussed on the list (too long to explain here).
This commit is contained in:
@@ -37,6 +37,7 @@ template<typename _MatrixType> class UpperBidiagonalization
|
||||
};
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::Index Index;
|
||||
typedef Matrix<Scalar, 1, ColsAtCompileTime> RowVectorType;
|
||||
typedef Matrix<Scalar, RowsAtCompileTime, 1> ColVectorType;
|
||||
typedef BandMatrix<RealScalar, ColsAtCompileTime, ColsAtCompileTime, 1, 0> BidiagonalType;
|
||||
@@ -95,8 +96,8 @@ template<typename _MatrixType> class UpperBidiagonalization
|
||||
template<typename _MatrixType>
|
||||
UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::compute(const _MatrixType& matrix)
|
||||
{
|
||||
int rows = matrix.rows();
|
||||
int cols = matrix.cols();
|
||||
Index rows = matrix.rows();
|
||||
Index cols = matrix.cols();
|
||||
|
||||
ei_assert(rows >= cols && "UpperBidiagonalization is only for matrices satisfying rows>=cols.");
|
||||
|
||||
@@ -104,10 +105,10 @@ UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::comput
|
||||
|
||||
ColVectorType temp(rows);
|
||||
|
||||
for (int k = 0; /* breaks at k==cols-1 below */ ; ++k)
|
||||
for (Index k = 0; /* breaks at k==cols-1 below */ ; ++k)
|
||||
{
|
||||
int remainingRows = rows - k;
|
||||
int remainingCols = cols - k - 1;
|
||||
Index remainingRows = rows - k;
|
||||
Index remainingCols = cols - k - 1;
|
||||
|
||||
// construct left householder transform in-place in m_householder
|
||||
m_householder.col(k).tail(remainingRows)
|
||||
|
||||
Reference in New Issue
Block a user