* Merge Extract and Part to the Part expression.

Renamed "MatrixBase::extract() const" to "MatrixBase::part() const"
* Renamed static functions identity, zero, ones, random with an upper case
  first letter: Identity, Zero, Ones and Random.
This commit is contained in:
Gael Guennebaud
2008-07-21 00:34:46 +00:00
parent ce425d92f1
commit c10f069b6b
80 changed files with 434 additions and 500 deletions

View File

@@ -58,7 +58,7 @@ template<typename MatrixType> class Cholesky
compute(matrix);
}
Extract<MatrixType, Lower> matrixL(void) const
Part<MatrixType, Lower> matrixL(void) const
{
return m_matrix;
}
@@ -79,7 +79,7 @@ template<typename MatrixType> class Cholesky
bool m_isPositiveDefinite;
};
/** Compute / recompute the Cholesky decomposition A = LL^* = U^*U of \a matrix
/** Computes / recomputes the Cholesky decomposition A = LL^* = U^*U of \a matrix
*/
template<typename MatrixType>
void Cholesky<MatrixType>::compute(const MatrixType& a)
@@ -124,7 +124,7 @@ typename Derived::Eval Cholesky<MatrixType>::solve(const MatrixBase<Derived> &b)
const int size = m_matrix.rows();
ei_assert(size==b.rows());
return m_matrix.adjoint().template extract<Upper>().inverseProduct(matrixL().inverseProduct(b));
return m_matrix.adjoint().template part<Upper>().inverseProduct(matrixL().inverseProduct(b));
}
/** \cholesky_module

View File

@@ -58,7 +58,7 @@ template<typename MatrixType> class CholeskyWithoutSquareRoot
}
/** \returns the lower triangular matrix L */
Extract<MatrixType, UnitLower> matrixL(void) const
Part<MatrixType, UnitLower> matrixL(void) const
{
return m_matrix;
}
@@ -136,7 +136,7 @@ typename Derived::Eval CholeskyWithoutSquareRoot<MatrixType>::solve(const Matrix
const int size = m_matrix.rows();
ei_assert(size==b.rows());
return m_matrix.adjoint().template extract<UnitUpper>()
return m_matrix.adjoint().template part<UnitUpper>()
.inverseProduct(
(matrixL()
.inverseProduct(b))