mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-31 19:00:35 +08:00
Avoid leading underscore followed by cap in template identifiers
This commit is contained in:
parent
5ad8b9bfe2
commit
4ba872bd75
@ -16,8 +16,8 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType, int _UpLo> struct traits<LDLT<_MatrixType, _UpLo> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_, int UpLo_> struct traits<LDLT<MatrixType_, UpLo_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -37,8 +37,8 @@ namespace internal {
|
||||
*
|
||||
* \brief Robust Cholesky decomposition of a matrix with pivoting
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which to compute the LDL^T Cholesky decomposition
|
||||
* \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.
|
||||
* \tparam MatrixType_ the type of the matrix of which to compute the LDL^T Cholesky decomposition
|
||||
* \tparam UpLo_ the triangular part that will be used for the decomposition: Lower (default) or Upper.
|
||||
* The other triangular part won't be read.
|
||||
*
|
||||
* Perform a robust Cholesky decomposition of a positive semidefinite or negative semidefinite
|
||||
@ -56,11 +56,11 @@ namespace internal {
|
||||
*
|
||||
* \sa MatrixBase::ldlt(), SelfAdjointView::ldlt(), class LLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo> class LDLT
|
||||
: public SolverBase<LDLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_> class LDLT
|
||||
: public SolverBase<LDLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<LDLT> Base;
|
||||
friend class SolverBase<LDLT>;
|
||||
|
||||
@ -68,7 +68,7 @@ template<typename _MatrixType, int _UpLo> class LDLT
|
||||
enum {
|
||||
MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
|
||||
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
|
||||
UpLo = _UpLo
|
||||
UpLo = UpLo_
|
||||
};
|
||||
typedef Matrix<Scalar, RowsAtCompileTime, 1, 0, MaxRowsAtCompileTime, 1> TmpMatrixType;
|
||||
|
||||
@ -494,9 +494,9 @@ template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
|
||||
|
||||
/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix
|
||||
*/
|
||||
template<typename MatrixType, int _UpLo>
|
||||
template<typename MatrixType, int UpLo_>
|
||||
template<typename InputType>
|
||||
LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)
|
||||
LDLT<MatrixType,UpLo_>& LDLT<MatrixType,UpLo_>::compute(const EigenBase<InputType>& a)
|
||||
{
|
||||
check_template_parameters();
|
||||
|
||||
@ -510,7 +510,7 @@ LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const EigenBase<InputTyp
|
||||
// TODO move this code to SelfAdjointView
|
||||
for (Index col = 0; col < size; ++col) {
|
||||
RealScalar abs_col_sum;
|
||||
if (_UpLo == Lower)
|
||||
if (UpLo_ == Lower)
|
||||
abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();
|
||||
else
|
||||
abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();
|
||||
@ -534,9 +534,9 @@ LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::compute(const EigenBase<InputTyp
|
||||
* \param sigma a scalar, +1 for updates and -1 for "downdates," which correspond to removing previously-added column vectors. Optional; default value is +1.
|
||||
* \sa setZero()
|
||||
*/
|
||||
template<typename MatrixType, int _UpLo>
|
||||
template<typename MatrixType, int UpLo_>
|
||||
template<typename Derived>
|
||||
LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::rankUpdate(const MatrixBase<Derived>& w, const typename LDLT<MatrixType,_UpLo>::RealScalar& sigma)
|
||||
LDLT<MatrixType,UpLo_>& LDLT<MatrixType,UpLo_>::rankUpdate(const MatrixBase<Derived>& w, const typename LDLT<MatrixType,UpLo_>::RealScalar& sigma)
|
||||
{
|
||||
typedef typename TranspositionType::StorageIndex IndexType;
|
||||
const Index size = w.rows();
|
||||
@ -562,16 +562,16 @@ LDLT<MatrixType,_UpLo>& LDLT<MatrixType,_UpLo>::rankUpdate(const MatrixBase<Deri
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType, int _UpLo>
|
||||
template<typename MatrixType_, int UpLo_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void LDLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void LDLT<MatrixType_,UpLo_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
_solve_impl_transposed<true>(rhs, dst);
|
||||
}
|
||||
|
||||
template<typename _MatrixType,int _UpLo>
|
||||
template<typename MatrixType_,int UpLo_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void LDLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void LDLT<MatrixType_,UpLo_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
// dst = P b
|
||||
dst = m_transpositions * rhs;
|
||||
@ -624,9 +624,9 @@ void LDLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType
|
||||
*
|
||||
* \sa LDLT::solve(), MatrixBase::ldlt()
|
||||
*/
|
||||
template<typename MatrixType,int _UpLo>
|
||||
template<typename MatrixType,int UpLo_>
|
||||
template<typename Derived>
|
||||
bool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
|
||||
bool LDLT<MatrixType,UpLo_>::solveInPlace(MatrixBase<Derived> &bAndX) const
|
||||
{
|
||||
eigen_assert(m_isInitialized && "LDLT is not initialized.");
|
||||
eigen_assert(m_matrix.rows() == bAndX.rows());
|
||||
@ -639,8 +639,8 @@ bool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
|
||||
/** \returns the matrix represented by the decomposition,
|
||||
* i.e., it returns the product: P^T L D L^* P.
|
||||
* This function is provided for debug purpose. */
|
||||
template<typename MatrixType, int _UpLo>
|
||||
MatrixType LDLT<MatrixType,_UpLo>::reconstructedMatrix() const
|
||||
template<typename MatrixType, int UpLo_>
|
||||
MatrixType LDLT<MatrixType,UpLo_>::reconstructedMatrix() const
|
||||
{
|
||||
eigen_assert(m_isInitialized && "LDLT is not initialized.");
|
||||
const Index size = m_matrix.rows();
|
||||
|
@ -14,8 +14,8 @@ namespace Eigen {
|
||||
|
||||
namespace internal{
|
||||
|
||||
template<typename _MatrixType, int _UpLo> struct traits<LLT<_MatrixType, _UpLo> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_, int UpLo_> struct traits<LLT<MatrixType_, UpLo_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -32,8 +32,8 @@ template<typename MatrixType, int UpLo> struct LLT_Traits;
|
||||
*
|
||||
* \brief Standard Cholesky decomposition (LL^T) of a matrix and associated features
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the LL^T Cholesky decomposition
|
||||
* \tparam _UpLo the triangular part that will be used for the decompositon: Lower (default) or Upper.
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the LL^T Cholesky decomposition
|
||||
* \tparam UpLo_ the triangular part that will be used for the decomposition: Lower (default) or Upper.
|
||||
* The other triangular part won't be read.
|
||||
*
|
||||
* This class performs a LL^T Cholesky decomposition of a symmetric, positive definite
|
||||
@ -58,16 +58,16 @@ template<typename MatrixType, int UpLo> struct LLT_Traits;
|
||||
*
|
||||
* This class supports the \link InplaceDecomposition inplace decomposition \endlink mechanism.
|
||||
*
|
||||
* Note that during the decomposition, only the lower (or upper, as defined by _UpLo) triangular part of A is considered.
|
||||
* Note that during the decomposition, only the lower (or upper, as defined by UpLo_) triangular part of A is considered.
|
||||
* Therefore, the strict lower part does not have to store correct values.
|
||||
*
|
||||
* \sa MatrixBase::llt(), SelfAdjointView::llt(), class LDLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo> class LLT
|
||||
: public SolverBase<LLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_> class LLT
|
||||
: public SolverBase<LLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<LLT> Base;
|
||||
friend class SolverBase<LLT>;
|
||||
|
||||
@ -79,7 +79,7 @@ template<typename _MatrixType, int _UpLo> class LLT
|
||||
enum {
|
||||
PacketSize = internal::packet_traits<Scalar>::size,
|
||||
AlignmentMask = int(PacketSize)-1,
|
||||
UpLo = _UpLo
|
||||
UpLo = UpLo_
|
||||
};
|
||||
|
||||
typedef internal::LLT_Traits<MatrixType,UpLo> Traits;
|
||||
@ -427,9 +427,9 @@ template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
|
||||
* Example: \include TutorialLinAlgComputeTwice.cpp
|
||||
* Output: \verbinclude TutorialLinAlgComputeTwice.out
|
||||
*/
|
||||
template<typename MatrixType, int _UpLo>
|
||||
template<typename MatrixType, int UpLo_>
|
||||
template<typename InputType>
|
||||
LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>& a)
|
||||
LLT<MatrixType,UpLo_>& LLT<MatrixType,UpLo_>::compute(const EigenBase<InputType>& a)
|
||||
{
|
||||
check_template_parameters();
|
||||
|
||||
@ -444,7 +444,7 @@ LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>
|
||||
// TODO move this code to SelfAdjointView
|
||||
for (Index col = 0; col < size; ++col) {
|
||||
RealScalar abs_col_sum;
|
||||
if (_UpLo == Lower)
|
||||
if (UpLo_ == Lower)
|
||||
abs_col_sum = m_matrix.col(col).tail(size - col).template lpNorm<1>() + m_matrix.row(col).head(col).template lpNorm<1>();
|
||||
else
|
||||
abs_col_sum = m_matrix.col(col).head(col).template lpNorm<1>() + m_matrix.row(col).tail(size - col).template lpNorm<1>();
|
||||
@ -464,9 +464,9 @@ LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const EigenBase<InputType>
|
||||
* then after it we have LL^* = A + sigma * v v^* where \a v must be a vector
|
||||
* of same dimension.
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo>
|
||||
template<typename MatrixType_, int UpLo_>
|
||||
template<typename VectorType>
|
||||
LLT<_MatrixType,_UpLo> & LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v, const RealScalar& sigma)
|
||||
LLT<MatrixType_,UpLo_> & LLT<MatrixType_,UpLo_>::rankUpdate(const VectorType& v, const RealScalar& sigma)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorType);
|
||||
eigen_assert(v.size()==m_matrix.cols());
|
||||
@ -480,16 +480,16 @@ LLT<_MatrixType,_UpLo> & LLT<_MatrixType,_UpLo>::rankUpdate(const VectorType& v,
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType,int _UpLo>
|
||||
template<typename MatrixType_,int UpLo_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void LLT<_MatrixType,_UpLo>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void LLT<MatrixType_,UpLo_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
_solve_impl_transposed<true>(rhs, dst);
|
||||
}
|
||||
|
||||
template<typename _MatrixType,int _UpLo>
|
||||
template<typename MatrixType_,int UpLo_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void LLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void LLT<MatrixType_,UpLo_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
dst = rhs;
|
||||
|
||||
@ -511,9 +511,9 @@ void LLT<_MatrixType,_UpLo>::_solve_impl_transposed(const RhsType &rhs, DstType
|
||||
*
|
||||
* \sa LLT::solve(), MatrixBase::llt()
|
||||
*/
|
||||
template<typename MatrixType, int _UpLo>
|
||||
template<typename MatrixType, int UpLo_>
|
||||
template<typename Derived>
|
||||
void LLT<MatrixType,_UpLo>::solveInPlace(const MatrixBase<Derived> &bAndX) const
|
||||
void LLT<MatrixType,UpLo_>::solveInPlace(const MatrixBase<Derived> &bAndX) const
|
||||
{
|
||||
eigen_assert(m_isInitialized && "LLT is not initialized.");
|
||||
eigen_assert(m_matrix.rows()==bAndX.rows());
|
||||
@ -524,8 +524,8 @@ void LLT<MatrixType,_UpLo>::solveInPlace(const MatrixBase<Derived> &bAndX) const
|
||||
/** \returns the matrix represented by the decomposition,
|
||||
* i.e., it returns the product: L L^*.
|
||||
* This function is provided for debug purpose. */
|
||||
template<typename MatrixType, int _UpLo>
|
||||
MatrixType LLT<MatrixType,_UpLo>::reconstructedMatrix() const
|
||||
template<typename MatrixType, int UpLo_>
|
||||
MatrixType LLT<MatrixType,UpLo_>::reconstructedMatrix() const
|
||||
{
|
||||
eigen_assert(m_isInitialized && "LLT is not initialized.");
|
||||
return matrixL() * matrixL().adjoint().toDenseMatrix();
|
||||
|
@ -54,8 +54,8 @@ template<> struct cholmod_configure_matrix<std::complex<double> > {
|
||||
/** Wraps the Eigen sparse matrix \a mat into a Cholmod sparse matrix object.
|
||||
* Note that the data are shared.
|
||||
*/
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
cholmod_sparse viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_StorageIndex> > mat)
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
cholmod_sparse viewAsCholmod(Ref<SparseMatrix<Scalar_,Options_,StorageIndex_> > mat)
|
||||
{
|
||||
cholmod_sparse res;
|
||||
res.nzmax = mat.nonZeros();
|
||||
@ -80,11 +80,11 @@ cholmod_sparse viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
res.dtype = 0;
|
||||
res.stype = -1;
|
||||
|
||||
if (internal::is_same<_StorageIndex,int>::value)
|
||||
if (internal::is_same<StorageIndex_,int>::value)
|
||||
{
|
||||
res.itype = CHOLMOD_INT;
|
||||
}
|
||||
else if (internal::is_same<_StorageIndex,SuiteSparse_long>::value)
|
||||
else if (internal::is_same<StorageIndex_,SuiteSparse_long>::value)
|
||||
{
|
||||
res.itype = CHOLMOD_LONG;
|
||||
}
|
||||
@ -94,39 +94,39 @@ cholmod_sparse viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
}
|
||||
|
||||
// setup res.xtype
|
||||
internal::cholmod_configure_matrix<_Scalar>::run(res);
|
||||
internal::cholmod_configure_matrix<Scalar_>::run(res);
|
||||
|
||||
res.stype = 0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index>
|
||||
const cholmod_sparse viewAsCholmod(const SparseMatrix<_Scalar,_Options,_Index>& mat)
|
||||
template<typename Scalar_, int Options_, typename Index_>
|
||||
const cholmod_sparse viewAsCholmod(const SparseMatrix<Scalar_,Options_,Index_>& mat)
|
||||
{
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.const_cast_derived()));
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<Scalar_,Options_,Index_> >(mat.const_cast_derived()));
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index>
|
||||
const cholmod_sparse viewAsCholmod(const SparseVector<_Scalar,_Options,_Index>& mat)
|
||||
template<typename Scalar_, int Options_, typename Index_>
|
||||
const cholmod_sparse viewAsCholmod(const SparseVector<Scalar_,Options_,Index_>& mat)
|
||||
{
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.const_cast_derived()));
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<Scalar_,Options_,Index_> >(mat.const_cast_derived()));
|
||||
return res;
|
||||
}
|
||||
|
||||
/** Returns a view of the Eigen sparse matrix \a mat as Cholmod sparse matrix.
|
||||
* The data are not copied but shared. */
|
||||
template<typename _Scalar, int _Options, typename _Index, unsigned int UpLo>
|
||||
cholmod_sparse viewAsCholmod(const SparseSelfAdjointView<const SparseMatrix<_Scalar,_Options,_Index>, UpLo>& mat)
|
||||
template<typename Scalar_, int Options_, typename Index_, unsigned int UpLo>
|
||||
cholmod_sparse viewAsCholmod(const SparseSelfAdjointView<const SparseMatrix<Scalar_,Options_,Index_>, UpLo>& mat)
|
||||
{
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<_Scalar,_Options,_Index> >(mat.matrix().const_cast_derived()));
|
||||
cholmod_sparse res = viewAsCholmod(Ref<SparseMatrix<Scalar_,Options_,Index_> >(mat.matrix().const_cast_derived()));
|
||||
|
||||
if(UpLo==Upper) res.stype = 1;
|
||||
if(UpLo==Lower) res.stype = -1;
|
||||
// swap stype for rowmajor matrices (only works for real matrices)
|
||||
EIGEN_STATIC_ASSERT((_Options & RowMajorBit) == 0 || NumTraits<_Scalar>::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
|
||||
if(_Options & RowMajorBit) res.stype *=-1;
|
||||
EIGEN_STATIC_ASSERT((Options_ & RowMajorBit) == 0 || NumTraits<Scalar_>::IsComplex == 0, THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
|
||||
if(Options_ & RowMajorBit) res.stype *=-1;
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -167,11 +167,11 @@ namespace internal {
|
||||
// template specializations for int and long that call the correct cholmod method
|
||||
|
||||
#define EIGEN_CHOLMOD_SPECIALIZE0(ret, name) \
|
||||
template<typename _StorageIndex> inline ret cm_ ## name (cholmod_common &Common) { return cholmod_ ## name (&Common); } \
|
||||
template<typename StorageIndex_> inline ret cm_ ## name (cholmod_common &Common) { return cholmod_ ## name (&Common); } \
|
||||
template<> inline ret cm_ ## name<SuiteSparse_long> (cholmod_common &Common) { return cholmod_l_ ## name (&Common); }
|
||||
|
||||
#define EIGEN_CHOLMOD_SPECIALIZE1(ret, name, t1, a1) \
|
||||
template<typename _StorageIndex> inline ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_ ## name (&a1, &Common); } \
|
||||
template<typename StorageIndex_> inline ret cm_ ## name (t1& a1, cholmod_common &Common) { return cholmod_ ## name (&a1, &Common); } \
|
||||
template<> inline ret cm_ ## name<SuiteSparse_long> (t1& a1, cholmod_common &Common) { return cholmod_l_ ## name (&a1, &Common); }
|
||||
|
||||
EIGEN_CHOLMOD_SPECIALIZE0(int, start)
|
||||
@ -183,14 +183,14 @@ EIGEN_CHOLMOD_SPECIALIZE1(int, free_sparse, cholmod_sparse*, A)
|
||||
|
||||
EIGEN_CHOLMOD_SPECIALIZE1(cholmod_factor*, analyze, cholmod_sparse, A)
|
||||
|
||||
template<typename _StorageIndex> inline cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_solve (sys, &L, &B, &Common); }
|
||||
template<typename StorageIndex_> inline cholmod_dense* cm_solve (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_solve (sys, &L, &B, &Common); }
|
||||
template<> inline cholmod_dense* cm_solve<SuiteSparse_long> (int sys, cholmod_factor& L, cholmod_dense& B, cholmod_common &Common) { return cholmod_l_solve (sys, &L, &B, &Common); }
|
||||
|
||||
template<typename _StorageIndex> inline cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve (sys, &L, &B, &Common); }
|
||||
template<typename StorageIndex_> inline cholmod_sparse* cm_spsolve (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_spsolve (sys, &L, &B, &Common); }
|
||||
template<> inline cholmod_sparse* cm_spsolve<SuiteSparse_long> (int sys, cholmod_factor& L, cholmod_sparse& B, cholmod_common &Common) { return cholmod_l_spsolve (sys, &L, &B, &Common); }
|
||||
|
||||
template<typename _StorageIndex>
|
||||
inline int cm_factorize_p (cholmod_sparse* A, double beta[2], _StorageIndex* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p (A, beta, fset, fsize, L, &Common); }
|
||||
template<typename StorageIndex_>
|
||||
inline int cm_factorize_p (cholmod_sparse* A, double beta[2], StorageIndex_* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_factorize_p (A, beta, fset, fsize, L, &Common); }
|
||||
template<>
|
||||
inline int cm_factorize_p<SuiteSparse_long> (cholmod_sparse* A, double beta[2], SuiteSparse_long* fset, std::size_t fsize, cholmod_factor* L, cholmod_common &Common) { return cholmod_l_factorize_p (A, beta, fset, fsize, L, &Common); }
|
||||
|
||||
@ -210,7 +210,7 @@ enum CholmodMode {
|
||||
* \brief The base class for the direct Cholesky factorization of Cholmod
|
||||
* \sa class CholmodSupernodalLLT, class CholmodSimplicialLDLT, class CholmodSimplicialLLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo, typename Derived>
|
||||
template<typename MatrixType_, int UpLo_, typename Derived>
|
||||
class CholmodBase : public SparseSolverBase<Derived>
|
||||
{
|
||||
protected:
|
||||
@ -218,8 +218,8 @@ class CholmodBase : public SparseSolverBase<Derived>
|
||||
using Base::derived;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef MatrixType CholMatrixType;
|
||||
@ -461,8 +461,8 @@ class CholmodBase : public SparseSolverBase<Derived>
|
||||
* The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
|
||||
* X and B can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -473,15 +473,15 @@ class CholmodBase : public SparseSolverBase<Derived>
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo = Lower>
|
||||
class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_ = Lower>
|
||||
class CholmodSimplicialLLT : public CholmodBase<MatrixType_, UpLo_, CholmodSimplicialLLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLLT> Base;
|
||||
typedef CholmodBase<MatrixType_, UpLo_, CholmodSimplicialLLT> Base;
|
||||
using Base::m_cholmod;
|
||||
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
CholmodSimplicialLLT() : Base() { init(); }
|
||||
|
||||
@ -512,8 +512,8 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl
|
||||
* The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
|
||||
* X and B can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -524,15 +524,15 @@ class CholmodSimplicialLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimpl
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class CholmodSupernodalLLT, class SimplicialLDLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo = Lower>
|
||||
class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_ = Lower>
|
||||
class CholmodSimplicialLDLT : public CholmodBase<MatrixType_, UpLo_, CholmodSimplicialLDLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
typedef CholmodBase<_MatrixType, _UpLo, CholmodSimplicialLDLT> Base;
|
||||
typedef CholmodBase<MatrixType_, UpLo_, CholmodSimplicialLDLT> Base;
|
||||
using Base::m_cholmod;
|
||||
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
CholmodSimplicialLDLT() : Base() { init(); }
|
||||
|
||||
@ -561,8 +561,8 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp
|
||||
* The sparse matrix A must be selfadjoint and positive definite. The vectors or matrices
|
||||
* X and B can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -573,15 +573,15 @@ class CholmodSimplicialLDLT : public CholmodBase<_MatrixType, _UpLo, CholmodSimp
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo = Lower>
|
||||
class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_ = Lower>
|
||||
class CholmodSupernodalLLT : public CholmodBase<MatrixType_, UpLo_, CholmodSupernodalLLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
typedef CholmodBase<_MatrixType, _UpLo, CholmodSupernodalLLT> Base;
|
||||
typedef CholmodBase<MatrixType_, UpLo_, CholmodSupernodalLLT> Base;
|
||||
using Base::m_cholmod;
|
||||
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
CholmodSupernodalLLT() : Base() { init(); }
|
||||
|
||||
@ -612,8 +612,8 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper
|
||||
* On the other hand, it does not provide access to the result of the factorization.
|
||||
* The default is to let Cholmod automatically choose between a simplicial and supernodal factorization.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -624,15 +624,15 @@ class CholmodSupernodalLLT : public CholmodBase<_MatrixType, _UpLo, CholmodSuper
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo = Lower>
|
||||
class CholmodDecomposition : public CholmodBase<_MatrixType, _UpLo, CholmodDecomposition<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_ = Lower>
|
||||
class CholmodDecomposition : public CholmodBase<MatrixType_, UpLo_, CholmodDecomposition<MatrixType_, UpLo_> >
|
||||
{
|
||||
typedef CholmodBase<_MatrixType, _UpLo, CholmodDecomposition> Base;
|
||||
typedef CholmodBase<MatrixType_, UpLo_, CholmodDecomposition> Base;
|
||||
using Base::m_cholmod;
|
||||
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
CholmodDecomposition() : Base() { init(); }
|
||||
|
||||
|
@ -13,11 +13,11 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct traits<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > : traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct traits<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> > : traits<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
{
|
||||
typedef ArrayXpr XprKind;
|
||||
typedef ArrayBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > XprBase;
|
||||
typedef ArrayBase<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> > XprBase;
|
||||
};
|
||||
}
|
||||
|
||||
@ -41,16 +41,16 @@ struct traits<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> > : tra
|
||||
*
|
||||
* \sa \blank \ref TutorialArrayClass, \ref TopicClassHierarchy
|
||||
*/
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
class Array
|
||||
: public PlainObjectBase<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
: public PlainObjectBase<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef PlainObjectBase<Array> Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Array)
|
||||
|
||||
enum { Options = _Options };
|
||||
enum { Options = Options_ };
|
||||
typedef typename Base::PlainObject PlainObject;
|
||||
|
||||
protected:
|
||||
|
@ -161,12 +161,12 @@ class BandMatrixBase : public EigenBase<Derived>
|
||||
*
|
||||
* \brief Represents a rectangular matrix with a banded storage
|
||||
*
|
||||
* \tparam _Scalar Numeric type, i.e. float, double, int
|
||||
* \tparam _Rows Number of rows, or \b Dynamic
|
||||
* \tparam _Cols Number of columns, or \b Dynamic
|
||||
* \tparam _Supers Number of super diagonal
|
||||
* \tparam _Subs Number of sub diagonal
|
||||
* \tparam _Options A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint
|
||||
* \tparam Scalar_ Numeric type, i.e. float, double, int
|
||||
* \tparam Rows_ Number of rows, or \b Dynamic
|
||||
* \tparam Cols_ Number of columns, or \b Dynamic
|
||||
* \tparam Supers_ Number of super diagonal
|
||||
* \tparam Subs_ Number of sub diagonal
|
||||
* \tparam Options_ A combination of either \b #RowMajor or \b #ColMajor, and of \b #SelfAdjoint
|
||||
* The former controls \ref TopicStorageOrders "storage order", and defaults to
|
||||
* column-major. The latter controls whether the matrix represents a selfadjoint
|
||||
* matrix in which case either Supers of Subs have to be null.
|
||||
@ -174,29 +174,29 @@ class BandMatrixBase : public EigenBase<Derived>
|
||||
* \sa class TridiagonalMatrix
|
||||
*/
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Supers, int _Subs, int _Options>
|
||||
struct traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Supers_, int Subs_, int Options_>
|
||||
struct traits<BandMatrix<Scalar_,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Dense StorageKind;
|
||||
typedef Eigen::Index StorageIndex;
|
||||
enum {
|
||||
CoeffReadCost = NumTraits<Scalar>::ReadCost,
|
||||
RowsAtCompileTime = _Rows,
|
||||
ColsAtCompileTime = _Cols,
|
||||
MaxRowsAtCompileTime = _Rows,
|
||||
MaxColsAtCompileTime = _Cols,
|
||||
RowsAtCompileTime = Rows_,
|
||||
ColsAtCompileTime = Cols_,
|
||||
MaxRowsAtCompileTime = Rows_,
|
||||
MaxColsAtCompileTime = Cols_,
|
||||
Flags = LvalueBit,
|
||||
Supers = _Supers,
|
||||
Subs = _Subs,
|
||||
Options = _Options,
|
||||
Supers = Supers_,
|
||||
Subs = Subs_,
|
||||
Options = Options_,
|
||||
DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic
|
||||
};
|
||||
typedef Matrix<Scalar, DataRowsAtCompileTime, ColsAtCompileTime, int(Options) & int(RowMajor) ? RowMajor : ColMajor> CoefficientsType;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options>
|
||||
class BandMatrix : public BandMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> >
|
||||
template<typename Scalar_, int Rows, int Cols, int Supers, int Subs, int Options>
|
||||
class BandMatrix : public BandMatrixBase<BandMatrix<Scalar_,Rows,Cols,Supers,Subs,Options> >
|
||||
{
|
||||
public:
|
||||
|
||||
@ -233,32 +233,32 @@ class BandMatrix : public BandMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Sub
|
||||
internal::variable_if_dynamic<Index, Subs> m_subs;
|
||||
};
|
||||
|
||||
template<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>
|
||||
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
|
||||
class BandMatrixWrapper;
|
||||
|
||||
template<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>
|
||||
struct traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
|
||||
struct traits<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
{
|
||||
typedef typename _CoefficientsType::Scalar Scalar;
|
||||
typedef typename _CoefficientsType::StorageKind StorageKind;
|
||||
typedef typename _CoefficientsType::StorageIndex StorageIndex;
|
||||
enum {
|
||||
CoeffReadCost = internal::traits<_CoefficientsType>::CoeffReadCost,
|
||||
RowsAtCompileTime = _Rows,
|
||||
ColsAtCompileTime = _Cols,
|
||||
MaxRowsAtCompileTime = _Rows,
|
||||
MaxColsAtCompileTime = _Cols,
|
||||
RowsAtCompileTime = Rows_,
|
||||
ColsAtCompileTime = Cols_,
|
||||
MaxRowsAtCompileTime = Rows_,
|
||||
MaxColsAtCompileTime = Cols_,
|
||||
Flags = LvalueBit,
|
||||
Supers = _Supers,
|
||||
Subs = _Subs,
|
||||
Options = _Options,
|
||||
Supers = Supers_,
|
||||
Subs = Subs_,
|
||||
Options = Options_,
|
||||
DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic)) ? 1 + Supers + Subs : Dynamic
|
||||
};
|
||||
typedef _CoefficientsType CoefficientsType;
|
||||
};
|
||||
|
||||
template<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>
|
||||
class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
|
||||
class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
{
|
||||
public:
|
||||
|
||||
@ -266,7 +266,7 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT
|
||||
typedef typename internal::traits<BandMatrixWrapper>::CoefficientsType CoefficientsType;
|
||||
typedef typename internal::traits<BandMatrixWrapper>::StorageIndex StorageIndex;
|
||||
|
||||
explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs)
|
||||
explicit inline BandMatrixWrapper(const CoefficientsType& coeffs, Index rows=Rows_, Index cols=Cols_, Index supers=Supers_, Index subs=Subs_)
|
||||
: m_coeffs(coeffs),
|
||||
m_rows(rows), m_supers(supers), m_subs(subs)
|
||||
{
|
||||
@ -291,9 +291,9 @@ class BandMatrixWrapper : public BandMatrixBase<BandMatrixWrapper<_CoefficientsT
|
||||
protected:
|
||||
|
||||
const CoefficientsType& m_coeffs;
|
||||
internal::variable_if_dynamic<Index, _Rows> m_rows;
|
||||
internal::variable_if_dynamic<Index, _Supers> m_supers;
|
||||
internal::variable_if_dynamic<Index, _Subs> m_subs;
|
||||
internal::variable_if_dynamic<Index, Rows_> m_rows;
|
||||
internal::variable_if_dynamic<Index, Supers_> m_supers;
|
||||
internal::variable_if_dynamic<Index, Subs_> m_subs;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -330,16 +330,16 @@ class TridiagonalMatrix : public BandMatrix<Scalar,Size,Size,Options&SelfAdjoint
|
||||
|
||||
struct BandShape {};
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Supers, int _Subs, int _Options>
|
||||
struct evaluator_traits<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
: public evaluator_traits_base<BandMatrix<_Scalar,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Supers_, int Subs_, int Options_>
|
||||
struct evaluator_traits<BandMatrix<Scalar_,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
: public evaluator_traits_base<BandMatrix<Scalar_,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
{
|
||||
typedef BandShape Shape;
|
||||
};
|
||||
|
||||
template<typename _CoefficientsType,int _Rows, int _Cols, int _Supers, int _Subs,int _Options>
|
||||
struct evaluator_traits<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
: public evaluator_traits_base<BandMatrixWrapper<_CoefficientsType,_Rows,_Cols,_Supers,_Subs,_Options> >
|
||||
template<typename _CoefficientsType,int Rows_, int Cols_, int Supers_, int Subs_,int Options_>
|
||||
struct evaluator_traits<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
: public evaluator_traits_base<BandMatrixWrapper<_CoefficientsType,Rows_,Cols_,Supers_,Subs_,Options_> >
|
||||
{
|
||||
typedef BandShape Shape;
|
||||
};
|
||||
|
@ -201,12 +201,12 @@ struct plain_array_helper {
|
||||
*
|
||||
* \sa Matrix
|
||||
*/
|
||||
template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseStorage;
|
||||
template<typename T, int Size, int Rows_, int Cols_, int Options_> class DenseStorage;
|
||||
|
||||
// purely fixed-size matrix
|
||||
template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseStorage
|
||||
template<typename T, int Size, int Rows_, int Cols_, int Options_> class DenseStorage
|
||||
{
|
||||
internal::plain_array<T,Size,_Options> m_data;
|
||||
internal::plain_array<T,Size,Options_> m_data;
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() {
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = Size)
|
||||
@ -251,7 +251,7 @@ template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseSt
|
||||
#endif
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) {
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
eigen_internal_assert(size==rows*cols && rows==_Rows && cols==_Cols);
|
||||
eigen_internal_assert(size==rows*cols && rows==Rows_ && cols==Cols_);
|
||||
EIGEN_UNUSED_VARIABLE(size);
|
||||
EIGEN_UNUSED_VARIABLE(rows);
|
||||
EIGEN_UNUSED_VARIABLE(cols);
|
||||
@ -259,8 +259,8 @@ template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseSt
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {
|
||||
numext::swap(m_data, other.m_data);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return _Rows;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return _Cols;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return Cols_;}
|
||||
EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {}
|
||||
EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {}
|
||||
EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }
|
||||
@ -268,7 +268,7 @@ template<typename T, int Size, int _Rows, int _Cols, int _Options> class DenseSt
|
||||
};
|
||||
|
||||
// null matrix
|
||||
template<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0, _Rows, _Cols, _Options>
|
||||
template<typename T, int Rows_, int Cols_, int Options_> class DenseStorage<T, 0, Rows_, Cols_, Options_>
|
||||
{
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() {}
|
||||
@ -277,8 +277,8 @@ template<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0
|
||||
EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage&) { return *this; }
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index,Index,Index) {}
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& ) {}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return _Rows;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return _Cols;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) EIGEN_NOEXCEPT {return Cols_;}
|
||||
EIGEN_DEVICE_FUNC void conservativeResize(Index,Index,Index) {}
|
||||
EIGEN_DEVICE_FUNC void resize(Index,Index,Index) {}
|
||||
EIGEN_DEVICE_FUNC const T *data() const { return 0; }
|
||||
@ -286,19 +286,19 @@ template<typename T, int _Rows, int _Cols, int _Options> class DenseStorage<T, 0
|
||||
};
|
||||
|
||||
// more specializations for null matrices; these are necessary to resolve ambiguities
|
||||
template<typename T, int _Options> class DenseStorage<T, 0, Dynamic, Dynamic, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
template<typename T, int Options_> class DenseStorage<T, 0, Dynamic, Dynamic, Options_>
|
||||
: public DenseStorage<T, 0, 0, 0, Options_> { };
|
||||
|
||||
template<typename T, int _Rows, int _Options> class DenseStorage<T, 0, _Rows, Dynamic, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
template<typename T, int Rows_, int Options_> class DenseStorage<T, 0, Rows_, Dynamic, Options_>
|
||||
: public DenseStorage<T, 0, 0, 0, Options_> { };
|
||||
|
||||
template<typename T, int _Cols, int _Options> class DenseStorage<T, 0, Dynamic, _Cols, _Options>
|
||||
: public DenseStorage<T, 0, 0, 0, _Options> { };
|
||||
template<typename T, int Cols_, int Options_> class DenseStorage<T, 0, Dynamic, Cols_, Options_>
|
||||
: public DenseStorage<T, 0, 0, 0, Options_> { };
|
||||
|
||||
// dynamic-size matrix with fixed-size storage
|
||||
template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic, Dynamic, _Options>
|
||||
template<typename T, int Size, int Options_> class DenseStorage<T, Size, Dynamic, Dynamic, Options_>
|
||||
{
|
||||
internal::plain_array<T,Size,_Options> m_data;
|
||||
internal::plain_array<T,Size,Options_> m_data;
|
||||
Index m_rows;
|
||||
Index m_cols;
|
||||
public:
|
||||
@ -336,9 +336,9 @@ template<typename T, int Size, int _Options> class DenseStorage<T, Size, Dynamic
|
||||
};
|
||||
|
||||
// dynamic-size matrix with fixed-size storage and fixed width
|
||||
template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Size, Dynamic, _Cols, _Options>
|
||||
template<typename T, int Size, int Cols_, int Options_> class DenseStorage<T, Size, Dynamic, Cols_, Options_>
|
||||
{
|
||||
internal::plain_array<T,Size,_Options> m_data;
|
||||
internal::plain_array<T,Size,Options_> m_data;
|
||||
Index m_rows;
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() : m_rows(0) {}
|
||||
@ -347,7 +347,7 @@ template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Si
|
||||
EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)
|
||||
: m_data(internal::constructor_without_unaligned_array_assert()), m_rows(other.m_rows)
|
||||
{
|
||||
internal::plain_array_helper::copy(other.m_data, m_rows * _Cols, m_data);
|
||||
internal::plain_array_helper::copy(other.m_data, m_rows * Cols_, m_data);
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)
|
||||
@ -355,18 +355,18 @@ template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Si
|
||||
if (this != &other)
|
||||
{
|
||||
m_rows = other.m_rows;
|
||||
internal::plain_array_helper::copy(other.m_data, m_rows * _Cols, m_data);
|
||||
internal::plain_array_helper::copy(other.m_data, m_rows * Cols_, m_data);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index, Index rows, Index) : m_rows(rows) {}
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other)
|
||||
{
|
||||
internal::plain_array_helper::swap(m_data, m_rows * _Cols, other.m_data, other.m_rows * _Cols);
|
||||
internal::plain_array_helper::swap(m_data, m_rows * Cols_, other.m_data, other.m_rows * Cols_);
|
||||
numext::swap(m_rows, other.m_rows);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC Index rows(void) const EIGEN_NOEXCEPT {return m_rows;}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols(void) const EIGEN_NOEXCEPT {return _Cols;}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols(void) const EIGEN_NOEXCEPT {return Cols_;}
|
||||
EIGEN_DEVICE_FUNC void conservativeResize(Index, Index rows, Index) { m_rows = rows; }
|
||||
EIGEN_DEVICE_FUNC void resize(Index, Index rows, Index) { m_rows = rows; }
|
||||
EIGEN_DEVICE_FUNC const T *data() const { return m_data.array; }
|
||||
@ -374,9 +374,9 @@ template<typename T, int Size, int _Cols, int _Options> class DenseStorage<T, Si
|
||||
};
|
||||
|
||||
// dynamic-size matrix with fixed-size storage and fixed height
|
||||
template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Size, _Rows, Dynamic, _Options>
|
||||
template<typename T, int Size, int Rows_, int Options_> class DenseStorage<T, Size, Rows_, Dynamic, Options_>
|
||||
{
|
||||
internal::plain_array<T,Size,_Options> m_data;
|
||||
internal::plain_array<T,Size,Options_> m_data;
|
||||
Index m_cols;
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() : m_cols(0) {}
|
||||
@ -385,23 +385,23 @@ template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Si
|
||||
EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)
|
||||
: m_data(internal::constructor_without_unaligned_array_assert()), m_cols(other.m_cols)
|
||||
{
|
||||
internal::plain_array_helper::copy(other.m_data, _Rows * m_cols, m_data);
|
||||
internal::plain_array_helper::copy(other.m_data, Rows_ * m_cols, m_data);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
m_cols = other.m_cols;
|
||||
internal::plain_array_helper::copy(other.m_data, _Rows * m_cols, m_data);
|
||||
internal::plain_array_helper::copy(other.m_data, Rows_ * m_cols, m_data);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index, Index, Index cols) : m_cols(cols) {}
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {
|
||||
internal::plain_array_helper::swap(m_data, _Rows * m_cols, other.m_data, _Rows * other.m_cols);
|
||||
internal::plain_array_helper::swap(m_data, Rows_ * m_cols, other.m_data, Rows_ * other.m_cols);
|
||||
numext::swap(m_cols, other.m_cols);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows(void) const EIGEN_NOEXCEPT {return _Rows;}
|
||||
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows(void) const EIGEN_NOEXCEPT {return Rows_;}
|
||||
EIGEN_DEVICE_FUNC Index cols(void) const EIGEN_NOEXCEPT {return m_cols;}
|
||||
EIGEN_DEVICE_FUNC void conservativeResize(Index, Index, Index cols) { m_cols = cols; }
|
||||
EIGEN_DEVICE_FUNC void resize(Index, Index, Index cols) { m_cols = cols; }
|
||||
@ -410,7 +410,7 @@ template<typename T, int Size, int _Rows, int _Options> class DenseStorage<T, Si
|
||||
};
|
||||
|
||||
// purely dynamic matrix.
|
||||
template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynamic, _Options>
|
||||
template<typename T, int Options_> class DenseStorage<T, Dynamic, Dynamic, Dynamic, Options_>
|
||||
{
|
||||
T *m_data;
|
||||
Index m_rows;
|
||||
@ -420,13 +420,13 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
||||
EIGEN_DEVICE_FUNC explicit DenseStorage(internal::constructor_without_unaligned_array_assert)
|
||||
: m_data(0), m_rows(0), m_cols(0) {}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols)
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(rows), m_cols(cols)
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size)), m_rows(rows), m_cols(cols)
|
||||
{
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
eigen_internal_assert(size==rows*cols && rows>=0 && cols >=0);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(other.m_rows*other.m_cols))
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(other.m_rows*other.m_cols))
|
||||
, m_rows(other.m_rows)
|
||||
, m_cols(other.m_cols)
|
||||
{
|
||||
@ -462,7 +462,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols); }
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, m_rows*m_cols); }
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other)
|
||||
{
|
||||
numext::swap(m_data,other.m_data);
|
||||
@ -473,7 +473,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
||||
EIGEN_DEVICE_FUNC Index cols(void) const EIGEN_NOEXCEPT {return m_cols;}
|
||||
void conservativeResize(Index size, Index rows, Index cols)
|
||||
{
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*m_cols);
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(Options_&DontAlign)==0>(m_data, size, m_rows*m_cols);
|
||||
m_rows = rows;
|
||||
m_cols = cols;
|
||||
}
|
||||
@ -481,9 +481,9 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
||||
{
|
||||
if(size != m_rows*m_cols)
|
||||
{
|
||||
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols);
|
||||
internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, m_rows*m_cols);
|
||||
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
|
||||
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
|
||||
m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size);
|
||||
else
|
||||
m_data = 0;
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
@ -496,25 +496,25 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
|
||||
};
|
||||
|
||||
// matrix with dynamic width and fixed height (so that matrix has dynamic size).
|
||||
template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Rows, Dynamic, _Options>
|
||||
template<typename T, int Rows_, int Options_> class DenseStorage<T, Dynamic, Rows_, Dynamic, Options_>
|
||||
{
|
||||
T *m_data;
|
||||
Index m_cols;
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_cols(0) {}
|
||||
explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_cols(0) {}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_cols(cols)
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size)), m_cols(cols)
|
||||
{
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
eigen_internal_assert(size==rows*cols && rows==_Rows && cols >=0);
|
||||
eigen_internal_assert(size==rows*cols && rows==Rows_ && cols >=0);
|
||||
EIGEN_UNUSED_VARIABLE(rows);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(_Rows*other.m_cols))
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(Rows_*other.m_cols))
|
||||
, m_cols(other.m_cols)
|
||||
{
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_cols*_Rows)
|
||||
internal::smart_copy(other.m_data, other.m_data+_Rows*m_cols, m_data);
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_cols*Rows_)
|
||||
internal::smart_copy(other.m_data, other.m_data+Rows_*m_cols, m_data);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)
|
||||
{
|
||||
@ -542,25 +542,25 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols); }
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, Rows_*m_cols); }
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {
|
||||
numext::swap(m_data,other.m_data);
|
||||
numext::swap(m_cols,other.m_cols);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return _Rows;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index rows(void) EIGEN_NOEXCEPT {return Rows_;}
|
||||
EIGEN_DEVICE_FUNC Index cols(void) const EIGEN_NOEXCEPT {return m_cols;}
|
||||
EIGEN_DEVICE_FUNC void conservativeResize(Index size, Index, Index cols)
|
||||
{
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, _Rows*m_cols);
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(Options_&DontAlign)==0>(m_data, size, Rows_*m_cols);
|
||||
m_cols = cols;
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index, Index cols)
|
||||
{
|
||||
if(size != _Rows*m_cols)
|
||||
if(size != Rows_*m_cols)
|
||||
{
|
||||
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols);
|
||||
internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, Rows_*m_cols);
|
||||
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
|
||||
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
|
||||
m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size);
|
||||
else
|
||||
m_data = 0;
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
@ -572,25 +572,25 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro
|
||||
};
|
||||
|
||||
// matrix with dynamic height and fixed width (so that matrix has dynamic size).
|
||||
template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dynamic, _Cols, _Options>
|
||||
template<typename T, int Cols_, int Options_> class DenseStorage<T, Dynamic, Dynamic, Cols_, Options_>
|
||||
{
|
||||
T *m_data;
|
||||
Index m_rows;
|
||||
public:
|
||||
EIGEN_DEVICE_FUNC DenseStorage() : m_data(0), m_rows(0) {}
|
||||
explicit DenseStorage(internal::constructor_without_unaligned_array_assert) : m_data(0), m_rows(0) {}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size)), m_rows(rows)
|
||||
EIGEN_DEVICE_FUNC DenseStorage(Index size, Index rows, Index cols) : m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size)), m_rows(rows)
|
||||
{
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
eigen_internal_assert(size==rows*cols && rows>=0 && cols == _Cols);
|
||||
eigen_internal_assert(size==rows*cols && rows>=0 && cols == Cols_);
|
||||
EIGEN_UNUSED_VARIABLE(cols);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage(const DenseStorage& other)
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(other.m_rows*_Cols))
|
||||
: m_data(internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(other.m_rows*Cols_))
|
||||
, m_rows(other.m_rows)
|
||||
{
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*_Cols)
|
||||
internal::smart_copy(other.m_data, other.m_data+other.m_rows*_Cols, m_data);
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(Index size = m_rows*Cols_)
|
||||
internal::smart_copy(other.m_data, other.m_data+other.m_rows*Cols_, m_data);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC DenseStorage& operator=(const DenseStorage& other)
|
||||
{
|
||||
@ -618,25 +618,25 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows); }
|
||||
EIGEN_DEVICE_FUNC ~DenseStorage() { internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, Cols_*m_rows); }
|
||||
EIGEN_DEVICE_FUNC void swap(DenseStorage& other) {
|
||||
numext::swap(m_data,other.m_data);
|
||||
numext::swap(m_rows,other.m_rows);
|
||||
}
|
||||
EIGEN_DEVICE_FUNC Index rows(void) const EIGEN_NOEXCEPT {return m_rows;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) {return _Cols;}
|
||||
EIGEN_DEVICE_FUNC static EIGEN_CONSTEXPR Index cols(void) {return Cols_;}
|
||||
void conservativeResize(Index size, Index rows, Index)
|
||||
{
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(_Options&DontAlign)==0>(m_data, size, m_rows*_Cols);
|
||||
m_data = internal::conditional_aligned_realloc_new_auto<T,(Options_&DontAlign)==0>(m_data, size, m_rows*Cols_);
|
||||
m_rows = rows;
|
||||
}
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index size, Index rows, Index)
|
||||
{
|
||||
if(size != m_rows*_Cols)
|
||||
if(size != m_rows*Cols_)
|
||||
{
|
||||
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows);
|
||||
internal::conditional_aligned_delete_auto<T,(Options_&DontAlign)==0>(m_data, Cols_*m_rows);
|
||||
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
|
||||
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
|
||||
m_data = internal::conditional_aligned_new_auto<T,(Options_&DontAlign)==0>(size);
|
||||
else
|
||||
m_data = 0;
|
||||
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
|
||||
|
@ -60,12 +60,12 @@ struct traits<Diagonal<MatrixType,DiagIndex> >
|
||||
};
|
||||
}
|
||||
|
||||
template<typename MatrixType, int _DiagIndex> class Diagonal
|
||||
: public internal::dense_xpr_base< Diagonal<MatrixType,_DiagIndex> >::type
|
||||
template<typename MatrixType, int DiagIndex_> class Diagonal
|
||||
: public internal::dense_xpr_base< Diagonal<MatrixType,DiagIndex_> >::type
|
||||
{
|
||||
public:
|
||||
|
||||
enum { DiagIndex = _DiagIndex };
|
||||
enum { DiagIndex = DiagIndex_ };
|
||||
typedef typename internal::dense_xpr_base<Diagonal>::type Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal)
|
||||
|
||||
|
@ -116,7 +116,7 @@ class DiagonalBase : public EigenBase<Derived>
|
||||
*
|
||||
* \brief Represents a diagonal matrix with its storage
|
||||
*
|
||||
* \param _Scalar the type of coefficients
|
||||
* \param Scalar_ the type of coefficients
|
||||
* \param SizeAtCompileTime the dimension of the matrix, or Dynamic
|
||||
* \param MaxSizeAtCompileTime the dimension of the matrix, or Dynamic. This parameter is optional and defaults
|
||||
* to SizeAtCompileTime. Most of the time, you do not need to specify it.
|
||||
@ -125,26 +125,26 @@ class DiagonalBase : public EigenBase<Derived>
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
||||
struct traits<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
: traits<Matrix<_Scalar,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
template<typename Scalar_, int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
||||
struct traits<DiagonalMatrix<Scalar_,SizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
: traits<Matrix<Scalar_,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
{
|
||||
typedef Matrix<_Scalar,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1> DiagonalVectorType;
|
||||
typedef Matrix<Scalar_,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1> DiagonalVectorType;
|
||||
typedef DiagonalShape StorageKind;
|
||||
enum {
|
||||
Flags = LvalueBit | NoPreferredStorageOrderBit
|
||||
};
|
||||
};
|
||||
}
|
||||
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
||||
template<typename Scalar_, int SizeAtCompileTime, int MaxSizeAtCompileTime>
|
||||
class DiagonalMatrix
|
||||
: public DiagonalBase<DiagonalMatrix<_Scalar,SizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
: public DiagonalBase<DiagonalMatrix<Scalar_,SizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
{
|
||||
public:
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
typedef typename internal::traits<DiagonalMatrix>::DiagonalVectorType DiagonalVectorType;
|
||||
typedef const DiagonalMatrix& Nested;
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename internal::traits<DiagonalMatrix>::StorageKind StorageKind;
|
||||
typedef typename internal::traits<DiagonalMatrix>::StorageIndex StorageIndex;
|
||||
#endif
|
||||
@ -261,7 +261,7 @@ class DiagonalMatrix
|
||||
*
|
||||
* \brief Expression of a diagonal matrix
|
||||
*
|
||||
* \param _DiagonalVectorType the type of the vector of diagonal coefficients
|
||||
* \param DiagonalVectorType_ the type of the vector of diagonal coefficients
|
||||
*
|
||||
* This class is an expression of a diagonal matrix, but not storing its own vector of diagonal coefficients,
|
||||
* instead wrapping an existing vector expression. It is the return type of MatrixBase::asDiagonal()
|
||||
@ -271,10 +271,10 @@ class DiagonalMatrix
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _DiagonalVectorType>
|
||||
struct traits<DiagonalWrapper<_DiagonalVectorType> >
|
||||
template<typename DiagonalVectorType_>
|
||||
struct traits<DiagonalWrapper<DiagonalVectorType_> >
|
||||
{
|
||||
typedef _DiagonalVectorType DiagonalVectorType;
|
||||
typedef DiagonalVectorType_ DiagonalVectorType;
|
||||
typedef typename DiagonalVectorType::Scalar Scalar;
|
||||
typedef typename DiagonalVectorType::StorageIndex StorageIndex;
|
||||
typedef DiagonalShape StorageKind;
|
||||
@ -289,13 +289,13 @@ struct traits<DiagonalWrapper<_DiagonalVectorType> >
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _DiagonalVectorType>
|
||||
template<typename DiagonalVectorType_>
|
||||
class DiagonalWrapper
|
||||
: public DiagonalBase<DiagonalWrapper<_DiagonalVectorType> >, internal::no_assignment_operator
|
||||
: public DiagonalBase<DiagonalWrapper<DiagonalVectorType_> >, internal::no_assignment_operator
|
||||
{
|
||||
public:
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
typedef _DiagonalVectorType DiagonalVectorType;
|
||||
typedef DiagonalVectorType_ DiagonalVectorType;
|
||||
typedef DiagonalWrapper Nested;
|
||||
#endif
|
||||
|
||||
|
@ -14,34 +14,34 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct traits<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct traits<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
{
|
||||
private:
|
||||
enum { size = internal::size_at_compile_time<_Rows,_Cols>::ret };
|
||||
typedef typename find_best_packet<_Scalar,size>::type PacketScalar;
|
||||
enum { size = internal::size_at_compile_time<Rows_,Cols_>::ret };
|
||||
typedef typename find_best_packet<Scalar_,size>::type PacketScalar;
|
||||
enum {
|
||||
row_major_bit = _Options&RowMajor ? RowMajorBit : 0,
|
||||
is_dynamic_size_storage = _MaxRows==Dynamic || _MaxCols==Dynamic,
|
||||
max_size = is_dynamic_size_storage ? Dynamic : _MaxRows*_MaxCols,
|
||||
default_alignment = compute_default_alignment<_Scalar,max_size>::value,
|
||||
actual_alignment = ((_Options&DontAlign)==0) ? default_alignment : 0,
|
||||
row_major_bit = Options_&RowMajor ? RowMajorBit : 0,
|
||||
is_dynamic_size_storage = MaxRows_==Dynamic || MaxCols_==Dynamic,
|
||||
max_size = is_dynamic_size_storage ? Dynamic : MaxRows_*MaxCols_,
|
||||
default_alignment = compute_default_alignment<Scalar_,max_size>::value,
|
||||
actual_alignment = ((Options_&DontAlign)==0) ? default_alignment : 0,
|
||||
required_alignment = unpacket_traits<PacketScalar>::alignment,
|
||||
packet_access_bit = (packet_traits<_Scalar>::Vectorizable && (EIGEN_UNALIGNED_VECTORIZE || (actual_alignment>=required_alignment))) ? PacketAccessBit : 0
|
||||
packet_access_bit = (packet_traits<Scalar_>::Vectorizable && (EIGEN_UNALIGNED_VECTORIZE || (actual_alignment>=required_alignment))) ? PacketAccessBit : 0
|
||||
};
|
||||
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Dense StorageKind;
|
||||
typedef Eigen::Index StorageIndex;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = _Rows,
|
||||
ColsAtCompileTime = _Cols,
|
||||
MaxRowsAtCompileTime = _MaxRows,
|
||||
MaxColsAtCompileTime = _MaxCols,
|
||||
Flags = compute_matrix_flags<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::ret,
|
||||
Options = _Options,
|
||||
RowsAtCompileTime = Rows_,
|
||||
ColsAtCompileTime = Cols_,
|
||||
MaxRowsAtCompileTime = MaxRows_,
|
||||
MaxColsAtCompileTime = MaxCols_,
|
||||
Flags = compute_matrix_flags<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>::ret,
|
||||
Options = Options_,
|
||||
InnerStrideAtCompileTime = 1,
|
||||
OuterStrideAtCompileTime = (Options&RowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
|
||||
|
||||
@ -63,18 +63,18 @@ public:
|
||||
* The %Matrix class encompasses \em both fixed-size and dynamic-size objects (\ref fixedsize "note").
|
||||
*
|
||||
* The first three template parameters are required:
|
||||
* \tparam _Scalar Numeric type, e.g. float, double, int or std::complex<float>.
|
||||
* \tparam Scalar_ Numeric type, e.g. float, double, int or std::complex<float>.
|
||||
* User defined scalar types are supported as well (see \ref user_defined_scalars "here").
|
||||
* \tparam _Rows Number of rows, or \b Dynamic
|
||||
* \tparam _Cols Number of columns, or \b Dynamic
|
||||
* \tparam Rows_ Number of rows, or \b Dynamic
|
||||
* \tparam Cols_ Number of columns, or \b Dynamic
|
||||
*
|
||||
* The remaining template parameters are optional -- in most cases you don't have to worry about them.
|
||||
* \tparam _Options A combination of either \b #RowMajor or \b #ColMajor, and of either
|
||||
* \tparam Options_ A combination of either \b #RowMajor or \b #ColMajor, and of either
|
||||
* \b #AutoAlign or \b #DontAlign.
|
||||
* The former controls \ref TopicStorageOrders "storage order", and defaults to column-major. The latter controls alignment, which is required
|
||||
* for vectorization. It defaults to aligning matrices except for fixed sizes that aren't a multiple of the packet size.
|
||||
* \tparam _MaxRows Maximum number of rows. Defaults to \a _Rows (\ref maxrows "note").
|
||||
* \tparam _MaxCols Maximum number of columns. Defaults to \a _Cols (\ref maxrows "note").
|
||||
* \tparam MaxRows_ Maximum number of rows. Defaults to \a Rows_ (\ref maxrows "note").
|
||||
* \tparam MaxCols_ Maximum number of columns. Defaults to \a Cols_ (\ref maxrows "note").
|
||||
*
|
||||
* Eigen provides a number of typedefs covering the usual cases. Here are some examples:
|
||||
*
|
||||
@ -128,12 +128,12 @@ public:
|
||||
* Note that \em dense matrices, be they Fixed-size or Dynamic-size, <em>do not</em> expand dynamically in the sense of a std::map.
|
||||
* If you want this behavior, see the Sparse module.</dd>
|
||||
*
|
||||
* <dt><b>\anchor maxrows _MaxRows and _MaxCols:</b></dt>
|
||||
* <dt><b>\anchor maxrows MaxRows_ and MaxCols_:</b></dt>
|
||||
* <dd>In most cases, one just leaves these parameters to the default values.
|
||||
* These parameters mean the maximum size of rows and columns that the matrix may have. They are useful in cases
|
||||
* when the exact numbers of rows and columns are not known are compile-time, but it is known at compile-time that they cannot
|
||||
* exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case _MaxRows and _MaxCols
|
||||
* are the dimensions of the original matrix, while _Rows and _Cols are Dynamic.</dd>
|
||||
* exceed a certain value. This happens when taking dynamic-size blocks inside fixed-size matrices: in this case MaxRows_ and MaxCols_
|
||||
* are the dimensions of the original matrix, while Rows_ and Cols_ are Dynamic.</dd>
|
||||
* </dl>
|
||||
*
|
||||
* <i><b>ABI and storage layout</b></i>
|
||||
@ -174,9 +174,9 @@ public:
|
||||
* \ref TopicStorageOrders
|
||||
*/
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
class Matrix
|
||||
: public PlainObjectBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
: public PlainObjectBase<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
{
|
||||
public:
|
||||
|
||||
@ -185,7 +185,7 @@ class Matrix
|
||||
*/
|
||||
typedef PlainObjectBase<Matrix> Base;
|
||||
|
||||
enum { Options = _Options };
|
||||
enum { Options = Options_ };
|
||||
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Matrix)
|
||||
|
||||
|
@ -252,15 +252,15 @@ template<> struct NumTraits<long double>
|
||||
static inline long double dummy_precision() { return 1e-15l; }
|
||||
};
|
||||
|
||||
template<typename _Real> struct NumTraits<std::complex<_Real> >
|
||||
: GenericNumTraits<std::complex<_Real> >
|
||||
template<typename Real_> struct NumTraits<std::complex<Real_> >
|
||||
: GenericNumTraits<std::complex<Real_> >
|
||||
{
|
||||
typedef _Real Real;
|
||||
typedef typename NumTraits<_Real>::Literal Literal;
|
||||
typedef Real_ Real;
|
||||
typedef typename NumTraits<Real_>::Literal Literal;
|
||||
enum {
|
||||
IsComplex = 1,
|
||||
RequireInitialization = NumTraits<_Real>::RequireInitialization,
|
||||
ReadCost = 2 * NumTraits<_Real>::ReadCost,
|
||||
RequireInitialization = NumTraits<Real_>::RequireInitialization,
|
||||
ReadCost = 2 * NumTraits<Real_>::ReadCost,
|
||||
AddCost = 2 * NumTraits<Real>::AddCost,
|
||||
MulCost = 4 * NumTraits<Real>::MulCost + 2 * NumTraits<Real>::AddCost
|
||||
};
|
||||
|
@ -269,13 +269,13 @@ class PermutationBase : public EigenBase<Derived>
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
|
||||
struct traits<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex> >
|
||||
: traits<Matrix<_StorageIndex,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_>
|
||||
struct traits<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_> >
|
||||
: traits<Matrix<StorageIndex_,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
{
|
||||
typedef PermutationStorage StorageKind;
|
||||
typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef void Scalar;
|
||||
};
|
||||
}
|
||||
@ -287,14 +287,14 @@ struct traits<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _Storag
|
||||
*
|
||||
* \tparam SizeAtCompileTime the number of rows/cols, or Dynamic
|
||||
* \tparam MaxSizeAtCompileTime the maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.
|
||||
* \tparam _StorageIndex the integer type of the indices
|
||||
* \tparam StorageIndex_ the integer type of the indices
|
||||
*
|
||||
* This class represents a permutation matrix, internally stored as a vector of integers.
|
||||
*
|
||||
* \sa class PermutationBase, class PermutationWrapper, class DiagonalMatrix
|
||||
*/
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
|
||||
class PermutationMatrix : public PermutationBase<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_>
|
||||
class PermutationMatrix : public PermutationBase<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_> >
|
||||
{
|
||||
typedef PermutationBase<PermutationMatrix> Base;
|
||||
typedef internal::traits<PermutationMatrix> Traits;
|
||||
@ -389,20 +389,20 @@ class PermutationMatrix : public PermutationBase<PermutationMatrix<SizeAtCompile
|
||||
|
||||
|
||||
namespace internal {
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>
|
||||
struct traits<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess> >
|
||||
: traits<Matrix<_StorageIndex,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
|
||||
struct traits<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess> >
|
||||
: traits<Matrix<StorageIndex_,SizeAtCompileTime,SizeAtCompileTime,0,MaxSizeAtCompileTime,MaxSizeAtCompileTime> >
|
||||
{
|
||||
typedef PermutationStorage StorageKind;
|
||||
typedef Map<const Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1>, _PacketAccess> IndicesType;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Map<const Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1>, _PacketAccess> IndicesType;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef void Scalar;
|
||||
};
|
||||
}
|
||||
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>
|
||||
class Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess>
|
||||
: public PermutationBase<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex>,_PacketAccess> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
|
||||
class Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess>
|
||||
: public PermutationBase<Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_>,_PacketAccess> >
|
||||
{
|
||||
typedef PermutationBase<Map> Base;
|
||||
typedef internal::traits<Map> Traits;
|
||||
@ -452,18 +452,18 @@ class Map<PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, _StorageInd
|
||||
IndicesType m_indices;
|
||||
};
|
||||
|
||||
template<typename _IndicesType> class TranspositionsWrapper;
|
||||
template<typename IndicesType_> class TranspositionsWrapper;
|
||||
namespace internal {
|
||||
template<typename _IndicesType>
|
||||
struct traits<PermutationWrapper<_IndicesType> >
|
||||
template<typename IndicesType_>
|
||||
struct traits<PermutationWrapper<IndicesType_> >
|
||||
{
|
||||
typedef PermutationStorage StorageKind;
|
||||
typedef void Scalar;
|
||||
typedef typename _IndicesType::Scalar StorageIndex;
|
||||
typedef _IndicesType IndicesType;
|
||||
typedef typename IndicesType_::Scalar StorageIndex;
|
||||
typedef IndicesType_ IndicesType;
|
||||
enum {
|
||||
RowsAtCompileTime = _IndicesType::SizeAtCompileTime,
|
||||
ColsAtCompileTime = _IndicesType::SizeAtCompileTime,
|
||||
RowsAtCompileTime = IndicesType_::SizeAtCompileTime,
|
||||
ColsAtCompileTime = IndicesType_::SizeAtCompileTime,
|
||||
MaxRowsAtCompileTime = IndicesType::MaxSizeAtCompileTime,
|
||||
MaxColsAtCompileTime = IndicesType::MaxSizeAtCompileTime,
|
||||
Flags = 0
|
||||
@ -476,14 +476,14 @@ struct traits<PermutationWrapper<_IndicesType> >
|
||||
*
|
||||
* \brief Class to view a vector of integers as a permutation matrix
|
||||
*
|
||||
* \tparam _IndicesType the type of the vector of integer (can be any compatible expression)
|
||||
* \tparam IndicesType_ the type of the vector of integer (can be any compatible expression)
|
||||
*
|
||||
* This class allows to view any vector expression of integers as a permutation matrix.
|
||||
*
|
||||
* \sa class PermutationBase, class PermutationMatrix
|
||||
*/
|
||||
template<typename _IndicesType>
|
||||
class PermutationWrapper : public PermutationBase<PermutationWrapper<_IndicesType> >
|
||||
template<typename IndicesType_>
|
||||
class PermutationWrapper : public PermutationBase<PermutationWrapper<IndicesType_> >
|
||||
{
|
||||
typedef PermutationBase<PermutationWrapper> Base;
|
||||
typedef internal::traits<PermutationWrapper> Traits;
|
||||
|
@ -64,18 +64,18 @@ namespace doxygen {
|
||||
// This is a workaround to doxygen not being able to understand the inheritance logic
|
||||
// when it is hidden by the dense_xpr_base helper struct.
|
||||
// Moreover, doxygen fails to include members that are not documented in the declaration body of
|
||||
// MatrixBase if we inherits MatrixBase<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >,
|
||||
// MatrixBase if we inherits MatrixBase<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >,
|
||||
// this is why we simply inherits MatrixBase, though this does not make sense.
|
||||
|
||||
/** This class is just a workaround for Doxygen and it does not not actually exist. */
|
||||
template<typename Derived> struct dense_xpr_base_dispatcher;
|
||||
/** This class is just a workaround for Doxygen and it does not not actually exist. */
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct dense_xpr_base_dispatcher<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct dense_xpr_base_dispatcher<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
: public MatrixBase {};
|
||||
/** This class is just a workaround for Doxygen and it does not not actually exist. */
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct dense_xpr_base_dispatcher<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct dense_xpr_base_dispatcher<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
: public ArrayBase {};
|
||||
|
||||
} // namespace doxygen
|
||||
|
@ -58,8 +58,8 @@ struct traits<Product<Lhs, Rhs, Option> >
|
||||
*
|
||||
* \brief Expression of the product of two arbitrary matrices or vectors
|
||||
*
|
||||
* \tparam _Lhs the type of the left-hand side expression
|
||||
* \tparam _Rhs the type of the right-hand side expression
|
||||
* \tparam Lhs_ the type of the left-hand side expression
|
||||
* \tparam Rhs_ the type of the right-hand side expression
|
||||
*
|
||||
* This class represents an expression of the product of two arbitrary matrices.
|
||||
*
|
||||
@ -67,16 +67,16 @@ struct traits<Product<Lhs, Rhs, Option> >
|
||||
* \tparam Option can be DefaultProduct, AliasFreeProduct, or LazyProduct
|
||||
*
|
||||
*/
|
||||
template<typename _Lhs, typename _Rhs, int Option>
|
||||
class Product : public ProductImpl<_Lhs,_Rhs,Option,
|
||||
typename internal::product_promote_storage_type<typename internal::traits<_Lhs>::StorageKind,
|
||||
typename internal::traits<_Rhs>::StorageKind,
|
||||
internal::product_type<_Lhs,_Rhs>::ret>::ret>
|
||||
template<typename Lhs_, typename Rhs_, int Option>
|
||||
class Product : public ProductImpl<Lhs_,Rhs_,Option,
|
||||
typename internal::product_promote_storage_type<typename internal::traits<Lhs_>::StorageKind,
|
||||
typename internal::traits<Rhs_>::StorageKind,
|
||||
internal::product_type<Lhs_,Rhs_>::ret>::ret>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _Lhs Lhs;
|
||||
typedef _Rhs Rhs;
|
||||
typedef Lhs_ Lhs;
|
||||
typedef Rhs_ Rhs;
|
||||
|
||||
typedef typename ProductImpl<
|
||||
Lhs, Rhs, Option,
|
||||
|
@ -836,13 +836,13 @@ public:
|
||||
MatrixFlags = evaluator<MatrixType>::Flags,
|
||||
DiagFlags = evaluator<DiagonalType>::Flags,
|
||||
|
||||
_StorageOrder = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor
|
||||
StorageOrder_ = (Derived::MaxRowsAtCompileTime==1 && Derived::MaxColsAtCompileTime!=1) ? RowMajor
|
||||
: (Derived::MaxColsAtCompileTime==1 && Derived::MaxRowsAtCompileTime!=1) ? ColMajor
|
||||
: MatrixFlags & RowMajorBit ? RowMajor : ColMajor,
|
||||
_SameStorageOrder = _StorageOrder == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor),
|
||||
_SameStorageOrder = StorageOrder_ == (MatrixFlags & RowMajorBit ? RowMajor : ColMajor),
|
||||
|
||||
_ScalarAccessOnDiag = !((int(_StorageOrder) == ColMajor && int(ProductOrder) == OnTheLeft)
|
||||
||(int(_StorageOrder) == RowMajor && int(ProductOrder) == OnTheRight)),
|
||||
_ScalarAccessOnDiag = !((int(StorageOrder_) == ColMajor && int(ProductOrder) == OnTheLeft)
|
||||
||(int(StorageOrder_) == RowMajor && int(ProductOrder) == OnTheRight)),
|
||||
_SameTypes = is_same<typename MatrixType::Scalar, typename DiagonalType::Scalar>::value,
|
||||
// FIXME currently we need same types, but in the future the next rule should be the one
|
||||
//_Vectorizable = bool(int(MatrixFlags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagFlags)&PacketAccessBit))),
|
||||
@ -913,7 +913,7 @@ struct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DiagonalSha
|
||||
typedef typename Lhs::DiagonalVectorType DiagonalType;
|
||||
|
||||
|
||||
enum { StorageOrder = Base::_StorageOrder };
|
||||
enum { StorageOrder = Base::StorageOrder_ };
|
||||
|
||||
EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)
|
||||
: Base(xpr.rhs(), xpr.lhs().diagonal())
|
||||
@ -957,7 +957,7 @@ struct product_evaluator<Product<Lhs, Rhs, ProductKind>, ProductTag, DenseShape,
|
||||
typedef Product<Lhs, Rhs, ProductKind> XprType;
|
||||
typedef typename XprType::PlainObject PlainObject;
|
||||
|
||||
enum { StorageOrder = Base::_StorageOrder };
|
||||
enum { StorageOrder = Base::StorageOrder_ };
|
||||
|
||||
EIGEN_DEVICE_FUNC explicit product_evaluator(const XprType& xpr)
|
||||
: Base(xpr.lhs(), xpr.rhs().diagonal())
|
||||
|
@ -353,12 +353,12 @@ struct redux_impl<Func, Evaluator, LinearVectorizedTraversal, CompleteUnrolling>
|
||||
};
|
||||
|
||||
// evaluator adaptor
|
||||
template<typename _XprType>
|
||||
class redux_evaluator : public internal::evaluator<_XprType>
|
||||
template<typename XprType_>
|
||||
class redux_evaluator : public internal::evaluator<XprType_>
|
||||
{
|
||||
typedef internal::evaluator<_XprType> Base;
|
||||
typedef internal::evaluator<XprType_> Base;
|
||||
public:
|
||||
typedef _XprType XprType;
|
||||
typedef XprType_ XprType;
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
explicit redux_evaluator(const XprType &xpr) : Base(xpr) {}
|
||||
|
||||
|
@ -14,16 +14,16 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _PlainObjectType, int _Options, typename _StrideType>
|
||||
struct traits<Ref<_PlainObjectType, _Options, _StrideType> >
|
||||
: public traits<Map<_PlainObjectType, _Options, _StrideType> >
|
||||
template<typename _PlainObjectType, int Options_, typename _StrideType>
|
||||
struct traits<Ref<_PlainObjectType, Options_, _StrideType> >
|
||||
: public traits<Map<_PlainObjectType, Options_, _StrideType> >
|
||||
{
|
||||
typedef _PlainObjectType PlainObjectType;
|
||||
typedef _StrideType StrideType;
|
||||
enum {
|
||||
Options = _Options,
|
||||
Flags = traits<Map<_PlainObjectType, _Options, _StrideType> >::Flags | NestByRefBit,
|
||||
Alignment = traits<Map<_PlainObjectType, _Options, _StrideType> >::Alignment
|
||||
Options = Options_,
|
||||
Flags = traits<Map<_PlainObjectType, Options_, _StrideType> >::Flags | NestByRefBit,
|
||||
Alignment = traits<Map<_PlainObjectType, Options_, _StrideType> >::Alignment
|
||||
};
|
||||
|
||||
template<typename Derived> struct match {
|
||||
|
@ -46,12 +46,12 @@ struct traits<SelfAdjointView<MatrixType, UpLo> > : traits<MatrixType>
|
||||
}
|
||||
|
||||
|
||||
template<typename _MatrixType, unsigned int UpLo> class SelfAdjointView
|
||||
: public TriangularBase<SelfAdjointView<_MatrixType, UpLo> >
|
||||
template<typename MatrixType_, unsigned int UpLo> class SelfAdjointView
|
||||
: public TriangularBase<SelfAdjointView<MatrixType_, UpLo> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef TriangularBase<SelfAdjointView> Base;
|
||||
typedef typename internal::traits<SelfAdjointView>::MatrixTypeNested MatrixTypeNested;
|
||||
typedef typename internal::traits<SelfAdjointView>::MatrixTypeNestedCleaned MatrixTypeNestedCleaned;
|
||||
|
@ -256,10 +256,10 @@ protected:
|
||||
internal::variable_if_dynamic<Index, XprType::InnerStrideAtCompileTime> m_incr;
|
||||
};
|
||||
|
||||
template<typename _XprType>
|
||||
struct indexed_based_stl_iterator_traits<generic_randaccess_stl_iterator<_XprType> >
|
||||
template<typename XprType_>
|
||||
struct indexed_based_stl_iterator_traits<generic_randaccess_stl_iterator<XprType_> >
|
||||
{
|
||||
typedef _XprType XprType;
|
||||
typedef XprType_ XprType;
|
||||
typedef generic_randaccess_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator;
|
||||
typedef generic_randaccess_stl_iterator<typename internal::add_const<XprType>::type> const_iterator;
|
||||
};
|
||||
@ -301,10 +301,10 @@ public:
|
||||
pointer operator->() const { return &((*mp_xpr)(m_index)); }
|
||||
};
|
||||
|
||||
template<typename _XprType, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_iterator<_XprType,Direction> >
|
||||
template<typename XprType_, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_iterator<XprType_,Direction> >
|
||||
{
|
||||
typedef _XprType XprType;
|
||||
typedef XprType_ XprType;
|
||||
typedef subvector_stl_iterator<typename internal::remove_const<XprType>::type, Direction> non_const_iterator;
|
||||
typedef subvector_stl_iterator<typename internal::add_const<XprType>::type, Direction> const_iterator;
|
||||
};
|
||||
@ -349,10 +349,10 @@ public:
|
||||
pointer operator->() const { return (*mp_xpr).template subVector<Direction>(m_index); }
|
||||
};
|
||||
|
||||
template<typename _XprType, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_reverse_iterator<_XprType,Direction> >
|
||||
template<typename XprType_, DirectionType Direction>
|
||||
struct indexed_based_stl_iterator_traits<subvector_stl_reverse_iterator<XprType_,Direction> >
|
||||
{
|
||||
typedef _XprType XprType;
|
||||
typedef XprType_ XprType;
|
||||
typedef subvector_stl_reverse_iterator<typename internal::remove_const<XprType>::type, Direction> non_const_iterator;
|
||||
typedef subvector_stl_reverse_iterator<typename internal::add_const<XprType>::type, Direction> const_iterator;
|
||||
};
|
||||
|
@ -31,8 +31,8 @@ namespace Eigen {
|
||||
* arguments to the constructor.
|
||||
*
|
||||
* Indeed, this class takes two template parameters:
|
||||
* \tparam _OuterStrideAtCompileTime the outer stride, or Dynamic if you want to specify it at runtime.
|
||||
* \tparam _InnerStrideAtCompileTime the inner stride, or Dynamic if you want to specify it at runtime.
|
||||
* \tparam OuterStrideAtCompileTime_ the outer stride, or Dynamic if you want to specify it at runtime.
|
||||
* \tparam InnerStrideAtCompileTime_ the inner stride, or Dynamic if you want to specify it at runtime.
|
||||
*
|
||||
* Here is an example:
|
||||
* \include Map_general_stride.cpp
|
||||
@ -44,14 +44,14 @@ namespace Eigen {
|
||||
*
|
||||
* \sa class InnerStride, class OuterStride, \ref TopicStorageOrders
|
||||
*/
|
||||
template<int _OuterStrideAtCompileTime, int _InnerStrideAtCompileTime>
|
||||
template<int OuterStrideAtCompileTime_, int InnerStrideAtCompileTime_>
|
||||
class Stride
|
||||
{
|
||||
public:
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
enum {
|
||||
InnerStrideAtCompileTime = _InnerStrideAtCompileTime,
|
||||
OuterStrideAtCompileTime = _OuterStrideAtCompileTime
|
||||
InnerStrideAtCompileTime = InnerStrideAtCompileTime_,
|
||||
OuterStrideAtCompileTime = OuterStrideAtCompileTime_
|
||||
};
|
||||
|
||||
/** Default constructor, for use when strides are fixed at compile time */
|
||||
|
@ -113,11 +113,11 @@ class TranspositionsBase
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
|
||||
struct traits<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
|
||||
: traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_>
|
||||
struct traits<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
|
||||
: traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
|
||||
{
|
||||
typedef Matrix<_StorageIndex, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;
|
||||
typedef Matrix<StorageIndex_, SizeAtCompileTime, 1, 0, MaxSizeAtCompileTime, 1> IndicesType;
|
||||
typedef TranspositionsStorage StorageKind;
|
||||
};
|
||||
}
|
||||
@ -151,8 +151,8 @@ struct traits<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageInde
|
||||
* \sa class PermutationMatrix
|
||||
*/
|
||||
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex>
|
||||
class Transpositions : public TranspositionsBase<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_>
|
||||
class Transpositions : public TranspositionsBase<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
|
||||
{
|
||||
typedef internal::traits<Transpositions> Traits;
|
||||
public:
|
||||
@ -199,19 +199,19 @@ class Transpositions : public TranspositionsBase<Transpositions<SizeAtCompileTim
|
||||
|
||||
|
||||
namespace internal {
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int _PacketAccess>
|
||||
struct traits<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,_PacketAccess> >
|
||||
: traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int _PacketAccess>
|
||||
struct traits<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,_PacketAccess> >
|
||||
: traits<PermutationMatrix<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_> >
|
||||
{
|
||||
typedef Map<const Matrix<_StorageIndex,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1>, _PacketAccess> IndicesType;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Map<const Matrix<StorageIndex_,SizeAtCompileTime,1,0,MaxSizeAtCompileTime,1>, _PacketAccess> IndicesType;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef TranspositionsStorage StorageKind;
|
||||
};
|
||||
}
|
||||
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename _StorageIndex, int PacketAccess>
|
||||
class Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess>
|
||||
: public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,PacketAccess> >
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_, int PacketAccess>
|
||||
class Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,PacketAccess>
|
||||
: public TranspositionsBase<Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,StorageIndex_>,PacketAccess> >
|
||||
{
|
||||
typedef internal::traits<Map> Traits;
|
||||
public:
|
||||
@ -260,17 +260,17 @@ class Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndex>,P
|
||||
};
|
||||
|
||||
namespace internal {
|
||||
template<typename _IndicesType>
|
||||
struct traits<TranspositionsWrapper<_IndicesType> >
|
||||
: traits<PermutationWrapper<_IndicesType> >
|
||||
template<typename IndicesType_>
|
||||
struct traits<TranspositionsWrapper<IndicesType_> >
|
||||
: traits<PermutationWrapper<IndicesType_> >
|
||||
{
|
||||
typedef TranspositionsStorage StorageKind;
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _IndicesType>
|
||||
template<typename IndicesType_>
|
||||
class TranspositionsWrapper
|
||||
: public TranspositionsBase<TranspositionsWrapper<_IndicesType> >
|
||||
: public TranspositionsBase<TranspositionsWrapper<IndicesType_> >
|
||||
{
|
||||
typedef internal::traits<TranspositionsWrapper> Traits;
|
||||
public:
|
||||
|
@ -166,8 +166,8 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
||||
* \sa MatrixBase::triangularView()
|
||||
*/
|
||||
namespace internal {
|
||||
template<typename MatrixType, unsigned int _Mode>
|
||||
struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
|
||||
template<typename MatrixType, unsigned int Mode_>
|
||||
struct traits<TriangularView<MatrixType, Mode_> > : traits<MatrixType>
|
||||
{
|
||||
typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
|
||||
@ -175,30 +175,30 @@ struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
|
||||
typedef typename MatrixType::PlainObject FullMatrixType;
|
||||
typedef MatrixType ExpressionType;
|
||||
enum {
|
||||
Mode = _Mode,
|
||||
Mode = Mode_,
|
||||
FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,
|
||||
Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _MatrixType, unsigned int _Mode, typename StorageKind> class TriangularViewImpl;
|
||||
template<typename MatrixType_, unsigned int Mode_, typename StorageKind> class TriangularViewImpl;
|
||||
|
||||
template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
||||
: public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >
|
||||
template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
: public TriangularViewImpl<MatrixType_, Mode_, typename internal::traits<MatrixType_>::StorageKind >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base;
|
||||
typedef TriangularViewImpl<MatrixType_, Mode_, typename internal::traits<MatrixType_>::StorageKind > Base;
|
||||
typedef typename internal::traits<TriangularView>::Scalar Scalar;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
protected:
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
|
||||
|
||||
typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
|
||||
typedef TriangularView<typename internal::add_const<MatrixType>::type, _Mode> ConstTriangularView;
|
||||
typedef TriangularView<typename internal::add_const<MatrixType>::type, Mode_> ConstTriangularView;
|
||||
|
||||
public:
|
||||
|
||||
@ -206,7 +206,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;
|
||||
|
||||
enum {
|
||||
Mode = _Mode,
|
||||
Mode = Mode_,
|
||||
Flags = internal::traits<TriangularView>::Flags,
|
||||
TransposeMode = (Mode & Upper ? Lower : 0)
|
||||
| (Mode & Lower ? Upper : 0)
|
||||
@ -342,16 +342,17 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
||||
*
|
||||
* \sa class TriangularView, MatrixBase::triangularView()
|
||||
*/
|
||||
template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_MatrixType,_Mode,Dense>
|
||||
: public TriangularBase<TriangularView<_MatrixType, _Mode> >
|
||||
template<typename MatrixType_, unsigned int Mode_> class TriangularViewImpl<MatrixType_,Mode_,Dense>
|
||||
: public TriangularBase<TriangularView<MatrixType_, Mode_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef TriangularView<_MatrixType, _Mode> TriangularViewType;
|
||||
typedef TriangularView<MatrixType_, Mode_> TriangularViewType;
|
||||
|
||||
typedef TriangularBase<TriangularViewType> Base;
|
||||
typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::PlainObject DenseMatrixType;
|
||||
typedef DenseMatrixType PlainObject;
|
||||
|
||||
@ -362,7 +363,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
||||
typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
|
||||
|
||||
enum {
|
||||
Mode = _Mode,
|
||||
Mode = Mode_,
|
||||
Flags = internal::traits<TriangularViewType>::Flags
|
||||
};
|
||||
|
||||
|
@ -21,7 +21,7 @@ enum GEBPPacketSizeType {
|
||||
GEBPPacketQuarter
|
||||
};
|
||||
|
||||
template<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs=false, bool _ConjRhs=false, int Arch=Architecture::Target, int _PacketSize=GEBPPacketFull>
|
||||
template<typename LhsScalar_, typename RhsScalar_, bool ConjLhs_=false, bool ConjRhs_=false, int Arch=Architecture::Target, int PacketSize_=GEBPPacketFull>
|
||||
class gebp_traits;
|
||||
|
||||
|
||||
@ -414,21 +414,21 @@ struct packet_conditional<GEBPPacketHalf, T1, T2, T3> { typedef T2 type; };
|
||||
* cplx*real : unpack rhs to constant packets, ...
|
||||
* real*cplx : load lhs as (a0,a0,a1,a1), and mul as usual
|
||||
*/
|
||||
template<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs, bool _ConjRhs, int Arch, int _PacketSize>
|
||||
template<typename LhsScalar_, typename RhsScalar_, bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
|
||||
class gebp_traits
|
||||
{
|
||||
public:
|
||||
typedef _LhsScalar LhsScalar;
|
||||
typedef _RhsScalar RhsScalar;
|
||||
typedef LhsScalar_ LhsScalar;
|
||||
typedef RhsScalar_ RhsScalar;
|
||||
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;
|
||||
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, PacketSize_);
|
||||
|
||||
enum {
|
||||
ConjLhs = _ConjLhs,
|
||||
ConjRhs = _ConjRhs,
|
||||
ConjLhs = ConjLhs_,
|
||||
ConjRhs = ConjRhs_,
|
||||
Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable,
|
||||
LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,
|
||||
RhsPacketSize = Vectorizable ? unpacket_traits<_RhsPacket>::size : 1,
|
||||
@ -543,20 +543,20 @@ public:
|
||||
|
||||
};
|
||||
|
||||
template<typename RealScalar, bool _ConjLhs, int Arch, int _PacketSize>
|
||||
class gebp_traits<std::complex<RealScalar>, RealScalar, _ConjLhs, false, Arch, _PacketSize>
|
||||
template<typename RealScalar, bool ConjLhs_, int Arch, int PacketSize_>
|
||||
class gebp_traits<std::complex<RealScalar>, RealScalar, ConjLhs_, false, Arch, PacketSize_>
|
||||
{
|
||||
public:
|
||||
typedef std::complex<RealScalar> LhsScalar;
|
||||
typedef RealScalar RhsScalar;
|
||||
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;
|
||||
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, PacketSize_);
|
||||
|
||||
enum {
|
||||
ConjLhs = _ConjLhs,
|
||||
ConjLhs = ConjLhs_,
|
||||
ConjRhs = false,
|
||||
Vectorizable = unpacket_traits<_LhsPacket>::vectorizable && unpacket_traits<_RhsPacket>::vectorizable,
|
||||
LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,
|
||||
@ -754,8 +754,8 @@ template<typename Packet> struct unpacket_traits<DoublePacket<Packet> > {
|
||||
// return res;
|
||||
// }
|
||||
|
||||
template<typename RealScalar, bool _ConjLhs, bool _ConjRhs, int Arch, int _PacketSize>
|
||||
class gebp_traits<std::complex<RealScalar>, std::complex<RealScalar>, _ConjLhs, _ConjRhs, Arch, _PacketSize >
|
||||
template<typename RealScalar, bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
|
||||
class gebp_traits<std::complex<RealScalar>, std::complex<RealScalar>, ConjLhs_, ConjRhs_, Arch, PacketSize_ >
|
||||
{
|
||||
public:
|
||||
typedef std::complex<RealScalar> Scalar;
|
||||
@ -763,15 +763,15 @@ public:
|
||||
typedef std::complex<RealScalar> RhsScalar;
|
||||
typedef std::complex<RealScalar> ResScalar;
|
||||
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);
|
||||
PACKET_DECL_COND(Real, _PacketSize);
|
||||
PACKET_DECL_COND_SCALAR(_PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, PacketSize_);
|
||||
PACKET_DECL_COND(Real, PacketSize_);
|
||||
PACKET_DECL_COND_SCALAR(PacketSize_);
|
||||
|
||||
enum {
|
||||
ConjLhs = _ConjLhs,
|
||||
ConjRhs = _ConjRhs,
|
||||
ConjLhs = ConjLhs_,
|
||||
ConjRhs = ConjRhs_,
|
||||
Vectorizable = unpacket_traits<RealPacket>::vectorizable
|
||||
&& unpacket_traits<ScalarPacket>::vectorizable,
|
||||
ResPacketSize = Vectorizable ? unpacket_traits<_ResPacket>::size : 1,
|
||||
@ -920,8 +920,8 @@ protected:
|
||||
conj_helper<LhsScalar,RhsScalar,ConjLhs,ConjRhs> cj;
|
||||
};
|
||||
|
||||
template<typename RealScalar, bool _ConjRhs, int Arch, int _PacketSize>
|
||||
class gebp_traits<RealScalar, std::complex<RealScalar>, false, _ConjRhs, Arch, _PacketSize >
|
||||
template<typename RealScalar, bool ConjRhs_, int Arch, int PacketSize_>
|
||||
class gebp_traits<RealScalar, std::complex<RealScalar>, false, ConjRhs_, Arch, PacketSize_ >
|
||||
{
|
||||
public:
|
||||
typedef std::complex<RealScalar> Scalar;
|
||||
@ -929,11 +929,11 @@ public:
|
||||
typedef Scalar RhsScalar;
|
||||
typedef Scalar ResScalar;
|
||||
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Real, _PacketSize);
|
||||
PACKET_DECL_COND_SCALAR_PREFIX(_, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Real, PacketSize_);
|
||||
PACKET_DECL_COND_SCALAR_PREFIX(_, PacketSize_);
|
||||
|
||||
#undef PACKET_DECL_COND_SCALAR_PREFIX
|
||||
#undef PACKET_DECL_COND_PREFIX
|
||||
@ -942,7 +942,7 @@ public:
|
||||
|
||||
enum {
|
||||
ConjLhs = false,
|
||||
ConjRhs = _ConjRhs,
|
||||
ConjRhs = ConjRhs_,
|
||||
Vectorizable = unpacket_traits<_RealPacket>::vectorizable
|
||||
&& unpacket_traits<_ScalarPacket>::vectorizable,
|
||||
LhsPacketSize = Vectorizable ? unpacket_traits<_LhsPacket>::size : 1,
|
||||
|
@ -14,7 +14,7 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _LhsScalar, typename _RhsScalar> class level3_blocking;
|
||||
template<typename LhsScalar_, typename RhsScalar_> class level3_blocking;
|
||||
|
||||
/* Specialization for a row-major destination matrix => simple transposition of the product */
|
||||
template<
|
||||
@ -247,11 +247,11 @@ struct gemm_functor
|
||||
template<int StorageOrder, typename LhsScalar, typename RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor=1,
|
||||
bool FiniteAtCompileTime = MaxRows!=Dynamic && MaxCols!=Dynamic && MaxDepth != Dynamic> class gemm_blocking_space;
|
||||
|
||||
template<typename _LhsScalar, typename _RhsScalar>
|
||||
template<typename LhsScalar_, typename RhsScalar_>
|
||||
class level3_blocking
|
||||
{
|
||||
typedef _LhsScalar LhsScalar;
|
||||
typedef _RhsScalar RhsScalar;
|
||||
typedef LhsScalar_ LhsScalar;
|
||||
typedef RhsScalar_ RhsScalar;
|
||||
|
||||
protected:
|
||||
LhsScalar* m_blockA;
|
||||
@ -275,19 +275,19 @@ class level3_blocking
|
||||
inline RhsScalar* blockB() { return m_blockB; }
|
||||
};
|
||||
|
||||
template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, KcFactor, true /* == FiniteAtCompileTime */>
|
||||
template<int StorageOrder, typename LhsScalar_, typename RhsScalar_, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,LhsScalar_,RhsScalar_,MaxRows, MaxCols, MaxDepth, KcFactor, true /* == FiniteAtCompileTime */>
|
||||
: public level3_blocking<
|
||||
typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type,
|
||||
typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type>
|
||||
typename conditional<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>::type,
|
||||
typename conditional<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>::type>
|
||||
{
|
||||
enum {
|
||||
Transpose = StorageOrder==RowMajor,
|
||||
ActualRows = Transpose ? MaxCols : MaxRows,
|
||||
ActualCols = Transpose ? MaxRows : MaxCols
|
||||
};
|
||||
typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar;
|
||||
typedef typename conditional<Transpose,RhsScalar_,LhsScalar_>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,LhsScalar_,RhsScalar_>::type RhsScalar;
|
||||
typedef gebp_traits<LhsScalar,RhsScalar> Traits;
|
||||
enum {
|
||||
SizeA = ActualRows * MaxDepth,
|
||||
@ -326,17 +326,17 @@ class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, M
|
||||
inline void allocateAll() {}
|
||||
};
|
||||
|
||||
template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, KcFactor, false>
|
||||
template<int StorageOrder, typename LhsScalar_, typename RhsScalar_, int MaxRows, int MaxCols, int MaxDepth, int KcFactor>
|
||||
class gemm_blocking_space<StorageOrder,LhsScalar_,RhsScalar_,MaxRows, MaxCols, MaxDepth, KcFactor, false>
|
||||
: public level3_blocking<
|
||||
typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type,
|
||||
typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type>
|
||||
typename conditional<StorageOrder==RowMajor,RhsScalar_,LhsScalar_>::type,
|
||||
typename conditional<StorageOrder==RowMajor,LhsScalar_,RhsScalar_>::type>
|
||||
{
|
||||
enum {
|
||||
Transpose = StorageOrder==RowMajor
|
||||
};
|
||||
typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar;
|
||||
typedef typename conditional<Transpose,RhsScalar_,LhsScalar_>::type LhsScalar;
|
||||
typedef typename conditional<Transpose,LhsScalar_,RhsScalar_>::type RhsScalar;
|
||||
typedef gebp_traits<LhsScalar,RhsScalar> Traits;
|
||||
|
||||
Index m_sizeA;
|
||||
|
@ -29,7 +29,7 @@ struct gemv_packet_cond<GEMVPacketFull, T1, T2, T3> { typedef T1 type; };
|
||||
template <typename T1, typename T2, typename T3>
|
||||
struct gemv_packet_cond<GEMVPacketHalf, T1, T2, T3> { typedef T2 type; };
|
||||
|
||||
template<typename LhsScalar, typename RhsScalar, int _PacketSize=GEMVPacketFull>
|
||||
template<typename LhsScalar, typename RhsScalar, int PacketSize_=GEMVPacketFull>
|
||||
class gemv_traits
|
||||
{
|
||||
typedef typename ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType ResScalar;
|
||||
@ -41,9 +41,9 @@ class gemv_traits
|
||||
typename unpacket_traits<typename packet_traits<name ## Scalar>::half>::half>::type \
|
||||
prefix ## name ## Packet
|
||||
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, _PacketSize);
|
||||
PACKET_DECL_COND_PREFIX(_, Lhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Rhs, PacketSize_);
|
||||
PACKET_DECL_COND_PREFIX(_, Res, PacketSize_);
|
||||
#undef PACKET_DECL_COND_PREFIX
|
||||
|
||||
public:
|
||||
|
@ -308,15 +308,15 @@ public:
|
||||
}
|
||||
|
||||
// storePacketBlock_helper defines a way to access values inside the PacketBlock, this is essentially required by the Complex types.
|
||||
template<typename SubPacket, typename ScalarT, int n, int idx>
|
||||
template<typename SubPacket, typename Scalar_, int n, int idx>
|
||||
struct storePacketBlock_helper
|
||||
{
|
||||
storePacketBlock_helper<SubPacket, ScalarT, n, idx-1> spbh;
|
||||
storePacketBlock_helper<SubPacket, Scalar_, n, idx-1> spbh;
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void store(const blas_data_mapper<Scalar, Index, StorageOrder, AlignmentType, Incr>* sup, Index i, Index j, const PacketBlock<SubPacket, n>& block) const {
|
||||
spbh.store(sup, i,j,block);
|
||||
for(int l = 0; l < unpacket_traits<SubPacket>::size; l++)
|
||||
{
|
||||
ScalarT *v = &sup->operator()(i+l, j+idx);
|
||||
Scalar_ *v = &sup->operator()(i+l, j+idx);
|
||||
*v = block.packet[idx][l];
|
||||
}
|
||||
}
|
||||
@ -352,8 +352,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<typename SubPacket, typename ScalarT, int n>
|
||||
struct storePacketBlock_helper<SubPacket, ScalarT, n, -1>
|
||||
template<typename SubPacket, typename Scalar_, int n>
|
||||
struct storePacketBlock_helper<SubPacket, Scalar_, n, -1>
|
||||
{
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void store(const blas_data_mapper<Scalar, Index, StorageOrder, AlignmentType, Incr>*, Index, Index, const PacketBlock<SubPacket, n>& ) const {
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ enum SpecializedType {
|
||||
};
|
||||
|
||||
/** \ingroup enums
|
||||
* Enum containing possible values for the \p _Options template parameter of
|
||||
* Enum containing possible values for the \p Options_ template parameter of
|
||||
* Matrix, Array and BandMatrix. */
|
||||
enum StorageOptions {
|
||||
/** Storage order is column major (see \ref TopicStorageOrders). */
|
||||
|
@ -49,24 +49,24 @@ template<typename Derived> class DenseBase;
|
||||
template<typename Derived> class PlainObjectBase;
|
||||
template<typename Derived, int Level> class DenseCoeffsBase;
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols,
|
||||
int _Options = AutoAlign |
|
||||
template<typename Scalar_, int Rows_, int Cols_,
|
||||
int Options_ = AutoAlign |
|
||||
#if EIGEN_GNUC_AT(3,4)
|
||||
// workaround a bug in at least gcc 3.4.6
|
||||
// the innermost ?: ternary operator is misparsed. We write it slightly
|
||||
// differently and this makes gcc 3.4.6 happy, but it's ugly.
|
||||
// The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
|
||||
// (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
|
||||
( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
|
||||
: !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
|
||||
( (Rows_==1 && Cols_!=1) ? Eigen::RowMajor
|
||||
: !(Cols_==1 && Rows_!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
|
||||
: Eigen::ColMajor ),
|
||||
#else
|
||||
( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
|
||||
: (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
|
||||
( (Rows_==1 && Cols_!=1) ? Eigen::RowMajor
|
||||
: (Cols_==1 && Rows_!=1) ? Eigen::ColMajor
|
||||
: EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
|
||||
#endif
|
||||
int _MaxRows = _Rows,
|
||||
int _MaxCols = _Cols
|
||||
int MaxRows_ = Rows_,
|
||||
int MaxCols_ = Cols_
|
||||
> class Matrix;
|
||||
|
||||
template<typename Derived> class MatrixBase;
|
||||
@ -97,15 +97,15 @@ template<typename Lhs, typename Rhs, int Option = DefaultProduct> class Product;
|
||||
|
||||
template<typename Derived> class DiagonalBase;
|
||||
template<typename _DiagonalVectorType> class DiagonalWrapper;
|
||||
template<typename _Scalar, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
|
||||
template<typename Scalar_, int SizeAtCompileTime, int MaxSizeAtCompileTime=SizeAtCompileTime> class DiagonalMatrix;
|
||||
template<typename MatrixType, typename DiagonalType, int ProductOrder> class DiagonalProduct;
|
||||
template<typename MatrixType, int Index = 0> class Diagonal;
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class PermutationMatrix;
|
||||
template<int SizeAtCompileTime, int MaxSizeAtCompileTime = SizeAtCompileTime, typename IndexType=int> class Transpositions;
|
||||
template<typename Derived> class PermutationBase;
|
||||
template<typename Derived> class TranspositionsBase;
|
||||
template<typename _IndicesType> class PermutationWrapper;
|
||||
template<typename _IndicesType> class TranspositionsWrapper;
|
||||
template<typename IndicesType_> class PermutationWrapper;
|
||||
template<typename IndicesType_> class TranspositionsWrapper;
|
||||
|
||||
template<typename Derived,
|
||||
int Level = internal::accessors_level<Derived>::has_write_access ? WriteAccessors : ReadOnlyAccessors
|
||||
@ -142,7 +142,7 @@ template<typename DecompositionType> struct image_retval;
|
||||
} // end namespace internal
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;
|
||||
template<typename Scalar_, int Rows=Dynamic, int Cols=Dynamic, int Supers=Dynamic, int Subs=Dynamic, int Options=0> class BandMatrix;
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
@ -242,23 +242,23 @@ template<typename Scalar> struct scalar_bessel_k1e_op;
|
||||
struct IOFormat;
|
||||
|
||||
// Array module
|
||||
template<typename _Scalar, int _Rows, int _Cols,
|
||||
int _Options = AutoAlign |
|
||||
template<typename Scalar_, int Rows_, int Cols_,
|
||||
int Options_ = AutoAlign |
|
||||
#if EIGEN_GNUC_AT(3,4)
|
||||
// workaround a bug in at least gcc 3.4.6
|
||||
// the innermost ?: ternary operator is misparsed. We write it slightly
|
||||
// differently and this makes gcc 3.4.6 happy, but it's ugly.
|
||||
// The error would only show up with EIGEN_DEFAULT_TO_ROW_MAJOR is defined
|
||||
// (when EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION is RowMajor)
|
||||
( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
|
||||
: !(_Cols==1 && _Rows!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
|
||||
( (Rows_==1 && Cols_!=1) ? Eigen::RowMajor
|
||||
: !(Cols_==1 && Rows_!=1) ? EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION
|
||||
: Eigen::ColMajor ),
|
||||
#else
|
||||
( (_Rows==1 && _Cols!=1) ? Eigen::RowMajor
|
||||
: (_Cols==1 && _Rows!=1) ? Eigen::ColMajor
|
||||
( (Rows_==1 && Cols_!=1) ? Eigen::RowMajor
|
||||
: (Cols_==1 && Rows_!=1) ? Eigen::ColMajor
|
||||
: EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION ),
|
||||
#endif
|
||||
int _MaxRows = _Rows, int _MaxCols = _Cols> class Array;
|
||||
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;
|
||||
template<typename ExpressionType, int Direction> class VectorwiseOp;
|
||||
@ -283,7 +283,7 @@ template<typename VectorsType, typename CoeffsType, int Side=OnTheLeft> class Ho
|
||||
template<typename Scalar> class JacobiRotation;
|
||||
|
||||
// Geometry module:
|
||||
template<typename Derived, int _Dim> class RotationBase;
|
||||
template<typename Derived, int Dim_> class RotationBase;
|
||||
template<typename Lhs, typename Rhs> class Cross;
|
||||
template<typename Derived> class QuaternionBase;
|
||||
template<typename Scalar> class Rotation2D;
|
||||
@ -291,9 +291,9 @@ template<typename Scalar> class AngleAxis;
|
||||
template<typename Scalar,int Dim> class Translation;
|
||||
template<typename Scalar,int Dim> class AlignedBox;
|
||||
template<typename Scalar, int Options = AutoAlign> class Quaternion;
|
||||
template<typename Scalar,int Dim,int Mode,int _Options=AutoAlign> class Transform;
|
||||
template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
|
||||
template <typename _Scalar, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
|
||||
template<typename Scalar,int Dim,int Mode,int Options_=AutoAlign> class Transform;
|
||||
template <typename Scalar_, int _AmbientDim, int Options=AutoAlign> class ParametrizedLine;
|
||||
template <typename Scalar_, int _AmbientDim, int Options=AutoAlign> class Hyperplane;
|
||||
template<typename Scalar> class UniformScaling;
|
||||
template<typename MatrixType,int Direction> class Homogeneous;
|
||||
|
||||
|
@ -247,24 +247,24 @@ template<typename T> struct compute_default_alignment<T,Dynamic> {
|
||||
enum { value = EIGEN_MAX_ALIGN_BYTES };
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols,
|
||||
int _Options = AutoAlign |
|
||||
( (_Rows==1 && _Cols!=1) ? RowMajor
|
||||
: (_Cols==1 && _Rows!=1) ? ColMajor
|
||||
template<typename Scalar_, int Rows_, int Cols_,
|
||||
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
|
||||
int MaxRows_ = Rows_,
|
||||
int MaxCols_ = Cols_
|
||||
> class make_proper_matrix_type
|
||||
{
|
||||
enum {
|
||||
IsColVector = _Cols==1 && _Rows!=1,
|
||||
IsRowVector = _Rows==1 && _Cols!=1,
|
||||
Options = IsColVector ? (_Options | ColMajor) & ~RowMajor
|
||||
: IsRowVector ? (_Options | RowMajor) & ~ColMajor
|
||||
: _Options
|
||||
IsColVector = Cols_==1 && Rows_!=1,
|
||||
IsRowVector = Rows_==1 && Cols_!=1,
|
||||
Options = IsColVector ? (Options_ | ColMajor) & ~RowMajor
|
||||
: IsRowVector ? (Options_ | RowMajor) & ~ColMajor
|
||||
: Options_
|
||||
};
|
||||
public:
|
||||
typedef Matrix<_Scalar, _Rows, _Cols, Options, _MaxRows, _MaxCols> type;
|
||||
typedef Matrix<Scalar_, Rows_, Cols_, Options, MaxRows_, MaxCols_> type;
|
||||
};
|
||||
|
||||
template<typename Scalar, int Rows, int Cols, int Options, int MaxRows, int MaxCols>
|
||||
@ -278,9 +278,9 @@ class compute_matrix_flags
|
||||
enum { ret = DirectAccessBit | LvalueBit | NestByRefBit | row_major_bit };
|
||||
};
|
||||
|
||||
template<int _Rows, int _Cols> struct size_at_compile_time
|
||||
template<int Rows_, int Cols_> struct size_at_compile_time
|
||||
{
|
||||
enum { ret = (_Rows==Dynamic || _Cols==Dynamic) ? Dynamic : _Rows * _Cols };
|
||||
enum { ret = (Rows_==Dynamic || Cols_==Dynamic) ? Dynamic : Rows_ * Cols_ };
|
||||
};
|
||||
|
||||
template<typename XprType> struct size_of_xpr_at_compile_time
|
||||
@ -350,16 +350,16 @@ template<typename T> struct eval<T,DiagonalShape>
|
||||
};
|
||||
|
||||
// for matrices, no need to evaluate, just use a const reference to avoid a useless copy
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct eval<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct eval<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense>
|
||||
{
|
||||
typedef const Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type;
|
||||
typedef const Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>& type;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct eval<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct eval<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>, Dense>
|
||||
{
|
||||
typedef const Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& type;
|
||||
typedef const Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>& type;
|
||||
};
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Computes eigenvalues and eigenvectors of general complex matrices
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are
|
||||
* \tparam MatrixType_ the type of the matrix of which we are
|
||||
* computing the eigendecomposition; this is expected to be an
|
||||
* instantiation of the Matrix class template.
|
||||
*
|
||||
@ -42,12 +42,12 @@ namespace Eigen {
|
||||
*
|
||||
* \sa class EigenSolver, class SelfAdjointEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class ComplexEigenSolver
|
||||
template<typename MatrixType_> class ComplexEigenSolver
|
||||
{
|
||||
public:
|
||||
|
||||
/** \brief Synonym for the template parameter \p _MatrixType. */
|
||||
typedef _MatrixType MatrixType;
|
||||
/** \brief Synonym for the template parameter \p MatrixType_. */
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
|
@ -27,7 +27,7 @@ template<typename MatrixType, bool IsComplex> struct complex_schur_reduce_to_hes
|
||||
*
|
||||
* \brief Performs a complex Schur decomposition of a real or complex square matrix
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are
|
||||
* \tparam MatrixType_ the type of the matrix of which we are
|
||||
* computing the Schur decomposition; this is expected to be an
|
||||
* instantiation of the Matrix class template.
|
||||
*
|
||||
@ -48,10 +48,10 @@ template<typename MatrixType, bool IsComplex> struct complex_schur_reduce_to_hes
|
||||
*
|
||||
* \sa class RealSchur, class EigenSolver, class ComplexEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class ComplexSchur
|
||||
template<typename MatrixType_> class ComplexSchur
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
@ -60,12 +60,12 @@ template<typename _MatrixType> class ComplexSchur
|
||||
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
|
||||
};
|
||||
|
||||
/** \brief Scalar type for matrices of type \p _MatrixType. */
|
||||
/** \brief Scalar type for matrices of type \p MatrixType_. */
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
|
||||
/** \brief Complex scalar type for \p _MatrixType.
|
||||
/** \brief Complex scalar type for \p MatrixType_.
|
||||
*
|
||||
* This is \c std::complex<Scalar> if #Scalar is real (e.g.,
|
||||
* \c float or \c double) and just \c Scalar if #Scalar is
|
||||
@ -76,7 +76,7 @@ template<typename _MatrixType> class ComplexSchur
|
||||
/** \brief Type for the matrices in the Schur decomposition.
|
||||
*
|
||||
* This is a square matrix with entries of type #ComplexScalar.
|
||||
* The size is the same as the size of \p _MatrixType.
|
||||
* The size is the same as the size of \p MatrixType_.
|
||||
*/
|
||||
typedef Matrix<ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime> ComplexMatrixType;
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Computes eigenvalues and eigenvectors of general matrices
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* eigendecomposition; this is expected to be an instantiation of the Matrix
|
||||
* class template. Currently, only real matrices are supported.
|
||||
*
|
||||
@ -61,12 +61,12 @@ namespace Eigen {
|
||||
*
|
||||
* \sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class EigenSolver
|
||||
template<typename MatrixType_> class EigenSolver
|
||||
{
|
||||
public:
|
||||
|
||||
/** \brief Synonym for the template parameter \p _MatrixType. */
|
||||
typedef _MatrixType MatrixType;
|
||||
/** \brief Synonym for the template parameter \p MatrixType_. */
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
|
@ -23,7 +23,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Computes the generalized eigenvalues and eigenvectors of a pair of general matrices
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrices of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrices of which we are computing the
|
||||
* eigen-decomposition; this is expected to be an instantiation of the Matrix
|
||||
* class template. Currently, only real matrices are supported.
|
||||
*
|
||||
@ -55,12 +55,12 @@ namespace Eigen {
|
||||
*
|
||||
* \sa MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class GeneralizedEigenSolver
|
||||
template<typename MatrixType_> class GeneralizedEigenSolver
|
||||
{
|
||||
public:
|
||||
|
||||
/** \brief Synonym for the template parameter \p _MatrixType. */
|
||||
typedef _MatrixType MatrixType;
|
||||
/** \brief Synonym for the template parameter \p MatrixType_. */
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
|
@ -22,7 +22,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* eigendecomposition; this is expected to be an instantiation of the Matrix
|
||||
* class template.
|
||||
*
|
||||
@ -44,19 +44,19 @@ namespace Eigen {
|
||||
*
|
||||
* \sa class SelfAdjointEigenSolver, class EigenSolver, class ComplexEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType>
|
||||
class GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver<_MatrixType>
|
||||
template<typename MatrixType_>
|
||||
class GeneralizedSelfAdjointEigenSolver : public SelfAdjointEigenSolver<MatrixType_>
|
||||
{
|
||||
typedef SelfAdjointEigenSolver<_MatrixType> Base;
|
||||
typedef SelfAdjointEigenSolver<MatrixType_> Base;
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
/** \brief Default constructor for fixed-size matrices.
|
||||
*
|
||||
* The default constructor is useful in cases in which the user intends to
|
||||
* perform decompositions via compute(). This constructor
|
||||
* can only be used if \p _MatrixType is a fixed-size matrix; use
|
||||
* can only be used if \p MatrixType_ is a fixed-size matrix; use
|
||||
* GeneralizedSelfAdjointEigenSolver(Index) for dynamic-size matrices.
|
||||
*/
|
||||
GeneralizedSelfAdjointEigenSolver() : Base() {}
|
||||
|
@ -31,7 +31,7 @@ struct traits<HessenbergDecompositionMatrixHReturnType<MatrixType> >
|
||||
*
|
||||
* \brief Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the Hessenberg decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the Hessenberg decomposition
|
||||
*
|
||||
* This class performs an Hessenberg decomposition of a matrix \f$ A \f$. In
|
||||
* the real case, the Hessenberg decomposition consists of an orthogonal
|
||||
@ -54,12 +54,12 @@ struct traits<HessenbergDecompositionMatrixHReturnType<MatrixType> >
|
||||
*
|
||||
* \sa class ComplexSchur, class Tridiagonalization, \ref QR_Module "QR Module"
|
||||
*/
|
||||
template<typename _MatrixType> class HessenbergDecomposition
|
||||
template<typename MatrixType_> class HessenbergDecomposition
|
||||
{
|
||||
public:
|
||||
|
||||
/** \brief Synonym for the template parameter \p _MatrixType. */
|
||||
typedef _MatrixType MatrixType;
|
||||
/** \brief Synonym for the template parameter \p MatrixType_. */
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
enum {
|
||||
Size = MatrixType::RowsAtCompileTime,
|
||||
|
@ -19,7 +19,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Performs a real QZ decomposition of a pair of square matrices
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* real QZ decomposition; this is expected to be an instantiation of the
|
||||
* Matrix class template.
|
||||
*
|
||||
@ -54,10 +54,10 @@ namespace Eigen {
|
||||
* \sa class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver
|
||||
*/
|
||||
|
||||
template<typename _MatrixType> class RealQZ
|
||||
template<typename MatrixType_> class RealQZ
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
|
@ -22,7 +22,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Performs a real Schur decomposition of a square matrix
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* real Schur decomposition; this is expected to be an instantiation of the
|
||||
* Matrix class template.
|
||||
*
|
||||
@ -51,10 +51,10 @@ namespace Eigen {
|
||||
*
|
||||
* \sa class ComplexSchur, class EigenSolver, class ComplexEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class RealSchur
|
||||
template<typename MatrixType_> class RealSchur
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
class GeneralizedSelfAdjointEigenSolver;
|
||||
|
||||
namespace internal {
|
||||
@ -33,7 +33,7 @@ ComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag
|
||||
*
|
||||
* \brief Computes eigenvalues and eigenvectors of selfadjoint matrices
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* eigendecomposition; this is expected to be an instantiation of the Matrix
|
||||
* class template.
|
||||
*
|
||||
@ -73,11 +73,11 @@ ComputationInfo computeFromTridiagonal_impl(DiagType& diag, SubDiagType& subdiag
|
||||
*
|
||||
* \sa MatrixBase::eigenvalues(), class EigenSolver, class ComplexEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
template<typename MatrixType_> class SelfAdjointEigenSolver
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum {
|
||||
Size = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
@ -85,13 +85,13 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
|
||||
};
|
||||
|
||||
/** \brief Scalar type for matrices of type \p _MatrixType. */
|
||||
/** \brief Scalar type for matrices of type \p MatrixType_. */
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
|
||||
typedef Matrix<Scalar,Size,Size,ColMajor,MaxColsAtCompileTime,MaxColsAtCompileTime> EigenvectorsType;
|
||||
|
||||
/** \brief Real scalar type for \p _MatrixType.
|
||||
/** \brief Real scalar type for \p MatrixType_.
|
||||
*
|
||||
* This is just \c Scalar if #Scalar is real (e.g., \c float or
|
||||
* \c double), and the type of the real part of \c Scalar if #Scalar is
|
||||
@ -104,7 +104,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
/** \brief Type for vector of eigenvalues as returned by eigenvalues().
|
||||
*
|
||||
* This is a column vector with entries of type #RealScalar.
|
||||
* The length of the vector is the size of \p _MatrixType.
|
||||
* The length of the vector is the size of \p MatrixType_.
|
||||
*/
|
||||
typedef typename internal::plain_col_type<MatrixType, RealScalar>::type RealVectorType;
|
||||
typedef Tridiagonalization<MatrixType> TridiagonalizationType;
|
||||
@ -114,7 +114,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
*
|
||||
* The default constructor is useful in cases in which the user intends to
|
||||
* perform decompositions via compute(). This constructor
|
||||
* can only be used if \p _MatrixType is a fixed-size matrix; use
|
||||
* can only be used if \p MatrixType_ is a fixed-size matrix; use
|
||||
* SelfAdjointEigenSolver(Index) for dynamic-size matrices.
|
||||
*
|
||||
* Example: \include SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
|
||||
|
@ -36,7 +36,7 @@ void tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs);
|
||||
*
|
||||
* \brief Tridiagonal decomposition of a selfadjoint matrix
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the
|
||||
* tridiagonal decomposition; this is expected to be an instantiation of the
|
||||
* Matrix class template.
|
||||
*
|
||||
@ -61,12 +61,12 @@ void tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs);
|
||||
*
|
||||
* \sa class HessenbergDecomposition, class SelfAdjointEigenSolver
|
||||
*/
|
||||
template<typename _MatrixType> class Tridiagonalization
|
||||
template<typename MatrixType_> class Tridiagonalization
|
||||
{
|
||||
public:
|
||||
|
||||
/** \brief Synonym for the template parameter \p _MatrixType. */
|
||||
typedef _MatrixType MatrixType;
|
||||
/** \brief Synonym for the template parameter \p MatrixType_. */
|
||||
typedef MatrixType_ MatrixType;
|
||||
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
@ -55,20 +55,20 @@ namespace Eigen {
|
||||
*
|
||||
* \brief An axis aligned box
|
||||
*
|
||||
* \tparam _Scalar the type of the scalar coefficients
|
||||
* \tparam Scalar_ the type of the scalar coefficients
|
||||
* \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
|
||||
*
|
||||
* This class represents an axis aligned box as a pair of the minimal and maximal corners.
|
||||
* \warning The result of most methods is undefined when applied to an empty box. You can check for empty boxes using isEmpty().
|
||||
* \sa alignedboxtypedefs
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim>
|
||||
template <typename Scalar_, int _AmbientDim>
|
||||
class AlignedBox
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim)
|
||||
enum { AmbientDimAtCompileTime = _AmbientDim };
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef NumTraits<Scalar> ScalarTraits;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef typename ScalarTraits::Real RealScalar;
|
||||
|
@ -18,7 +18,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Represents a 3D rotation as a rotation angle around an arbitrary 3D axis
|
||||
*
|
||||
* \param _Scalar the scalar type, i.e., the type of the coefficients.
|
||||
* \param Scalar_ the scalar type, i.e., the type of the coefficients.
|
||||
*
|
||||
* \warning When setting up an AngleAxis object, the axis vector \b must \b be \b normalized.
|
||||
*
|
||||
@ -39,16 +39,16 @@ namespace Eigen {
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar> struct traits<AngleAxis<_Scalar> >
|
||||
template<typename Scalar_> struct traits<AngleAxis<Scalar_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar>
|
||||
class AngleAxis : public RotationBase<AngleAxis<_Scalar>,3>
|
||||
template<typename Scalar_>
|
||||
class AngleAxis : public RotationBase<AngleAxis<Scalar_>,3>
|
||||
{
|
||||
typedef RotationBase<AngleAxis<_Scalar>,3> Base;
|
||||
typedef RotationBase<AngleAxis<Scalar_>,3> Base;
|
||||
|
||||
public:
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
|
||||
enum { Dim = 3 };
|
||||
/** the scalar type of the coefficients */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Matrix<Scalar,3,3> Matrix3;
|
||||
typedef Matrix<Scalar,3,1> Vector3;
|
||||
typedef Quaternion<Scalar> QuaternionType;
|
||||
|
@ -57,13 +57,13 @@ template<typename MatrixType,typename Rhs> struct homogeneous_right_product_impl
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
template<typename MatrixType,int _Direction> class Homogeneous
|
||||
: public MatrixBase<Homogeneous<MatrixType,_Direction> >, internal::no_assignment_operator
|
||||
template<typename MatrixType,int Direction_> class Homogeneous
|
||||
: public MatrixBase<Homogeneous<MatrixType,Direction_> >, internal::no_assignment_operator
|
||||
{
|
||||
public:
|
||||
|
||||
typedef MatrixType NestedExpression;
|
||||
enum { Direction = _Direction };
|
||||
enum { Direction = Direction_ };
|
||||
|
||||
typedef MatrixBase<Homogeneous> Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(Homogeneous)
|
||||
|
@ -22,7 +22,7 @@ namespace Eigen {
|
||||
* A hyperplane is an affine subspace of dimension n-1 in a space of dimension n.
|
||||
* For example, a hyperplane in a plane is a line; a hyperplane in 3-space is a plane.
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
|
||||
* Notice that the dimension of the hyperplane is _AmbientDim-1.
|
||||
*
|
||||
@ -30,16 +30,16 @@ namespace Eigen {
|
||||
* \f$ n \cdot x + d = 0 \f$ where \f$ n \f$ is a unit normal vector of the plane (linear part)
|
||||
* and \f$ d \f$ is the distance (offset) to the origin.
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
class Hyperplane
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim==Dynamic ? Dynamic : _AmbientDim+1)
|
||||
enum {
|
||||
AmbientDimAtCompileTime = _AmbientDim,
|
||||
Options = _Options
|
||||
Options = Options_
|
||||
};
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> VectorType;
|
||||
|
@ -23,19 +23,19 @@ namespace Eigen {
|
||||
* direction vector \f$ \mathbf{d} \f$ such that the line corresponds to
|
||||
* the set \f$ l(t) = \mathbf{o} + t \mathbf{d} \f$, \f$ t \in \mathbf{R} \f$.
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _AmbientDim the dimension of the ambient space, can be a compile time value or Dynamic.
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
class ParametrizedLine
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,_AmbientDim)
|
||||
enum {
|
||||
AmbientDimAtCompileTime = _AmbientDim,
|
||||
Options = _Options
|
||||
Options = Options_
|
||||
};
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> VectorType;
|
||||
@ -59,7 +59,7 @@ public:
|
||||
: m_origin(origin), m_direction(direction) {}
|
||||
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane);
|
||||
EIGEN_DEVICE_FUNC explicit ParametrizedLine(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane);
|
||||
|
||||
/** Constructs a parametrized line going from \a p0 to \a p1. */
|
||||
EIGEN_DEVICE_FUNC static inline ParametrizedLine Through(const VectorType& p0, const VectorType& p1)
|
||||
@ -96,13 +96,13 @@ public:
|
||||
EIGEN_DEVICE_FUNC VectorType pointAt(const Scalar& t) const;
|
||||
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
EIGEN_DEVICE_FUNC Scalar intersectionParameter(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
EIGEN_DEVICE_FUNC Scalar intersection(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
EIGEN_DEVICE_FUNC VectorType intersectionPoint(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const;
|
||||
|
||||
/** Applies the transformation matrix \a mat to \c *this and returns a reference to \c *this.
|
||||
*
|
||||
@ -178,9 +178,9 @@ protected:
|
||||
*
|
||||
* \warning the ambient space must have dimension 2 such that the hyperplane actually describes a line
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::ParametrizedLine(const Hyperplane<_Scalar, _AmbientDim,OtherOptions>& hyperplane)
|
||||
EIGEN_DEVICE_FUNC inline ParametrizedLine<Scalar_, _AmbientDim,Options_>::ParametrizedLine(const Hyperplane<Scalar_, _AmbientDim,OtherOptions>& hyperplane)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)
|
||||
direction() = hyperplane.normal().unitOrthogonal();
|
||||
@ -189,18 +189,18 @@ EIGEN_DEVICE_FUNC inline ParametrizedLine<_Scalar, _AmbientDim,_Options>::Parame
|
||||
|
||||
/** \returns the point at \a t along this line
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType
|
||||
ParametrizedLine<_Scalar, _AmbientDim,_Options>::pointAt(const _Scalar& t) const
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, _AmbientDim,Options_>::VectorType
|
||||
ParametrizedLine<Scalar_, _AmbientDim,Options_>::pointAt(const Scalar_& t) const
|
||||
{
|
||||
return origin() + (direction()*t);
|
||||
}
|
||||
|
||||
/** \returns the parameter value of the intersection between \c *this and the given \a hyperplane
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionParameter(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersectionParameter(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
{
|
||||
return -(hyperplane.offset()+hyperplane.normal().dot(origin()))
|
||||
/ hyperplane.normal().dot(direction());
|
||||
@ -210,19 +210,19 @@ EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>
|
||||
/** \deprecated use intersectionParameter()
|
||||
* \returns the parameter value of the intersection between \c *this and the given \a hyperplane
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC inline _Scalar ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersection(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
EIGEN_DEVICE_FUNC inline Scalar_ ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersection(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
{
|
||||
return intersectionParameter(hyperplane);
|
||||
}
|
||||
|
||||
/** \returns the point of the intersection between \c *this and the given hyperplane
|
||||
*/
|
||||
template <typename _Scalar, int _AmbientDim, int _Options>
|
||||
template <typename Scalar_, int _AmbientDim, int Options_>
|
||||
template <int OtherOptions>
|
||||
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<_Scalar, _AmbientDim,_Options>::VectorType
|
||||
ParametrizedLine<_Scalar, _AmbientDim,_Options>::intersectionPoint(const Hyperplane<_Scalar, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
EIGEN_DEVICE_FUNC inline typename ParametrizedLine<Scalar_, _AmbientDim,Options_>::VectorType
|
||||
ParametrizedLine<Scalar_, _AmbientDim,Options_>::intersectionPoint(const Hyperplane<Scalar_, _AmbientDim, OtherOptions>& hyperplane) const
|
||||
{
|
||||
return pointAt(intersectionParameter(hyperplane));
|
||||
}
|
||||
|
@ -236,8 +236,8 @@ protected:
|
||||
*
|
||||
* \brief The quaternion class used to represent 3D orientations and rotations
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _Options controls the memory alignment of the coefficients. Can be \# AutoAlign or \# DontAlign. Default is AutoAlign.
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients
|
||||
* \tparam Options_ controls the memory alignment of the coefficients. Can be \# AutoAlign or \# DontAlign. Default is AutoAlign.
|
||||
*
|
||||
* This class represents a quaternion \f$ w+xi+yj+zk \f$ that is a convenient representation of
|
||||
* orientations and rotations of objects in three dimensions. Compared to other representations
|
||||
@ -256,12 +256,12 @@ protected:
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar,int _Options>
|
||||
struct traits<Quaternion<_Scalar,_Options> >
|
||||
template<typename Scalar_,int Options_>
|
||||
struct traits<Quaternion<Scalar_,Options_> >
|
||||
{
|
||||
typedef Quaternion<_Scalar,_Options> PlainObject;
|
||||
typedef _Scalar Scalar;
|
||||
typedef Matrix<_Scalar,4,1,_Options> Coefficients;
|
||||
typedef Quaternion<Scalar_,Options_> PlainObject;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Matrix<Scalar_,4,1,Options_> Coefficients;
|
||||
enum{
|
||||
Alignment = internal::traits<Coefficients>::Alignment,
|
||||
Flags = LvalueBit
|
||||
@ -269,14 +269,14 @@ struct traits<Quaternion<_Scalar,_Options> >
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options>
|
||||
class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
|
||||
template<typename Scalar_, int Options_>
|
||||
class Quaternion : public QuaternionBase<Quaternion<Scalar_,Options_> >
|
||||
{
|
||||
public:
|
||||
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;
|
||||
typedef QuaternionBase<Quaternion<Scalar_,Options_> > Base;
|
||||
enum { NeedsAlignment = internal::traits<Quaternion>::Alignment>0 };
|
||||
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Quaternion)
|
||||
using Base::operator*=;
|
||||
@ -352,7 +352,7 @@ protected:
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
static EIGEN_STRONG_INLINE void _check_template_params()
|
||||
{
|
||||
EIGEN_STATIC_ASSERT( (_Options & DontAlign) == _Options,
|
||||
EIGEN_STATIC_ASSERT( (Options_ & DontAlign) == Options_,
|
||||
INVALID_MATRIX_TEMPLATE_PARAMETERS)
|
||||
}
|
||||
#endif
|
||||
@ -370,19 +370,19 @@ typedef Quaternion<double> Quaterniond;
|
||||
***************************************************************************/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options>
|
||||
struct traits<Map<Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
template<typename Scalar_, int Options_>
|
||||
struct traits<Map<Quaternion<Scalar_>, Options_> > : traits<Quaternion<Scalar_, (int(Options_)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
{
|
||||
typedef Map<Matrix<_Scalar,4,1>, _Options> Coefficients;
|
||||
typedef Map<Matrix<Scalar_,4,1>, Options_> Coefficients;
|
||||
};
|
||||
}
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options>
|
||||
struct traits<Map<const Quaternion<_Scalar>, _Options> > : traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
template<typename Scalar_, int Options_>
|
||||
struct traits<Map<const Quaternion<Scalar_>, Options_> > : traits<Quaternion<Scalar_, (int(Options_)&Aligned)==Aligned ? AutoAlign : DontAlign> >
|
||||
{
|
||||
typedef Map<const Matrix<_Scalar,4,1>, _Options> Coefficients;
|
||||
typedef traits<Quaternion<_Scalar, (int(_Options)&Aligned)==Aligned ? AutoAlign : DontAlign> > TraitsBase;
|
||||
typedef Map<const Matrix<Scalar_,4,1>, Options_> Coefficients;
|
||||
typedef traits<Quaternion<Scalar_, (int(Options_)&Aligned)==Aligned ? AutoAlign : DontAlign> > TraitsBase;
|
||||
enum {
|
||||
Flags = TraitsBase::Flags & ~LvalueBit
|
||||
};
|
||||
@ -392,22 +392,22 @@ namespace internal {
|
||||
/** \ingroup Geometry_Module
|
||||
* \brief Quaternion expression mapping a constant memory buffer
|
||||
*
|
||||
* \tparam _Scalar the type of the Quaternion coefficients
|
||||
* \tparam _Options see class Map
|
||||
* \tparam Scalar_ the type of the Quaternion coefficients
|
||||
* \tparam Options_ see class Map
|
||||
*
|
||||
* This is a specialization of class Map for Quaternion. This class allows to view
|
||||
* a 4 scalar memory buffer as an Eigen's Quaternion object.
|
||||
*
|
||||
* \sa class Map, class Quaternion, class QuaternionBase
|
||||
*/
|
||||
template<typename _Scalar, int _Options>
|
||||
class Map<const Quaternion<_Scalar>, _Options >
|
||||
: public QuaternionBase<Map<const Quaternion<_Scalar>, _Options> >
|
||||
template<typename Scalar_, int Options_>
|
||||
class Map<const Quaternion<Scalar_>, Options_ >
|
||||
: public QuaternionBase<Map<const Quaternion<Scalar_>, Options_> >
|
||||
{
|
||||
public:
|
||||
typedef QuaternionBase<Map<const Quaternion<_Scalar>, _Options> > Base;
|
||||
typedef QuaternionBase<Map<const Quaternion<Scalar_>, Options_> > Base;
|
||||
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||
using Base::operator*=;
|
||||
@ -417,7 +417,7 @@ class Map<const Quaternion<_Scalar>, _Options >
|
||||
* The pointer \a coeffs must reference the four coefficients of Quaternion in the following order:
|
||||
* \code *coeffs == {x, y, z, w} \endcode
|
||||
*
|
||||
* If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */
|
||||
* If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */
|
||||
EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(const Scalar* coeffs) : m_coeffs(coeffs) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC inline const Coefficients& coeffs() const { return m_coeffs;}
|
||||
@ -429,22 +429,22 @@ class Map<const Quaternion<_Scalar>, _Options >
|
||||
/** \ingroup Geometry_Module
|
||||
* \brief Expression of a quaternion from a memory buffer
|
||||
*
|
||||
* \tparam _Scalar the type of the Quaternion coefficients
|
||||
* \tparam _Options see class Map
|
||||
* \tparam Scalar_ the type of the Quaternion coefficients
|
||||
* \tparam Options_ see class Map
|
||||
*
|
||||
* This is a specialization of class Map for Quaternion. This class allows to view
|
||||
* a 4 scalar memory buffer as an Eigen's Quaternion object.
|
||||
*
|
||||
* \sa class Map, class Quaternion, class QuaternionBase
|
||||
*/
|
||||
template<typename _Scalar, int _Options>
|
||||
class Map<Quaternion<_Scalar>, _Options >
|
||||
: public QuaternionBase<Map<Quaternion<_Scalar>, _Options> >
|
||||
template<typename Scalar_, int Options_>
|
||||
class Map<Quaternion<Scalar_>, Options_ >
|
||||
: public QuaternionBase<Map<Quaternion<Scalar_>, Options_> >
|
||||
{
|
||||
public:
|
||||
typedef QuaternionBase<Map<Quaternion<_Scalar>, _Options> > Base;
|
||||
typedef QuaternionBase<Map<Quaternion<Scalar_>, Options_> > Base;
|
||||
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename internal::traits<Map>::Coefficients Coefficients;
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
|
||||
using Base::operator*=;
|
||||
@ -454,7 +454,7 @@ class Map<Quaternion<_Scalar>, _Options >
|
||||
* The pointer \a coeffs must reference the four coefficients of Quaternion in the following order:
|
||||
* \code *coeffs == {x, y, z, w} \endcode
|
||||
*
|
||||
* If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. */
|
||||
* If the template parameter Options_ is set to #Aligned, then the pointer coeffs must be aligned. */
|
||||
EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Map(Scalar* coeffs) : m_coeffs(coeffs) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC inline Coefficients& coeffs() { return m_coeffs; }
|
||||
|
@ -18,7 +18,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Represents a rotation/orientation in a 2 dimensional space.
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients
|
||||
*
|
||||
* This class is equivalent to a single scalar representing a counter clock wise rotation
|
||||
* as a single angle in radian. It provides some additional features such as the automatic
|
||||
@ -31,16 +31,16 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar> struct traits<Rotation2D<_Scalar> >
|
||||
template<typename Scalar_> struct traits<Rotation2D<Scalar_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
};
|
||||
} // end namespace internal
|
||||
|
||||
template<typename _Scalar>
|
||||
class Rotation2D : public RotationBase<Rotation2D<_Scalar>,2>
|
||||
template<typename Scalar_>
|
||||
class Rotation2D : public RotationBase<Rotation2D<Scalar_>,2>
|
||||
{
|
||||
typedef RotationBase<Rotation2D<_Scalar>,2> Base;
|
||||
typedef RotationBase<Rotation2D<Scalar_>,2> Base;
|
||||
|
||||
public:
|
||||
|
||||
@ -48,7 +48,7 @@ public:
|
||||
|
||||
enum { Dim = 2 };
|
||||
/** the scalar type of the coefficients */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Matrix<Scalar,2,1> Vector2;
|
||||
typedef Matrix<Scalar,2,2> Matrix2;
|
||||
|
||||
|
@ -23,13 +23,13 @@ struct rotation_base_generic_product_selector;
|
||||
* \brief Common base class for compact rotation representations
|
||||
*
|
||||
* \tparam Derived is the derived type, i.e., a rotation type
|
||||
* \tparam _Dim the dimension of the space
|
||||
* \tparam Dim_ the dimension of the space
|
||||
*/
|
||||
template<typename Derived, int _Dim>
|
||||
template<typename Derived, int Dim_>
|
||||
class RotationBase
|
||||
{
|
||||
public:
|
||||
enum { Dim = _Dim };
|
||||
enum { Dim = Dim_ };
|
||||
/** the scalar type of the coefficients */
|
||||
typedef typename internal::traits<Derived>::Scalar Scalar;
|
||||
|
||||
@ -135,9 +135,9 @@ struct rotation_base_generic_product_selector<RotationDerived,OtherVectorType,tr
|
||||
*
|
||||
* \brief Constructs a Dim x Dim rotation matrix from the rotation \a r
|
||||
*/
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int _Storage, int MaxRows_, int MaxCols_>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>
|
||||
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>
|
||||
::Matrix(const RotationBase<OtherDerived,ColsAtCompileTime>& r)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))
|
||||
@ -148,10 +148,10 @@ EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>
|
||||
*
|
||||
* \brief Set a Dim x Dim rotation matrix from the rotation \a r
|
||||
*/
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Storage, int _MaxRows, int _MaxCols>
|
||||
template<typename Scalar_, int Rows_, int Cols_, int _Storage, int MaxRows_, int MaxCols_>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DEVICE_FUNC Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>&
|
||||
Matrix<_Scalar, _Rows, _Cols, _Storage, _MaxRows, _MaxCols>
|
||||
EIGEN_DEVICE_FUNC Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>&
|
||||
Matrix<Scalar_, Rows_, Cols_, _Storage, MaxRows_, MaxCols_>
|
||||
::operator=(const RotationBase<OtherDerived,ColsAtCompileTime>& r)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Matrix,int(OtherDerived::Dim),int(OtherDerived::Dim))
|
||||
|
@ -18,7 +18,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Represents a generic uniform scaling transformation
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients.
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients.
|
||||
*
|
||||
* This class represent a uniform scaling transformation. It is the return
|
||||
* type of Scaling(Scalar), and most of the time this is the only way it
|
||||
@ -45,12 +45,12 @@ namespace internal
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar>
|
||||
template<typename Scalar_>
|
||||
class UniformScaling
|
||||
{
|
||||
public:
|
||||
/** the scalar type of the coefficients */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -63,15 +63,15 @@ struct transform_construct_from_matrix;
|
||||
|
||||
template<typename TransformType> struct transform_take_affine_part;
|
||||
|
||||
template<typename _Scalar, int _Dim, int _Mode, int _Options>
|
||||
struct traits<Transform<_Scalar,_Dim,_Mode,_Options> >
|
||||
template<typename Scalar_, int Dim_, int _Mode, int Options_>
|
||||
struct traits<Transform<Scalar_,Dim_,_Mode,Options_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Eigen::Index StorageIndex;
|
||||
typedef Dense StorageKind;
|
||||
enum {
|
||||
Dim1 = _Dim==Dynamic ? _Dim : _Dim + 1,
|
||||
RowsAtCompileTime = _Mode==Projective ? Dim1 : _Dim,
|
||||
Dim1 = Dim_==Dynamic ? Dim_ : Dim_ + 1,
|
||||
RowsAtCompileTime = _Mode==Projective ? Dim1 : Dim_,
|
||||
ColsAtCompileTime = Dim1,
|
||||
MaxRowsAtCompileTime = RowsAtCompileTime,
|
||||
MaxColsAtCompileTime = ColsAtCompileTime,
|
||||
@ -89,8 +89,8 @@ template<int Mode> struct transform_make_affine;
|
||||
*
|
||||
* \brief Represents an homogeneous transformation in a N dimensional space
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients
|
||||
* \tparam _Dim the dimension of the space
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients
|
||||
* \tparam Dim_ the dimension of the space
|
||||
* \tparam _Mode the type of the transformation. Can be:
|
||||
* - #Affine: the transformation is stored as a (Dim+1)^2 matrix,
|
||||
* where the last row is assumed to be [0 ... 0 1].
|
||||
@ -100,7 +100,7 @@ template<int Mode> struct transform_make_affine;
|
||||
* - #Isometry: same as #Affine with the additional assumption that
|
||||
* the linear part represents a rotation. This assumption is exploited
|
||||
* to speed up some functions such as inverse() and rotation().
|
||||
* \tparam _Options has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor.
|
||||
* \tparam Options_ has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor.
|
||||
* These Options are passed directly to the underlying matrix type.
|
||||
*
|
||||
* The homography is internally represented and stored by a matrix which
|
||||
@ -200,20 +200,20 @@ template<int Mode> struct transform_make_affine;
|
||||
*
|
||||
* \sa class Matrix, class Quaternion
|
||||
*/
|
||||
template<typename _Scalar, int _Dim, int _Mode, int _Options>
|
||||
template<typename Scalar_, int Dim_, int _Mode, int Options_>
|
||||
class Transform
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim==Dynamic ? Dynamic : (_Dim+1)*(_Dim+1))
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Dim_==Dynamic ? Dynamic : (Dim_+1)*(Dim_+1))
|
||||
enum {
|
||||
Mode = _Mode,
|
||||
Options = _Options,
|
||||
Dim = _Dim, ///< space dimension in which the transformation holds
|
||||
HDim = _Dim+1, ///< size of a respective homogeneous vector
|
||||
Options = Options_,
|
||||
Dim = Dim_, ///< space dimension in which the transformation holds
|
||||
HDim = Dim_+1, ///< size of a respective homogeneous vector
|
||||
Rows = int(Mode)==(AffineCompact) ? Dim : HDim
|
||||
};
|
||||
/** the scalar type of the coefficients */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Eigen::Index StorageIndex;
|
||||
typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
|
||||
/** type of the matrix used to represent the transformation */
|
||||
@ -443,7 +443,7 @@ public:
|
||||
* \li a general transformation matrix of size Dim+1 x Dim+1.
|
||||
*/
|
||||
template<typename OtherDerived> friend
|
||||
EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl<OtherDerived,Mode,Options,_Dim,_Dim+1>::ResultType
|
||||
EIGEN_DEVICE_FUNC inline const typename internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim_,Dim_+1>::ResultType
|
||||
operator * (const EigenBase<OtherDerived> &a, const Transform &b)
|
||||
{ return internal::transform_left_product_impl<OtherDerived,Mode,Options,Dim,HDim>::run(a.derived(),b); }
|
||||
|
||||
|
@ -18,23 +18,23 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Represents a translation transformation
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e., the type of the coefficients.
|
||||
* \tparam _Dim the dimension of the space, can be a compile time value or Dynamic
|
||||
* \tparam Scalar_ the scalar type, i.e., the type of the coefficients.
|
||||
* \tparam Dim_ the dimension of the space, can be a compile time value or Dynamic
|
||||
*
|
||||
* \note This class is not aimed to be used to store a translation transformation,
|
||||
* but rather to make easier the constructions and updates of Transform objects.
|
||||
*
|
||||
* \sa class Scaling, class Transform
|
||||
*/
|
||||
template<typename _Scalar, int _Dim>
|
||||
template<typename Scalar_, int Dim_>
|
||||
class Translation
|
||||
{
|
||||
public:
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim)
|
||||
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar_,Dim_)
|
||||
/** dimension of the space */
|
||||
enum { Dim = _Dim };
|
||||
enum { Dim = Dim_ };
|
||||
/** the scalar type of the coefficients */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
/** corresponding vector type */
|
||||
typedef Matrix<Scalar,Dim,1> VectorType;
|
||||
/** corresponding linear transformation matrix type */
|
||||
|
@ -428,7 +428,7 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename _VectorsType, typename _CoeffsType, int _Side> friend struct internal::hseq_side_dependent_impl;
|
||||
template<typename VectorsType_, typename CoeffsType_, int Side_> friend struct internal::hseq_side_dependent_impl;
|
||||
|
||||
/** \brief Sets the length of the Householder sequence.
|
||||
* \param [in] length New value for the length.
|
||||
|
@ -21,7 +21,7 @@ namespace Eigen {
|
||||
A.diagonal().asDiagonal() . x = b
|
||||
\endcode
|
||||
*
|
||||
* \tparam _Scalar the type of the scalar.
|
||||
* \tparam Scalar_ the type of the scalar.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -32,10 +32,10 @@ namespace Eigen {
|
||||
*
|
||||
* \sa class LeastSquareDiagonalPreconditioner, class ConjugateGradient
|
||||
*/
|
||||
template <typename _Scalar>
|
||||
template <typename Scalar_>
|
||||
class DiagonalPreconditioner
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Matrix<Scalar,Dynamic,1> Vector;
|
||||
public:
|
||||
typedef typename Vector::StorageIndex StorageIndex;
|
||||
@ -116,7 +116,7 @@ class DiagonalPreconditioner
|
||||
(A.adjoint() * A).diagonal().asDiagonal() * x = b
|
||||
\endcode
|
||||
*
|
||||
* \tparam _Scalar the type of the scalar.
|
||||
* \tparam Scalar_ the type of the scalar.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -124,12 +124,12 @@ class DiagonalPreconditioner
|
||||
*
|
||||
* \sa class LeastSquaresConjugateGradient, class DiagonalPreconditioner
|
||||
*/
|
||||
template <typename _Scalar>
|
||||
class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar>
|
||||
template <typename Scalar_>
|
||||
class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<Scalar_>
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef DiagonalPreconditioner<_Scalar> Base;
|
||||
typedef DiagonalPreconditioner<Scalar_> Base;
|
||||
using Base::m_invdiag;
|
||||
public:
|
||||
|
||||
|
@ -108,17 +108,17 @@ bool bicgstab(const MatrixType& mat, const Rhs& rhs, Dest& x,
|
||||
|
||||
}
|
||||
|
||||
template< typename _MatrixType,
|
||||
typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >
|
||||
template< typename MatrixType_,
|
||||
typename Preconditioner_ = DiagonalPreconditioner<typename MatrixType_::Scalar> >
|
||||
class BiCGSTAB;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template< typename _MatrixType, typename _Preconditioner>
|
||||
struct traits<BiCGSTAB<_MatrixType,_Preconditioner> >
|
||||
template< typename MatrixType_, typename Preconditioner_>
|
||||
struct traits<BiCGSTAB<MatrixType_,Preconditioner_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
};
|
||||
|
||||
}
|
||||
@ -129,8 +129,8 @@ struct traits<BiCGSTAB<_MatrixType,_Preconditioner> >
|
||||
* This class allows to solve for A.x = b sparse linear problems using a bi conjugate gradient
|
||||
* stabilized algorithm. The vectors x and b can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -154,8 +154,8 @@ struct traits<BiCGSTAB<_MatrixType,_Preconditioner> >
|
||||
*
|
||||
* \sa class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner
|
||||
*/
|
||||
template< typename _MatrixType, typename _Preconditioner>
|
||||
class BiCGSTAB : public IterativeSolverBase<BiCGSTAB<_MatrixType,_Preconditioner> >
|
||||
template< typename MatrixType_, typename Preconditioner_>
|
||||
class BiCGSTAB : public IterativeSolverBase<BiCGSTAB<MatrixType_,Preconditioner_> >
|
||||
{
|
||||
typedef IterativeSolverBase<BiCGSTAB> Base;
|
||||
using Base::matrix;
|
||||
@ -164,10 +164,10 @@ class BiCGSTAB : public IterativeSolverBase<BiCGSTAB<_MatrixType,_Preconditioner
|
||||
using Base::m_info;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -92,17 +92,17 @@ void conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x,
|
||||
|
||||
}
|
||||
|
||||
template< typename _MatrixType, int _UpLo=Lower,
|
||||
typename _Preconditioner = DiagonalPreconditioner<typename _MatrixType::Scalar> >
|
||||
template< typename MatrixType_, int UpLo_=Lower,
|
||||
typename Preconditioner_ = DiagonalPreconditioner<typename MatrixType_::Scalar> >
|
||||
class ConjugateGradient;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template< typename _MatrixType, int _UpLo, typename _Preconditioner>
|
||||
struct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
||||
template< typename MatrixType_, int UpLo_, typename Preconditioner_>
|
||||
struct traits<ConjugateGradient<MatrixType_,UpLo_,Preconditioner_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
};
|
||||
|
||||
}
|
||||
@ -113,11 +113,11 @@ struct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
||||
* This class allows to solve for A.x = b linear problems using an iterative conjugate gradient algorithm.
|
||||
* The matrix A must be selfadjoint. The matrix A and the vectors x and b can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower,
|
||||
* \tparam MatrixType_ the type of the matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower,
|
||||
* \c Upper, or \c Lower|Upper in which the full matrix entries will be considered.
|
||||
* Default is \c Lower, best performance is \c Lower|Upper.
|
||||
* \tparam _Preconditioner the type of the preconditioner. Default is DiagonalPreconditioner
|
||||
* \tparam Preconditioner_ the type of the preconditioner. Default is DiagonalPreconditioner
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -127,8 +127,8 @@ struct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
||||
*
|
||||
* The tolerance corresponds to the relative residual error: |Ax-b|/|b|
|
||||
*
|
||||
* \b Performance: Even though the default value of \c _UpLo is \c Lower, significantly higher performance is
|
||||
* achieved when using a complete matrix and \b Lower|Upper as the \a _UpLo template parameter. Moreover, in this
|
||||
* \b Performance: Even though the default value of \c UpLo_ is \c Lower, significantly higher performance is
|
||||
* achieved when using a complete matrix and \b Lower|Upper as the \a UpLo_ template parameter. Moreover, in this
|
||||
* case multi-threading can be exploited if the user code is compiled with OpenMP enabled.
|
||||
* See \ref TopicMultiThreading for details.
|
||||
*
|
||||
@ -154,8 +154,8 @@ struct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
||||
*
|
||||
* \sa class LeastSquaresConjugateGradient, class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner
|
||||
*/
|
||||
template< typename _MatrixType, int _UpLo, typename _Preconditioner>
|
||||
class ConjugateGradient : public IterativeSolverBase<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
||||
template< typename MatrixType_, int UpLo_, typename Preconditioner_>
|
||||
class ConjugateGradient : public IterativeSolverBase<ConjugateGradient<MatrixType_,UpLo_,Preconditioner_> >
|
||||
{
|
||||
typedef IterativeSolverBase<ConjugateGradient> Base;
|
||||
using Base::matrix;
|
||||
@ -164,13 +164,13 @@ class ConjugateGradient : public IterativeSolverBase<ConjugateGradient<_MatrixTy
|
||||
using Base::m_info;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
|
||||
enum {
|
||||
UpLo = _UpLo
|
||||
UpLo = UpLo_
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -22,9 +22,9 @@ namespace Eigen {
|
||||
* Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999
|
||||
*
|
||||
* \tparam Scalar the scalar type of the input matrices
|
||||
* \tparam _UpLo The triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam UpLo_ The triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
* \tparam _OrderingType The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<int>,
|
||||
* \tparam OrderingType_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<int>,
|
||||
* unless EIGEN_MPL2_ONLY is defined, in which case the default is NaturalOrdering<int>.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -41,15 +41,15 @@ namespace Eigen {
|
||||
* the info() method, then you can either increase the initial shift, or better use another preconditioning technique.
|
||||
*
|
||||
*/
|
||||
template <typename Scalar, int _UpLo = Lower, typename _OrderingType = AMDOrdering<int> >
|
||||
class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,_UpLo,_OrderingType> >
|
||||
template <typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int> >
|
||||
class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,UpLo_,OrderingType_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<IncompleteCholesky<Scalar,_UpLo,_OrderingType> > Base;
|
||||
typedef SparseSolverBase<IncompleteCholesky<Scalar,UpLo_,OrderingType_> > Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef _OrderingType OrderingType;
|
||||
typedef OrderingType_ OrderingType;
|
||||
typedef typename OrderingType::PermutationType PermutationType;
|
||||
typedef typename PermutationType::StorageIndex StorageIndex;
|
||||
typedef SparseMatrix<Scalar,ColMajor,StorageIndex> FactorType;
|
||||
@ -57,7 +57,7 @@ class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,_Up
|
||||
typedef Matrix<RealScalar,Dynamic,1> VectorRx;
|
||||
typedef Matrix<StorageIndex,Dynamic, 1> VectorIx;
|
||||
typedef std::vector<std::list<StorageIndex> > VectorList;
|
||||
enum { UpLo = _UpLo };
|
||||
enum { UpLo = UpLo_ };
|
||||
enum {
|
||||
ColsAtCompileTime = Dynamic,
|
||||
MaxColsAtCompileTime = Dynamic
|
||||
@ -185,9 +185,9 @@ class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,_Up
|
||||
// C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with
|
||||
// Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999
|
||||
// http://ftp.mcs.anl.gov/pub/tech_reports/reports/P682.pdf
|
||||
template<typename Scalar, int _UpLo, typename OrderingType>
|
||||
template<typename _MatrixType>
|
||||
void IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType& mat)
|
||||
template<typename Scalar, int UpLo_, typename OrderingType>
|
||||
template<typename MatrixType_>
|
||||
void IncompleteCholesky<Scalar,UpLo_, OrderingType>::factorize(const MatrixType_& mat)
|
||||
{
|
||||
using std::sqrt;
|
||||
eigen_assert(m_analysisIsOk && "analyzePattern() should be called first");
|
||||
@ -199,12 +199,12 @@ void IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType
|
||||
{
|
||||
// The temporary is needed to make sure that the diagonal entry is properly sorted
|
||||
FactorType tmp(mat.rows(), mat.cols());
|
||||
tmp = mat.template selfadjointView<_UpLo>().twistedBy(m_perm);
|
||||
tmp = mat.template selfadjointView<UpLo_>().twistedBy(m_perm);
|
||||
m_L.template selfadjointView<Lower>() = tmp.template selfadjointView<Lower>();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_L.template selfadjointView<Lower>() = mat.template selfadjointView<_UpLo>();
|
||||
m_L.template selfadjointView<Lower>() = mat.template selfadjointView<UpLo_>();
|
||||
}
|
||||
|
||||
Index n = m_L.cols();
|
||||
@ -369,8 +369,8 @@ void IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType
|
||||
} while(m_info!=Success);
|
||||
}
|
||||
|
||||
template<typename Scalar, int _UpLo, typename OrderingType>
|
||||
inline void IncompleteCholesky<Scalar,_UpLo, OrderingType>::updateList(Ref<const VectorIx> colPtr, Ref<VectorIx> rowIdx, Ref<VectorSx> vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol)
|
||||
template<typename Scalar, int UpLo_, typename OrderingType>
|
||||
inline void IncompleteCholesky<Scalar,UpLo_, OrderingType>::updateList(Ref<const VectorIx> colPtr, Ref<VectorIx> rowIdx, Ref<VectorSx> vals, const Index& col, const Index& jk, VectorIx& firstElt, VectorList& listCol)
|
||||
{
|
||||
if (jk < colPtr(col+1) )
|
||||
{
|
||||
|
@ -95,15 +95,15 @@ Index QuickSplit(VectorV &row, VectorI &ind, Index ncut)
|
||||
* alternatively, on GMANE:
|
||||
* http://comments.gmane.org/gmane.comp.lib.eigen/3302
|
||||
*/
|
||||
template <typename _Scalar, typename _StorageIndex = int>
|
||||
class IncompleteLUT : public SparseSolverBase<IncompleteLUT<_Scalar, _StorageIndex> >
|
||||
template <typename Scalar_, typename StorageIndex_ = int>
|
||||
class IncompleteLUT : public SparseSolverBase<IncompleteLUT<Scalar_, StorageIndex_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<IncompleteLUT> Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
typedef Matrix<Scalar,Dynamic,1> Vector;
|
||||
typedef Matrix<StorageIndex,Dynamic,1> VectorI;
|
||||
@ -219,8 +219,8 @@ void IncompleteLUT<Scalar,StorageIndex>::setFillfactor(int fillfactor)
|
||||
}
|
||||
|
||||
template <typename Scalar, typename StorageIndex>
|
||||
template<typename _MatrixType>
|
||||
void IncompleteLUT<Scalar,StorageIndex>::analyzePattern(const _MatrixType& amat)
|
||||
template<typename MatrixType_>
|
||||
void IncompleteLUT<Scalar,StorageIndex>::analyzePattern(const MatrixType_& amat)
|
||||
{
|
||||
// Compute the Fill-reducing permutation
|
||||
// Since ILUT does not perform any numerical pivoting,
|
||||
@ -240,8 +240,8 @@ void IncompleteLUT<Scalar,StorageIndex>::analyzePattern(const _MatrixType& amat)
|
||||
}
|
||||
|
||||
template <typename Scalar, typename StorageIndex>
|
||||
template<typename _MatrixType>
|
||||
void IncompleteLUT<Scalar,StorageIndex>::factorize(const _MatrixType& amat)
|
||||
template<typename MatrixType_>
|
||||
void IncompleteLUT<Scalar,StorageIndex>::factorize(const MatrixType_& amat)
|
||||
{
|
||||
using std::sqrt;
|
||||
using std::swap;
|
||||
|
@ -93,17 +93,17 @@ void least_square_conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest
|
||||
|
||||
}
|
||||
|
||||
template< typename _MatrixType,
|
||||
typename _Preconditioner = LeastSquareDiagonalPreconditioner<typename _MatrixType::Scalar> >
|
||||
template< typename MatrixType_,
|
||||
typename Preconditioner_ = LeastSquareDiagonalPreconditioner<typename MatrixType_::Scalar> >
|
||||
class LeastSquaresConjugateGradient;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template< typename _MatrixType, typename _Preconditioner>
|
||||
struct traits<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >
|
||||
template< typename MatrixType_, typename Preconditioner_>
|
||||
struct traits<LeastSquaresConjugateGradient<MatrixType_,Preconditioner_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
};
|
||||
|
||||
}
|
||||
@ -116,8 +116,8 @@ struct traits<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >
|
||||
* Otherwise, the SparseLU or SparseQR classes might be preferable.
|
||||
* The matrix A and the vectors x and b can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam _Preconditioner the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner
|
||||
* \tparam MatrixType_ the type of the matrix A, can be a dense or a sparse matrix.
|
||||
* \tparam Preconditioner_ the type of the preconditioner. Default is LeastSquareDiagonalPreconditioner
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -145,8 +145,8 @@ struct traits<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >
|
||||
*
|
||||
* \sa class ConjugateGradient, SparseLU, SparseQR
|
||||
*/
|
||||
template< typename _MatrixType, typename _Preconditioner>
|
||||
class LeastSquaresConjugateGradient : public IterativeSolverBase<LeastSquaresConjugateGradient<_MatrixType,_Preconditioner> >
|
||||
template< typename MatrixType_, typename Preconditioner_>
|
||||
class LeastSquaresConjugateGradient : public IterativeSolverBase<LeastSquaresConjugateGradient<MatrixType_,Preconditioner_> >
|
||||
{
|
||||
typedef IterativeSolverBase<LeastSquaresConjugateGradient> Base;
|
||||
using Base::matrix;
|
||||
@ -155,10 +155,10 @@ class LeastSquaresConjugateGradient : public IterativeSolverBase<LeastSquaresCon
|
||||
using Base::m_info;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef _Preconditioner Preconditioner;
|
||||
typedef Preconditioner_ Preconditioner;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace Eigen {
|
||||
*
|
||||
* \warning The input matrix A should be in a \b compressed and \b column-major form.
|
||||
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -56,15 +56,15 @@ inline klu_numeric* klu_factor(int Ap[], int Ai[], std::complex<double> Ax[], kl
|
||||
}
|
||||
|
||||
|
||||
template<typename _MatrixType>
|
||||
class KLU : public SparseSolverBase<KLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class KLU : public SparseSolverBase<KLU<MatrixType_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<KLU<_MatrixType> > Base;
|
||||
typedef SparseSolverBase<KLU<MatrixType_> > Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
using Base::_solve_impl;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
|
@ -13,8 +13,8 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType> struct traits<FullPivLU<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_> struct traits<FullPivLU<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -30,7 +30,7 @@ template<typename _MatrixType> struct traits<FullPivLU<_MatrixType> >
|
||||
*
|
||||
* \brief LU decomposition of a matrix with complete pivoting, and related features
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the LU decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the LU decomposition
|
||||
*
|
||||
* This class represents a LU decomposition of any matrix, with complete pivoting: the matrix A is
|
||||
* decomposed as \f$ A = P^{-1} L U Q^{-1} \f$ where L is unit-lower-triangular, U is
|
||||
@ -57,11 +57,11 @@ template<typename _MatrixType> struct traits<FullPivLU<_MatrixType> >
|
||||
*
|
||||
* \sa MatrixBase::fullPivLu(), MatrixBase::determinant(), MatrixBase::inverse()
|
||||
*/
|
||||
template<typename _MatrixType> class FullPivLU
|
||||
: public SolverBase<FullPivLU<_MatrixType> >
|
||||
template<typename MatrixType_> class FullPivLU
|
||||
: public SolverBase<FullPivLU<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<FullPivLU> Base;
|
||||
friend class SolverBase<FullPivLU>;
|
||||
|
||||
@ -613,11 +613,11 @@ MatrixType FullPivLU<MatrixType>::reconstructedMatrix() const
|
||||
/********* Implementation of kernel() **************************************************/
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType>
|
||||
struct kernel_retval<FullPivLU<_MatrixType> >
|
||||
: kernel_retval_base<FullPivLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
struct kernel_retval<FullPivLU<MatrixType_> >
|
||||
: kernel_retval_base<FullPivLU<MatrixType_> >
|
||||
{
|
||||
EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<_MatrixType>)
|
||||
EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<MatrixType_>)
|
||||
|
||||
enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(
|
||||
MatrixType::MaxColsAtCompileTime,
|
||||
@ -699,11 +699,11 @@ struct kernel_retval<FullPivLU<_MatrixType> >
|
||||
|
||||
/***** Implementation of image() *****************************************************/
|
||||
|
||||
template<typename _MatrixType>
|
||||
struct image_retval<FullPivLU<_MatrixType> >
|
||||
: image_retval_base<FullPivLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
struct image_retval<FullPivLU<MatrixType_> >
|
||||
: image_retval_base<FullPivLU<MatrixType_> >
|
||||
{
|
||||
EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<_MatrixType>)
|
||||
EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<MatrixType_>)
|
||||
|
||||
enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(
|
||||
MatrixType::MaxColsAtCompileTime,
|
||||
@ -740,9 +740,9 @@ struct image_retval<FullPivLU<_MatrixType> >
|
||||
} // end namespace internal
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void FullPivLU<MatrixType_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
/* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1}.
|
||||
* So we proceed as follows:
|
||||
@ -787,9 +787,9 @@ void FullPivLU<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
dst.row(permutationQ().indices().coeff(i)).setZero();
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void FullPivLU<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void FullPivLU<MatrixType_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
/* The decomposition PAQ = LU can be rewritten as A = P^{-1} L U Q^{-1},
|
||||
* and since permutations are real and unitary, we can write this
|
||||
|
@ -14,13 +14,13 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType> struct traits<PartialPivLU<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_> struct traits<PartialPivLU<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
typedef int StorageIndex;
|
||||
typedef traits<_MatrixType> BaseTraits;
|
||||
typedef traits<MatrixType_> BaseTraits;
|
||||
enum {
|
||||
Flags = BaseTraits::Flags & RowMajorBit,
|
||||
CoeffReadCost = Dynamic
|
||||
@ -46,7 +46,7 @@ struct enable_if_ref<Ref<T>,Derived> {
|
||||
*
|
||||
* \brief LU decomposition of a matrix with partial pivoting, and related features
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the LU decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the LU decomposition
|
||||
*
|
||||
* This class represents a LU decomposition of a \b square \b invertible matrix, with partial pivoting: the matrix A
|
||||
* is decomposed as A = PLU where L is unit-lower-triangular, U is upper-triangular, and P
|
||||
@ -73,12 +73,12 @@ struct enable_if_ref<Ref<T>,Derived> {
|
||||
*
|
||||
* \sa MatrixBase::partialPivLu(), MatrixBase::determinant(), MatrixBase::inverse(), MatrixBase::computeInverse(), class FullPivLU
|
||||
*/
|
||||
template<typename _MatrixType> class PartialPivLU
|
||||
: public SolverBase<PartialPivLU<_MatrixType> >
|
||||
template<typename MatrixType_> class PartialPivLU
|
||||
: public SolverBase<PartialPivLU<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<PartialPivLU> Base;
|
||||
friend class SolverBase<PartialPivLU>;
|
||||
|
||||
|
@ -28,40 +28,40 @@ namespace Eigen {
|
||||
*
|
||||
* \sa TutorialSparseDirectSolvers
|
||||
*/
|
||||
template<typename _MatrixType, bool IsStrSym = false> class PastixLU;
|
||||
template<typename _MatrixType, int Options> class PastixLLT;
|
||||
template<typename _MatrixType, int Options> class PastixLDLT;
|
||||
template<typename MatrixType_, bool IsStrSym = false> class PastixLU;
|
||||
template<typename MatrixType_, int Options> class PastixLLT;
|
||||
template<typename MatrixType_, int Options> class PastixLDLT;
|
||||
|
||||
namespace internal
|
||||
{
|
||||
|
||||
template<class Pastix> struct pastix_traits;
|
||||
|
||||
template<typename _MatrixType>
|
||||
struct pastix_traits< PastixLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
struct pastix_traits< PastixLU<MatrixType_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int Options>
|
||||
struct pastix_traits< PastixLLT<_MatrixType,Options> >
|
||||
template<typename MatrixType_, int Options>
|
||||
struct pastix_traits< PastixLLT<MatrixType_,Options> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int Options>
|
||||
struct pastix_traits< PastixLDLT<_MatrixType,Options> >
|
||||
template<typename MatrixType_, int Options>
|
||||
struct pastix_traits< PastixLDLT<MatrixType_,Options> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
inline void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int * invp, float *x, int nbrhs, int *iparm, double *dparm)
|
||||
@ -134,8 +134,8 @@ class PastixBase : public SparseSolverBase<Derived>
|
||||
public:
|
||||
using Base::_solve_impl;
|
||||
|
||||
typedef typename internal::pastix_traits<Derived>::MatrixType _MatrixType;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename internal::pastix_traits<Derived>::MatrixType MatrixType_;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
@ -397,7 +397,7 @@ bool PastixBase<Base>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &x
|
||||
* This interface can symmetrize the input matrix otherwise.
|
||||
* The vectors or matrices X and B can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam IsStrSym Indicates if the input matrix has a symmetric pattern, default is false
|
||||
* NOTE : Note that if the analysis and factorization phase are called separately,
|
||||
* the input matrix will be symmetrized at each call, hence it is advised to
|
||||
@ -408,11 +408,11 @@ bool PastixBase<Base>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest> &x
|
||||
* \sa \ref TutorialSparseSolverConcept, class SparseLU
|
||||
*
|
||||
*/
|
||||
template<typename _MatrixType, bool IsStrSym>
|
||||
class PastixLU : public PastixBase< PastixLU<_MatrixType> >
|
||||
template<typename MatrixType_, bool IsStrSym>
|
||||
class PastixLU : public PastixBase< PastixLU<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef PastixBase<PastixLU<MatrixType> > Base;
|
||||
typedef typename Base::ColSpMatrix ColSpMatrix;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
@ -520,16 +520,16 @@ class PastixLU : public PastixBase< PastixLU<_MatrixType> >
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class SimplicialLLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo>
|
||||
class PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_>
|
||||
class PastixLLT : public PastixBase< PastixLLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef PastixBase<PastixLLT<MatrixType, _UpLo> > Base;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef PastixBase<PastixLLT<MatrixType, UpLo_> > Base;
|
||||
typedef typename Base::ColSpMatrix ColSpMatrix;
|
||||
|
||||
public:
|
||||
enum { UpLo = _UpLo };
|
||||
enum { UpLo = UpLo_ };
|
||||
PastixLLT() : Base()
|
||||
{
|
||||
init();
|
||||
@ -604,16 +604,16 @@ class PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> >
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class SimplicialLDLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo>
|
||||
class PastixLDLT : public PastixBase< PastixLDLT<_MatrixType, _UpLo> >
|
||||
template<typename MatrixType_, int UpLo_>
|
||||
class PastixLDLT : public PastixBase< PastixLDLT<MatrixType_, UpLo_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef PastixBase<PastixLDLT<MatrixType, _UpLo> > Base;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef PastixBase<PastixLDLT<MatrixType, UpLo_> > Base;
|
||||
typedef typename Base::ColSpMatrix ColSpMatrix;
|
||||
|
||||
public:
|
||||
enum { UpLo = _UpLo };
|
||||
enum { UpLo = UpLo_ };
|
||||
PastixLDLT():Base()
|
||||
{
|
||||
init();
|
||||
|
@ -34,9 +34,9 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
template<typename _MatrixType> class PardisoLU;
|
||||
template<typename _MatrixType, int Options=Upper> class PardisoLLT;
|
||||
template<typename _MatrixType, int Options=Upper> class PardisoLDLT;
|
||||
template<typename MatrixType_> class PardisoLU;
|
||||
template<typename MatrixType_, int Options=Upper> class PardisoLLT;
|
||||
template<typename MatrixType_, int Options=Upper> class PardisoLDLT;
|
||||
|
||||
namespace internal
|
||||
{
|
||||
@ -66,31 +66,31 @@ namespace internal
|
||||
|
||||
template<class Pardiso> struct pardiso_traits;
|
||||
|
||||
template<typename _MatrixType>
|
||||
struct pardiso_traits< PardisoLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
struct pardiso_traits< PardisoLU<MatrixType_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int Options>
|
||||
struct pardiso_traits< PardisoLLT<_MatrixType, Options> >
|
||||
template<typename MatrixType_, int Options>
|
||||
struct pardiso_traits< PardisoLLT<MatrixType_, Options> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int Options>
|
||||
struct pardiso_traits< PardisoLDLT<_MatrixType, Options> >
|
||||
template<typename MatrixType_, int Options>
|
||||
struct pardiso_traits< PardisoLDLT<MatrixType_, Options> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename _MatrixType::StorageIndex StorageIndex;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::StorageIndex StorageIndex;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
@ -375,7 +375,7 @@ void PardisoImpl<Derived>::_solve_impl(const MatrixBase<BDerived> &b, MatrixBase
|
||||
* By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set:
|
||||
* \code solver.pardisoParameterArray()[59] = 1; \endcode
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
@ -437,21 +437,21 @@ class PardisoLU : public PardisoImpl< PardisoLU<MatrixType> >
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class SimplicialLLT
|
||||
*/
|
||||
template<typename MatrixType, int _UpLo>
|
||||
class PardisoLLT : public PardisoImpl< PardisoLLT<MatrixType,_UpLo> >
|
||||
template<typename MatrixType, int UpLo_>
|
||||
class PardisoLLT : public PardisoImpl< PardisoLLT<MatrixType,UpLo_> >
|
||||
{
|
||||
protected:
|
||||
typedef PardisoImpl< PardisoLLT<MatrixType,_UpLo> > Base;
|
||||
typedef PardisoImpl< PardisoLLT<MatrixType,UpLo_> > Base;
|
||||
using Base::pardisoInit;
|
||||
using Base::m_matrix;
|
||||
friend class PardisoImpl< PardisoLLT<MatrixType,_UpLo> >;
|
||||
friend class PardisoImpl< PardisoLLT<MatrixType,UpLo_> >;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename Base::Scalar Scalar;
|
||||
typedef typename Base::RealScalar RealScalar;
|
||||
typedef typename Base::StorageIndex StorageIndex;
|
||||
enum { UpLo = _UpLo };
|
||||
enum { UpLo = UpLo_ };
|
||||
using Base::compute;
|
||||
|
||||
PardisoLLT()
|
||||
|
@ -14,8 +14,8 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType> struct traits<ColPivHouseholderQR<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_> struct traits<ColPivHouseholderQR<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -31,7 +31,7 @@ template<typename _MatrixType> struct traits<ColPivHouseholderQR<_MatrixType> >
|
||||
*
|
||||
* \brief Householder rank-revealing QR decomposition of a matrix with column-pivoting
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition
|
||||
*
|
||||
* This class performs a rank-revealing QR decomposition of a matrix \b A into matrices \b P, \b Q and \b R
|
||||
* such that
|
||||
@ -48,12 +48,12 @@ template<typename _MatrixType> struct traits<ColPivHouseholderQR<_MatrixType> >
|
||||
*
|
||||
* \sa MatrixBase::colPivHouseholderQr()
|
||||
*/
|
||||
template<typename _MatrixType> class ColPivHouseholderQR
|
||||
: public SolverBase<ColPivHouseholderQR<_MatrixType> >
|
||||
template<typename MatrixType_> class ColPivHouseholderQR
|
||||
: public SolverBase<ColPivHouseholderQR<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<ColPivHouseholderQR> Base;
|
||||
friend class SolverBase<ColPivHouseholderQR>;
|
||||
|
||||
@ -582,9 +582,9 @@ void ColPivHouseholderQR<MatrixType>::computeInPlace()
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void ColPivHouseholderQR<MatrixType_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index nonzero_pivots = nonzeroPivots();
|
||||
|
||||
@ -606,9 +606,9 @@ void ColPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &
|
||||
for(Index i = nonzero_pivots; i < cols(); ++i) dst.row(m_colsPermutation.indices().coeff(i)).setZero();
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void ColPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void ColPivHouseholderQR<MatrixType_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index nonzero_pivots = nonzeroPivots();
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template <typename _MatrixType>
|
||||
struct traits<CompleteOrthogonalDecomposition<_MatrixType> >
|
||||
: traits<_MatrixType> {
|
||||
template <typename MatrixType_>
|
||||
struct traits<CompleteOrthogonalDecomposition<MatrixType_> >
|
||||
: traits<MatrixType_> {
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
typedef int StorageIndex;
|
||||
@ -47,11 +47,11 @@ struct traits<CompleteOrthogonalDecomposition<_MatrixType> >
|
||||
*
|
||||
* \sa MatrixBase::completeOrthogonalDecomposition()
|
||||
*/
|
||||
template <typename _MatrixType> class CompleteOrthogonalDecomposition
|
||||
: public SolverBase<CompleteOrthogonalDecomposition<_MatrixType> >
|
||||
template <typename MatrixType_> class CompleteOrthogonalDecomposition
|
||||
: public SolverBase<CompleteOrthogonalDecomposition<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<CompleteOrthogonalDecomposition> Base;
|
||||
|
||||
template<typename Derived>
|
||||
@ -529,9 +529,9 @@ void CompleteOrthogonalDecomposition<MatrixType>::applyZAdjointOnTheLeftInPlace(
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template <typename _MatrixType>
|
||||
template <typename MatrixType_>
|
||||
template <typename RhsType, typename DstType>
|
||||
void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl(
|
||||
void CompleteOrthogonalDecomposition<MatrixType_>::_solve_impl(
|
||||
const RhsType& rhs, DstType& dst) const {
|
||||
const Index rank = this->rank();
|
||||
if (rank == 0) {
|
||||
@ -561,9 +561,9 @@ void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl(
|
||||
dst = colsPermutation() * dst;
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void CompleteOrthogonalDecomposition<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void CompleteOrthogonalDecomposition<MatrixType_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index rank = this->rank();
|
||||
|
||||
|
@ -15,8 +15,8 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _MatrixType> struct traits<FullPivHouseholderQR<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_> struct traits<FullPivHouseholderQR<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -40,7 +40,7 @@ struct traits<FullPivHouseholderQRMatrixQReturnType<MatrixType> >
|
||||
*
|
||||
* \brief Householder rank-revealing QR decomposition of a matrix with full pivoting
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition
|
||||
*
|
||||
* This class performs a rank-revealing QR decomposition of a matrix \b A into matrices \b P, \b P', \b Q and \b R
|
||||
* such that
|
||||
@ -57,12 +57,12 @@ struct traits<FullPivHouseholderQRMatrixQReturnType<MatrixType> >
|
||||
*
|
||||
* \sa MatrixBase::fullPivHouseholderQr()
|
||||
*/
|
||||
template<typename _MatrixType> class FullPivHouseholderQR
|
||||
: public SolverBase<FullPivHouseholderQR<_MatrixType> >
|
||||
template<typename MatrixType_> class FullPivHouseholderQR
|
||||
: public SolverBase<FullPivHouseholderQR<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<FullPivHouseholderQR> Base;
|
||||
friend class SolverBase<FullPivHouseholderQR>;
|
||||
|
||||
@ -539,9 +539,9 @@ void FullPivHouseholderQR<MatrixType>::computeInPlace()
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void FullPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void FullPivHouseholderQR<MatrixType_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index l_rank = rank();
|
||||
|
||||
@ -573,9 +573,9 @@ void FullPivHouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType
|
||||
for(Index i = l_rank; i < cols(); ++i) dst.row(m_cols_permutation.indices().coeff(i)).setZero();
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void FullPivHouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void FullPivHouseholderQR<MatrixType_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index l_rank = rank();
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
template<typename _MatrixType> struct traits<HouseholderQR<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_> struct traits<HouseholderQR<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef MatrixXpr XprKind;
|
||||
typedef SolverStorage StorageKind;
|
||||
@ -33,7 +33,7 @@ template<typename _MatrixType> struct traits<HouseholderQR<_MatrixType> >
|
||||
*
|
||||
* \brief Householder QR decomposition of a matrix
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the QR decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the QR decomposition
|
||||
*
|
||||
* This class performs a QR decomposition of a matrix \b A into matrices \b Q and \b R
|
||||
* such that
|
||||
@ -53,12 +53,12 @@ template<typename _MatrixType> struct traits<HouseholderQR<_MatrixType> >
|
||||
*
|
||||
* \sa MatrixBase::householderQr()
|
||||
*/
|
||||
template<typename _MatrixType> class HouseholderQR
|
||||
: public SolverBase<HouseholderQR<_MatrixType> >
|
||||
template<typename MatrixType_> class HouseholderQR
|
||||
: public SolverBase<HouseholderQR<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef SolverBase<HouseholderQR> Base;
|
||||
friend class SolverBase<HouseholderQR>;
|
||||
|
||||
@ -356,9 +356,9 @@ struct householder_qr_inplace_blocked
|
||||
} // end namespace internal
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<typename RhsType, typename DstType>
|
||||
void HouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
void HouseholderQR<MatrixType_>::_solve_impl(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index rank = (std::min)(rows(), cols());
|
||||
|
||||
@ -374,9 +374,9 @@ void HouseholderQR<_MatrixType>::_solve_impl(const RhsType &rhs, DstType &dst) c
|
||||
dst.bottomRows(cols()-rank).setZero();
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
template<typename MatrixType_>
|
||||
template<bool Conjugate, typename RhsType, typename DstType>
|
||||
void HouseholderQR<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
void HouseholderQR<MatrixType_>::_solve_impl_transposed(const RhsType &rhs, DstType &dst) const
|
||||
{
|
||||
const Index rank = (std::min)(rows(), cols());
|
||||
|
||||
|
@ -50,21 +50,21 @@ namespace Eigen {
|
||||
* R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix.
|
||||
* NOTE : The Index type of R is always SuiteSparse_long. You can get it with SPQR::Index
|
||||
*
|
||||
* \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<>
|
||||
* \tparam MatrixType_ The type of the sparse matrix A, must be a column-major SparseMatrix<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
*
|
||||
*/
|
||||
template<typename _MatrixType>
|
||||
class SPQR : public SparseSolverBase<SPQR<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class SPQR : public SparseSolverBase<SPQR<MatrixType_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<SPQR<_MatrixType> > Base;
|
||||
typedef SparseSolverBase<SPQR<MatrixType_> > Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef typename _MatrixType::Scalar Scalar;
|
||||
typedef typename _MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType_::Scalar Scalar;
|
||||
typedef typename MatrixType_::RealScalar RealScalar;
|
||||
typedef SuiteSparse_long StorageIndex ;
|
||||
typedef SparseMatrix<Scalar, ColMajor, StorageIndex> MatrixType;
|
||||
typedef Map<PermutationMatrix<Dynamic, Dynamic, StorageIndex> > PermutationType;
|
||||
@ -90,7 +90,7 @@ class SPQR : public SparseSolverBase<SPQR<_MatrixType> >
|
||||
cholmod_l_start(&m_cc);
|
||||
}
|
||||
|
||||
explicit SPQR(const _MatrixType& matrix)
|
||||
explicit SPQR(const MatrixType_& matrix)
|
||||
: m_analysisIsOk(false),
|
||||
m_factorizationIsOk(false),
|
||||
m_isRUpToDate(false),
|
||||
@ -122,7 +122,7 @@ class SPQR : public SparseSolverBase<SPQR<_MatrixType> >
|
||||
std::free(m_HPinv);
|
||||
}
|
||||
|
||||
void compute(const _MatrixType& matrix)
|
||||
void compute(const MatrixType_& matrix)
|
||||
{
|
||||
if(m_isInitialized) SPQR_free();
|
||||
|
||||
|
@ -33,15 +33,15 @@ namespace Eigen {
|
||||
IOFormat bdcsvdfmt(8, 0, ", ", "\n", " [", "]");
|
||||
#endif
|
||||
|
||||
template<typename _MatrixType> class BDCSVD;
|
||||
template<typename MatrixType_> class BDCSVD;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _MatrixType>
|
||||
struct traits<BDCSVD<_MatrixType> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_>
|
||||
struct traits<BDCSVD<MatrixType_> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
@ -54,7 +54,7 @@ struct traits<BDCSVD<_MatrixType> >
|
||||
*
|
||||
* \brief class Bidiagonal Divide and Conquer SVD
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the SVD decomposition
|
||||
*
|
||||
* This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization,
|
||||
* and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class JacobiSVD.
|
||||
@ -69,8 +69,8 @@ struct traits<BDCSVD<_MatrixType> >
|
||||
*
|
||||
* \sa class JacobiSVD
|
||||
*/
|
||||
template<typename _MatrixType>
|
||||
class BDCSVD : public SVDBase<BDCSVD<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class BDCSVD : public SVDBase<BDCSVD<MatrixType_> >
|
||||
{
|
||||
typedef SVDBase<BDCSVD> Base;
|
||||
|
||||
@ -80,7 +80,7 @@ public:
|
||||
using Base::computeU;
|
||||
using Base::computeV;
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
||||
typedef typename NumTraits<RealScalar>::Literal Literal;
|
||||
|
@ -423,11 +423,11 @@ struct svd_precondition_2x2_block_to_be_real<MatrixType, QRPreconditioner, true>
|
||||
}
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int QRPreconditioner>
|
||||
struct traits<JacobiSVD<_MatrixType,QRPreconditioner> >
|
||||
: traits<_MatrixType>
|
||||
template<typename MatrixType_, int QRPreconditioner>
|
||||
struct traits<JacobiSVD<MatrixType_,QRPreconditioner> >
|
||||
: traits<MatrixType_>
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
@ -439,7 +439,7 @@ struct traits<JacobiSVD<_MatrixType,QRPreconditioner> >
|
||||
*
|
||||
* \brief Two-sided Jacobi SVD decomposition of a rectangular matrix
|
||||
*
|
||||
* \tparam _MatrixType the type of the matrix of which we are computing the SVD decomposition
|
||||
* \tparam MatrixType_ the type of the matrix of which we are computing the SVD decomposition
|
||||
* \tparam QRPreconditioner this optional parameter allows to specify the type of QR decomposition that will be used internally
|
||||
* for the R-SVD step for non-square matrices. See discussion of possible values below.
|
||||
*
|
||||
@ -485,13 +485,13 @@ struct traits<JacobiSVD<_MatrixType,QRPreconditioner> >
|
||||
*
|
||||
* \sa MatrixBase::jacobiSvd()
|
||||
*/
|
||||
template<typename _MatrixType, int QRPreconditioner> class JacobiSVD
|
||||
: public SVDBase<JacobiSVD<_MatrixType,QRPreconditioner> >
|
||||
template<typename MatrixType_, int QRPreconditioner> class JacobiSVD
|
||||
: public SVDBase<JacobiSVD<MatrixType_,QRPreconditioner> >
|
||||
{
|
||||
typedef SVDBase<JacobiSVD> Base;
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
||||
enum {
|
||||
@ -601,9 +601,9 @@ template<typename _MatrixType, int QRPreconditioner> class JacobiSVD
|
||||
using Base::m_prescribedThreshold;
|
||||
WorkMatrixType m_workMatrix;
|
||||
|
||||
template<typename __MatrixType, int _QRPreconditioner, bool _IsComplex>
|
||||
template<typename MatrixType__, int QRPreconditioner_, bool IsComplex_>
|
||||
friend struct internal::svd_precondition_2x2_block_to_be_real;
|
||||
template<typename __MatrixType, int _QRPreconditioner, int _Case, bool _DoAnything>
|
||||
template<typename MatrixType__, int QRPreconditioner_, int Case_, bool DoAnything_>
|
||||
friend struct internal::qr_preconditioner_impl;
|
||||
|
||||
internal::qr_preconditioner_impl<MatrixType, QRPreconditioner, internal::PreconditionIfMoreColsThanRows> m_qr_precond_morecols;
|
||||
|
@ -17,11 +17,11 @@ namespace internal {
|
||||
// UpperBidiagonalization will probably be replaced by a Bidiagonalization class, don't want to make it stable API.
|
||||
// At the same time, it's useful to keep for now as it's about the only thing that is testing the BandMatrix class.
|
||||
|
||||
template<typename _MatrixType> class UpperBidiagonalization
|
||||
template<typename MatrixType_> class UpperBidiagonalization
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum {
|
||||
RowsAtCompileTime = MatrixType::RowsAtCompileTime,
|
||||
ColsAtCompileTime = MatrixType::ColsAtCompileTime,
|
||||
@ -355,8 +355,8 @@ void upperbidiagonalization_inplace_blocked(MatrixType& A, BidiagType& bidiagona
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::computeUnblocked(const _MatrixType& matrix)
|
||||
template<typename MatrixType_>
|
||||
UpperBidiagonalization<MatrixType_>& UpperBidiagonalization<MatrixType_>::computeUnblocked(const MatrixType_& matrix)
|
||||
{
|
||||
Index rows = matrix.rows();
|
||||
Index cols = matrix.cols();
|
||||
@ -377,8 +377,8 @@ UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::comput
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename _MatrixType>
|
||||
UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::compute(const _MatrixType& matrix)
|
||||
template<typename MatrixType_>
|
||||
UpperBidiagonalization<MatrixType_>& UpperBidiagonalization<MatrixType_>::compute(const MatrixType_& matrix)
|
||||
{
|
||||
Index rows = matrix.rows();
|
||||
Index cols = matrix.cols();
|
||||
|
@ -271,17 +271,17 @@ class SimplicialCholeskyBase : public SparseSolverBase<Derived>
|
||||
RealScalar m_shiftScale;
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLLT;
|
||||
template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialLDLT;
|
||||
template<typename _MatrixType, int _UpLo = Lower, typename _Ordering = AMDOrdering<typename _MatrixType::StorageIndex> > class SimplicialCholesky;
|
||||
template<typename MatrixType_, int UpLo_ = Lower, typename Ordering_ = AMDOrdering<typename MatrixType_::StorageIndex> > class SimplicialLLT;
|
||||
template<typename MatrixType_, int UpLo_ = Lower, typename Ordering_ = AMDOrdering<typename MatrixType_::StorageIndex> > class SimplicialLDLT;
|
||||
template<typename MatrixType_, int UpLo_ = Lower, typename Ordering_ = AMDOrdering<typename MatrixType_::StorageIndex> > class SimplicialCholesky;
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_, int UpLo_, typename Ordering_> struct traits<SimplicialLLT<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Ordering OrderingType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Ordering_ OrderingType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
|
||||
@ -291,11 +291,11 @@ template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<Simp
|
||||
static inline MatrixU getU(const CholMatrixType& m) { return MatrixU(m.adjoint()); }
|
||||
};
|
||||
|
||||
template<typename _MatrixType,int _UpLo, typename _Ordering> struct traits<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_,int UpLo_, typename Ordering_> struct traits<SimplicialLDLT<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Ordering OrderingType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Ordering_ OrderingType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
|
||||
@ -305,11 +305,11 @@ template<typename _MatrixType,int _UpLo, typename _Ordering> struct traits<Simpl
|
||||
static inline MatrixU getU(const CholMatrixType& m) { return MatrixU(m.adjoint()); }
|
||||
};
|
||||
|
||||
template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_, int UpLo_, typename Ordering_> struct traits<SimplicialCholesky<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _Ordering OrderingType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef Ordering_ OrderingType;
|
||||
enum { UpLo = UpLo_ };
|
||||
};
|
||||
|
||||
}
|
||||
@ -325,21 +325,21 @@ template<typename _MatrixType, int _UpLo, typename _Ordering> struct traits<Simp
|
||||
* In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization
|
||||
* such that the factorized matrix is P A P^-1.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
* \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>
|
||||
* \tparam Ordering_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
* \sa class SimplicialLDLT, class AMDOrdering, class NaturalOrdering
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo, typename _Ordering>
|
||||
class SimplicialLLT : public SimplicialCholeskyBase<SimplicialLLT<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_, int UpLo_, typename Ordering_>
|
||||
class SimplicialLLT : public SimplicialCholeskyBase<SimplicialLLT<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef SimplicialCholeskyBase<SimplicialLLT> Base;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
@ -416,21 +416,21 @@ public:
|
||||
* In order to reduce the fill-in, a symmetric permutation P is applied prior to the factorization
|
||||
* such that the factorized matrix is P A P^-1.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam _UpLo the triangular part that will be used for the computations. It can be Lower
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam UpLo_ the triangular part that will be used for the computations. It can be Lower
|
||||
* or Upper. Default is Lower.
|
||||
* \tparam _Ordering The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>
|
||||
* \tparam Ordering_ The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
* \sa class SimplicialLLT, class AMDOrdering, class NaturalOrdering
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo, typename _Ordering>
|
||||
class SimplicialLDLT : public SimplicialCholeskyBase<SimplicialLDLT<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_, int UpLo_, typename Ordering_>
|
||||
class SimplicialLDLT : public SimplicialCholeskyBase<SimplicialLDLT<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef SimplicialCholeskyBase<SimplicialLDLT> Base;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
@ -507,12 +507,12 @@ public:
|
||||
*
|
||||
* \sa class SimplicialLDLT, class SimplicialLLT
|
||||
*/
|
||||
template<typename _MatrixType, int _UpLo, typename _Ordering>
|
||||
class SimplicialCholesky : public SimplicialCholeskyBase<SimplicialCholesky<_MatrixType,_UpLo,_Ordering> >
|
||||
template<typename MatrixType_, int UpLo_, typename Ordering_>
|
||||
class SimplicialCholesky : public SimplicialCholeskyBase<SimplicialCholesky<MatrixType_,UpLo_,Ordering_> >
|
||||
{
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
enum { UpLo = _UpLo };
|
||||
typedef MatrixType_ MatrixType;
|
||||
enum { UpLo = UpLo_ };
|
||||
typedef SimplicialCholeskyBase<SimplicialCholesky> Base;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
|
@ -19,12 +19,12 @@ namespace internal {
|
||||
*
|
||||
* See BasicSparseLLT and SparseProduct for usage examples.
|
||||
*/
|
||||
template<typename _Scalar, typename _StorageIndex>
|
||||
template<typename Scalar_, typename StorageIndex_>
|
||||
class AmbiVector
|
||||
{
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
||||
explicit AmbiVector(Index size)
|
||||
@ -125,8 +125,8 @@ class AmbiVector
|
||||
};
|
||||
|
||||
/** \returns the number of non zeros in the current sub vector */
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
Index AmbiVector<_Scalar,_StorageIndex>::nonZeros() const
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
Index AmbiVector<Scalar_,StorageIndex_>::nonZeros() const
|
||||
{
|
||||
if (m_mode==IsSparse)
|
||||
return m_llSize;
|
||||
@ -134,8 +134,8 @@ Index AmbiVector<_Scalar,_StorageIndex>::nonZeros() const
|
||||
return m_end - m_start;
|
||||
}
|
||||
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
void AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity)
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
void AmbiVector<Scalar_,StorageIndex_>::init(double estimatedDensity)
|
||||
{
|
||||
if (estimatedDensity>0.1)
|
||||
init(IsDense);
|
||||
@ -143,8 +143,8 @@ void AmbiVector<_Scalar,_StorageIndex>::init(double estimatedDensity)
|
||||
init(IsSparse);
|
||||
}
|
||||
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
void AmbiVector<_Scalar,_StorageIndex>::init(int mode)
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
void AmbiVector<Scalar_,StorageIndex_>::init(int mode)
|
||||
{
|
||||
m_mode = mode;
|
||||
// This is only necessary in sparse mode, but we set these unconditionally to avoid some maybe-uninitialized warnings
|
||||
@ -160,15 +160,15 @@ void AmbiVector<_Scalar,_StorageIndex>::init(int mode)
|
||||
*
|
||||
* Don't worry, this function is extremely cheap.
|
||||
*/
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
void AmbiVector<_Scalar,_StorageIndex>::restart()
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
void AmbiVector<Scalar_,StorageIndex_>::restart()
|
||||
{
|
||||
m_llCurrent = m_llStart;
|
||||
}
|
||||
|
||||
/** Set all coefficients of current subvector to zero */
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
void AmbiVector<_Scalar,_StorageIndex>::setZero()
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
void AmbiVector<Scalar_,StorageIndex_>::setZero()
|
||||
{
|
||||
if (m_mode==IsDense)
|
||||
{
|
||||
@ -183,8 +183,8 @@ void AmbiVector<_Scalar,_StorageIndex>::setZero()
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i)
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
Scalar_& AmbiVector<Scalar_,StorageIndex_>::coeffRef(Index i)
|
||||
{
|
||||
if (m_mode==IsDense)
|
||||
return m_buffer[i];
|
||||
@ -252,8 +252,8 @@ _Scalar& AmbiVector<_Scalar,_StorageIndex>::coeffRef(Index i)
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
_Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i)
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
Scalar_& AmbiVector<Scalar_,StorageIndex_>::coeff(Index i)
|
||||
{
|
||||
if (m_mode==IsDense)
|
||||
return m_buffer[i];
|
||||
@ -280,11 +280,11 @@ _Scalar& AmbiVector<_Scalar,_StorageIndex>::coeff(Index i)
|
||||
}
|
||||
|
||||
/** Iterator over the nonzero coefficients */
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
class AmbiVector<_Scalar,_StorageIndex>::Iterator
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
class AmbiVector<Scalar_,StorageIndex_>::Iterator
|
||||
{
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
||||
/** Default constructor
|
||||
|
@ -18,13 +18,13 @@ namespace internal {
|
||||
* Stores a sparse set of values as a list of values and a list of indices.
|
||||
*
|
||||
*/
|
||||
template<typename _Scalar,typename _StorageIndex>
|
||||
template<typename Scalar_,typename StorageIndex_>
|
||||
class CompressedStorage
|
||||
{
|
||||
public:
|
||||
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -17,22 +17,22 @@ namespace Eigen {
|
||||
*
|
||||
* \brief Sparse matrix
|
||||
*
|
||||
* \param _Scalar the scalar type, i.e. the type of the coefficients
|
||||
* \param Scalar_ the scalar type, i.e. the type of the coefficients
|
||||
*
|
||||
* See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
|
||||
*
|
||||
*/
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Flags, typename _StorageIndex>
|
||||
struct traits<MappedSparseMatrix<_Scalar, _Flags, _StorageIndex> > : traits<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
|
||||
template<typename Scalar_, int _Flags, typename StorageIndex_>
|
||||
struct traits<MappedSparseMatrix<Scalar_, _Flags, StorageIndex_> > : traits<SparseMatrix<Scalar_, _Flags, StorageIndex_> >
|
||||
{};
|
||||
} // end namespace internal
|
||||
|
||||
template<typename _Scalar, int _Flags, typename _StorageIndex>
|
||||
template<typename Scalar_, int _Flags, typename StorageIndex_>
|
||||
class MappedSparseMatrix
|
||||
: public Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> >
|
||||
: public Map<SparseMatrix<Scalar_, _Flags, StorageIndex_> >
|
||||
{
|
||||
typedef Map<SparseMatrix<_Scalar, _Flags, _StorageIndex> > Base;
|
||||
typedef Map<SparseMatrix<Scalar_, _Flags, StorageIndex_> > Base;
|
||||
|
||||
public:
|
||||
|
||||
@ -49,11 +49,11 @@ class MappedSparseMatrix
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct evaluator<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
: evaluator<SparseCompressedBase<MappedSparseMatrix<_Scalar,_Options,_StorageIndex> > >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct evaluator<MappedSparseMatrix<Scalar_,Options_,StorageIndex_> >
|
||||
: evaluator<SparseCompressedBase<MappedSparseMatrix<Scalar_,Options_,StorageIndex_> > >
|
||||
{
|
||||
typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType;
|
||||
typedef MappedSparseMatrix<Scalar_,Options_,StorageIndex_> XprType;
|
||||
typedef evaluator<SparseCompressedBase<XprType> > Base;
|
||||
|
||||
evaluator() : Base() {}
|
||||
|
@ -283,13 +283,13 @@ public:
|
||||
|
||||
} // namespace internal
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>
|
||||
class BlockImpl<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true,Sparse>
|
||||
: public internal::sparse_matrix_block_impl<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols>
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int BlockRows, int BlockCols>
|
||||
class BlockImpl<SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true,Sparse>
|
||||
: public internal::sparse_matrix_block_impl<SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols>
|
||||
{
|
||||
public:
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> SparseMatrixType;
|
||||
typedef internal::sparse_matrix_block_impl<SparseMatrixType,BlockRows,BlockCols> Base;
|
||||
inline BlockImpl(SparseMatrixType& xpr, Index i)
|
||||
: Base(xpr, i)
|
||||
@ -302,13 +302,13 @@ public:
|
||||
using Base::operator=;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>
|
||||
class BlockImpl<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true,Sparse>
|
||||
: public internal::sparse_matrix_block_impl<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols>
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int BlockRows, int BlockCols>
|
||||
class BlockImpl<const SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true,Sparse>
|
||||
: public internal::sparse_matrix_block_impl<const SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols>
|
||||
{
|
||||
public:
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef const SparseMatrix<_Scalar, _Options, _StorageIndex> SparseMatrixType;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef const SparseMatrix<Scalar_, Options_, StorageIndex_> SparseMatrixType;
|
||||
typedef internal::sparse_matrix_block_impl<SparseMatrixType,BlockRows,BlockCols> Base;
|
||||
inline BlockImpl(SparseMatrixType& xpr, Index i)
|
||||
: Base(xpr, i)
|
||||
@ -545,20 +545,20 @@ public:
|
||||
inline operator bool() const { return m_outerPos < m_end; }
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>
|
||||
struct unary_evaluator<Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true>, IteratorBased>
|
||||
: evaluator<SparseCompressedBase<Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> > >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int BlockRows, int BlockCols>
|
||||
struct unary_evaluator<Block<SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true>, IteratorBased>
|
||||
: evaluator<SparseCompressedBase<Block<SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true> > >
|
||||
{
|
||||
typedef Block<SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> XprType;
|
||||
typedef Block<SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true> XprType;
|
||||
typedef evaluator<SparseCompressedBase<XprType> > Base;
|
||||
explicit unary_evaluator(const XprType &xpr) : Base(xpr) {}
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int BlockRows, int BlockCols>
|
||||
struct unary_evaluator<Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true>, IteratorBased>
|
||||
: evaluator<SparseCompressedBase<Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> > >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int BlockRows, int BlockCols>
|
||||
struct unary_evaluator<Block<const SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true>, IteratorBased>
|
||||
: evaluator<SparseCompressedBase<Block<const SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true> > >
|
||||
{
|
||||
typedef Block<const SparseMatrix<_Scalar, _Options, _StorageIndex>,BlockRows,BlockCols,true> XprType;
|
||||
typedef Block<const SparseMatrix<Scalar_, Options_, StorageIndex_>,BlockRows,BlockCols,true> XprType;
|
||||
typedef evaluator<SparseCompressedBase<XprType> > Base;
|
||||
explicit unary_evaluator(const XprType &xpr) : Base(xpr) {}
|
||||
};
|
||||
|
@ -73,8 +73,8 @@ struct sparse_time_dense_product_impl<SparseLhsType,DenseRhsType,DenseResType, t
|
||||
|
||||
// FIXME: what is the purpose of the following specialization? Is it for the BlockedSparse format?
|
||||
// -> let's disable it for now as it is conflicting with generic scalar*matrix and matrix*scalar operators
|
||||
// template<typename T1, typename T2/*, int _Options, typename _StrideType*/>
|
||||
// struct ScalarBinaryOpTraits<T1, Ref<T2/*, _Options, _StrideType*/> >
|
||||
// template<typename T1, typename T2/*, int Options_, typename _StrideType*/>
|
||||
// struct ScalarBinaryOpTraits<T1, Ref<T2/*, Options_, _StrideType*/> >
|
||||
// {
|
||||
// enum {
|
||||
// Defined = 1
|
||||
|
@ -29,10 +29,10 @@ namespace Eigen {
|
||||
*
|
||||
* More details on this storage sceheme are given in the \ref TutorialSparse "manual pages".
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e. the type of the coefficients
|
||||
* \tparam _Options Union of bit flags controlling the storage scheme. Currently the only possibility
|
||||
* \tparam Scalar_ the scalar type, i.e. the type of the coefficients
|
||||
* \tparam Options_ Union of bit flags controlling the storage scheme. Currently the only possibility
|
||||
* is ColMajor or RowMajor. The default is 0 which means column-major.
|
||||
* \tparam _StorageIndex the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int.
|
||||
* \tparam StorageIndex_ the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t). Default is \c int.
|
||||
*
|
||||
* \warning In %Eigen 3.2, the undocumented type \c SparseMatrix::Index was improperly defined as the storage index type (e.g., int),
|
||||
* whereas it is now (starting from %Eigen 3.3) deprecated and always defined as Eigen::Index.
|
||||
@ -43,11 +43,11 @@ namespace Eigen {
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct traits<SparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct traits<SparseMatrix<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
@ -55,21 +55,21 @@ struct traits<SparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
ColsAtCompileTime = Dynamic,
|
||||
MaxRowsAtCompileTime = Dynamic,
|
||||
MaxColsAtCompileTime = Dynamic,
|
||||
Flags = _Options | NestByRefBit | LvalueBit | CompressedAccessBit,
|
||||
Flags = Options_ | NestByRefBit | LvalueBit | CompressedAccessBit,
|
||||
SupportedAccessPatterns = InnerRandomAccessPattern
|
||||
};
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int DiagIndex>
|
||||
struct traits<Diagonal<SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int DiagIndex>
|
||||
struct traits<Diagonal<SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex> >
|
||||
{
|
||||
typedef SparseMatrix<_Scalar, _Options, _StorageIndex> MatrixType;
|
||||
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> MatrixType;
|
||||
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
|
||||
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Dense StorageKind;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef MatrixXpr XprKind;
|
||||
|
||||
enum {
|
||||
@ -81,9 +81,9 @@ struct traits<Diagonal<SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex
|
||||
};
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex, int DiagIndex>
|
||||
struct traits<Diagonal<const SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >
|
||||
: public traits<Diagonal<SparseMatrix<_Scalar, _Options, _StorageIndex>, DiagIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_, int DiagIndex>
|
||||
struct traits<Diagonal<const SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex> >
|
||||
: public traits<Diagonal<SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex> >
|
||||
{
|
||||
enum {
|
||||
Flags = 0
|
||||
@ -92,13 +92,13 @@ struct traits<Diagonal<const SparseMatrix<_Scalar, _Options, _StorageIndex>, Dia
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
class SparseMatrix
|
||||
: public SparseCompressedBase<SparseMatrix<_Scalar, _Options, _StorageIndex> >
|
||||
: public SparseCompressedBase<SparseMatrix<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef SparseCompressedBase<SparseMatrix> Base;
|
||||
using Base::convert_index;
|
||||
friend class SparseVector<_Scalar,0,_StorageIndex>;
|
||||
friend class SparseVector<Scalar_,0,StorageIndex_>;
|
||||
template<typename, typename, typename, typename, typename>
|
||||
friend struct internal::Assignment;
|
||||
public:
|
||||
@ -118,7 +118,7 @@ class SparseMatrix
|
||||
using Base::IsRowMajor;
|
||||
typedef internal::CompressedStorage<Scalar,StorageIndex> Storage;
|
||||
enum {
|
||||
Options = _Options
|
||||
Options = Options_
|
||||
};
|
||||
|
||||
typedef typename Base::IndexVector IndexVector;
|
||||
@ -1104,11 +1104,11 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa
|
||||
* an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather
|
||||
* be explicitly stored into a std::vector for instance.
|
||||
*/
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
template<typename InputIterators>
|
||||
void SparseMatrix<Scalar,_Options,_StorageIndex>::setFromTriplets(const InputIterators& begin, const InputIterators& end)
|
||||
void SparseMatrix<Scalar,Options_,StorageIndex_>::setFromTriplets(const InputIterators& begin, const InputIterators& end)
|
||||
{
|
||||
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,_Options,_StorageIndex> >(begin, end, *this, internal::scalar_sum_op<Scalar,Scalar>());
|
||||
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,Options_,StorageIndex_> >(begin, end, *this, internal::scalar_sum_op<Scalar,Scalar>());
|
||||
}
|
||||
|
||||
/** The same as setFromTriplets but when duplicates are met the functor \a dup_func is applied:
|
||||
@ -1120,17 +1120,17 @@ void SparseMatrix<Scalar,_Options,_StorageIndex>::setFromTriplets(const InputIte
|
||||
* mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });
|
||||
* \endcode
|
||||
*/
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
template<typename InputIterators,typename DupFunctor>
|
||||
void SparseMatrix<Scalar,_Options,_StorageIndex>::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func)
|
||||
void SparseMatrix<Scalar,Options_,StorageIndex_>::setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func)
|
||||
{
|
||||
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,_Options,_StorageIndex>, DupFunctor>(begin, end, *this, dup_func);
|
||||
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar,Options_,StorageIndex_>, DupFunctor>(begin, end, *this, dup_func);
|
||||
}
|
||||
|
||||
/** \internal */
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
template<typename DupFunctor>
|
||||
void SparseMatrix<Scalar,_Options,_StorageIndex>::collapseDuplicates(DupFunctor dup_func)
|
||||
void SparseMatrix<Scalar,Options_,StorageIndex_>::collapseDuplicates(DupFunctor dup_func)
|
||||
{
|
||||
eigen_assert(!isCompressed());
|
||||
// TODO, in practice we should be able to use m_innerNonZeros for that task
|
||||
@ -1168,9 +1168,9 @@ void SparseMatrix<Scalar,_Options,_StorageIndex>::collapseDuplicates(DupFunctor
|
||||
m_data.resize(m_outerIndex[m_outerSize]);
|
||||
}
|
||||
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
template<typename OtherDerived>
|
||||
EIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_StorageIndex>& SparseMatrix<Scalar,_Options,_StorageIndex>::operator=(const SparseMatrixBase<OtherDerived>& other)
|
||||
EIGEN_DONT_INLINE SparseMatrix<Scalar,Options_,StorageIndex_>& SparseMatrix<Scalar,Options_,StorageIndex_>::operator=(const SparseMatrixBase<OtherDerived>& other)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
|
||||
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
||||
@ -1241,8 +1241,8 @@ EIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_StorageIndex>& SparseMatrix<Scal
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insert(Index row, Index col)
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
typename SparseMatrix<Scalar_,Options_,StorageIndex_>::Scalar& SparseMatrix<Scalar_,Options_,StorageIndex_>::insert(Index row, Index col)
|
||||
{
|
||||
eigen_assert(row>=0 && row<rows() && col>=0 && col<cols());
|
||||
|
||||
@ -1361,8 +1361,8 @@ typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Sca
|
||||
return insertUncompressed(row,col);
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertUncompressed(Index row, Index col)
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
EIGEN_DONT_INLINE typename SparseMatrix<Scalar_,Options_,StorageIndex_>::Scalar& SparseMatrix<Scalar_,Options_,StorageIndex_>::insertUncompressed(Index row, Index col)
|
||||
{
|
||||
eigen_assert(!isCompressed());
|
||||
|
||||
@ -1393,8 +1393,8 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar&
|
||||
return (m_data.value(p) = Scalar(0));
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insertCompressed(Index row, Index col)
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
EIGEN_DONT_INLINE typename SparseMatrix<Scalar_,Options_,StorageIndex_>::Scalar& SparseMatrix<Scalar_,Options_,StorageIndex_>::insertCompressed(Index row, Index col)
|
||||
{
|
||||
eigen_assert(isCompressed());
|
||||
|
||||
@ -1502,12 +1502,12 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar&
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct evaluator<SparseMatrix<_Scalar,_Options,_StorageIndex> >
|
||||
: evaluator<SparseCompressedBase<SparseMatrix<_Scalar,_Options,_StorageIndex> > >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct evaluator<SparseMatrix<Scalar_,Options_,StorageIndex_> >
|
||||
: evaluator<SparseCompressedBase<SparseMatrix<Scalar_,Options_,StorageIndex_> > >
|
||||
{
|
||||
typedef evaluator<SparseCompressedBase<SparseMatrix<_Scalar,_Options,_StorageIndex> > > Base;
|
||||
typedef SparseMatrix<_Scalar,_Options,_StorageIndex> SparseMatrixType;
|
||||
typedef evaluator<SparseCompressedBase<SparseMatrix<Scalar_,Options_,StorageIndex_> > > Base;
|
||||
typedef SparseMatrix<Scalar_,Options_,StorageIndex_> SparseMatrixType;
|
||||
evaluator() : Base() {}
|
||||
explicit evaluator(const SparseMatrixType &mat) : Base(mat) {}
|
||||
};
|
||||
|
@ -165,9 +165,9 @@ protected:
|
||||
} // end namespace internal
|
||||
|
||||
// sparse matrix = sparse-product (can be sparse*sparse, sparse*perm, etc.)
|
||||
template<typename Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar, int Options_, typename StorageIndex_>
|
||||
template<typename Lhs, typename Rhs>
|
||||
SparseMatrix<Scalar,_Options,_StorageIndex>& SparseMatrix<Scalar,_Options,_StorageIndex>::operator=(const Product<Lhs,Rhs,AliasFreeProduct>& src)
|
||||
SparseMatrix<Scalar,Options_,StorageIndex_>& SparseMatrix<Scalar,Options_,StorageIndex_>::operator=(const Product<Lhs,Rhs,AliasFreeProduct>& src)
|
||||
{
|
||||
// std::cout << "in Assignment : " << DstOptions << "\n";
|
||||
SparseMatrix dst(src.rows(),src.cols());
|
||||
|
@ -25,9 +25,9 @@ SparseMatrixBase<Derived>::sum() const
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index>
|
||||
typename internal::traits<SparseMatrix<_Scalar,_Options,_Index> >::Scalar
|
||||
SparseMatrix<_Scalar,_Options,_Index>::sum() const
|
||||
template<typename Scalar_, int Options_, typename Index_>
|
||||
typename internal::traits<SparseMatrix<Scalar_,Options_,Index_> >::Scalar
|
||||
SparseMatrix<Scalar_,Options_,Index_>::sum() const
|
||||
{
|
||||
eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
|
||||
if(this->isCompressed())
|
||||
@ -36,9 +36,9 @@ SparseMatrix<_Scalar,_Options,_Index>::sum() const
|
||||
return Base::sum();
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index>
|
||||
typename internal::traits<SparseVector<_Scalar,_Options, _Index> >::Scalar
|
||||
SparseVector<_Scalar,_Options,_Index>::sum() const
|
||||
template<typename Scalar_, int Options_, typename Index_>
|
||||
typename internal::traits<SparseVector<Scalar_,Options_, Index_> >::Scalar
|
||||
SparseVector<Scalar_,Options_,Index_>::sum() const
|
||||
{
|
||||
eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
|
||||
return Matrix<Scalar,1,Dynamic>::Map(m_data.valuePtr(), m_data.size()).sum();
|
||||
|
@ -20,13 +20,13 @@ namespace internal {
|
||||
|
||||
template<typename Derived> class SparseRefBase;
|
||||
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>
|
||||
struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
|
||||
struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
: public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >
|
||||
{
|
||||
typedef SparseMatrix<MatScalar,MatOptions,MatIndex> PlainObjectType;
|
||||
enum {
|
||||
Options = _Options,
|
||||
Options = Options_,
|
||||
Flags = traits<PlainObjectType>::Flags | CompressedAccessBit | NestByRefBit
|
||||
};
|
||||
|
||||
@ -40,22 +40,22 @@ struct traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _Stride
|
||||
|
||||
};
|
||||
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>
|
||||
struct traits<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
: public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
|
||||
struct traits<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
: public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
{
|
||||
enum {
|
||||
Flags = (traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit
|
||||
};
|
||||
};
|
||||
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>
|
||||
struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
|
||||
struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
: public traits<SparseVector<MatScalar,MatOptions,MatIndex> >
|
||||
{
|
||||
typedef SparseVector<MatScalar,MatOptions,MatIndex> PlainObjectType;
|
||||
enum {
|
||||
Options = _Options,
|
||||
Options = Options_,
|
||||
Flags = traits<PlainObjectType>::Flags | CompressedAccessBit | NestByRefBit
|
||||
};
|
||||
|
||||
@ -68,9 +68,9 @@ struct traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _Stride
|
||||
|
||||
};
|
||||
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int _Options, typename _StrideType>
|
||||
struct traits<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
: public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
|
||||
template<typename MatScalar, int MatOptions, typename MatIndex, int Options_, typename _StrideType>
|
||||
struct traits<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
: public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options_, _StrideType> >
|
||||
{
|
||||
enum {
|
||||
Flags = (traits<SparseVector<MatScalar,MatOptions,MatIndex> >::Flags | CompressedAccessBit | NestByRefBit) & ~LvalueBit
|
||||
|
@ -40,13 +40,13 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename Matri
|
||||
|
||||
}
|
||||
|
||||
template<typename MatrixType, unsigned int _Mode> class SparseSelfAdjointView
|
||||
: public EigenBase<SparseSelfAdjointView<MatrixType,_Mode> >
|
||||
template<typename MatrixType, unsigned int Mode_> class SparseSelfAdjointView
|
||||
: public EigenBase<SparseSelfAdjointView<MatrixType,Mode_> >
|
||||
{
|
||||
public:
|
||||
|
||||
enum {
|
||||
Mode = _Mode,
|
||||
Mode = Mode_,
|
||||
TransposeMode = ((Mode & Upper) ? Lower : 0) | ((Mode & Lower) ? Upper : 0),
|
||||
RowsAtCompileTime = internal::traits<SparseSelfAdjointView>::RowsAtCompileTime,
|
||||
ColsAtCompileTime = internal::traits<SparseSelfAdjointView>::ColsAtCompileTime
|
||||
@ -516,7 +516,7 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename Matri
|
||||
}
|
||||
}
|
||||
|
||||
template<int _SrcMode,int _DstMode,typename MatrixType,int DstOrder>
|
||||
template<int SrcMode_,int DstMode_,typename MatrixType,int DstOrder>
|
||||
void permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixType::Scalar,DstOrder,typename MatrixType::StorageIndex>& _dest, const typename MatrixType::StorageIndex* perm)
|
||||
{
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
@ -529,8 +529,8 @@ void permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixTyp
|
||||
enum {
|
||||
SrcOrder = MatrixType::IsRowMajor ? RowMajor : ColMajor,
|
||||
StorageOrderMatch = int(SrcOrder) == int(DstOrder),
|
||||
DstMode = DstOrder==RowMajor ? (_DstMode==Upper ? Lower : Upper) : _DstMode,
|
||||
SrcMode = SrcOrder==RowMajor ? (_SrcMode==Upper ? Lower : Upper) : _SrcMode
|
||||
DstMode = DstOrder==RowMajor ? (DstMode_==Upper ? Lower : Upper) : DstMode_,
|
||||
SrcMode = SrcOrder==RowMajor ? (SrcMode_==Upper ? Lower : Upper) : SrcMode_
|
||||
};
|
||||
|
||||
MatEval matEval(mat);
|
||||
|
@ -49,10 +49,10 @@ const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern;
|
||||
const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern;
|
||||
const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern;
|
||||
|
||||
template<typename _Scalar, int _Flags = 0, typename _StorageIndex = int> class SparseMatrix;
|
||||
template<typename _Scalar, int _Flags = 0, typename _StorageIndex = int> class DynamicSparseMatrix;
|
||||
template<typename _Scalar, int _Flags = 0, typename _StorageIndex = int> class SparseVector;
|
||||
template<typename _Scalar, int _Flags = 0, typename _StorageIndex = int> class MappedSparseMatrix;
|
||||
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class SparseMatrix;
|
||||
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class DynamicSparseMatrix;
|
||||
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class SparseVector;
|
||||
template<typename Scalar_, int _Flags = 0, typename StorageIndex_ = int> class MappedSparseMatrix;
|
||||
|
||||
template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView;
|
||||
template<typename Lhs, typename Rhs> class SparseDiagonalProduct;
|
||||
@ -80,41 +80,41 @@ template<typename T> struct eval<T,Sparse>
|
||||
{};
|
||||
|
||||
template<typename T,int Cols,int Flags> struct sparse_eval<T,1,Cols,Flags> {
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::StorageIndex _StorageIndex;
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
typedef typename traits<T>::StorageIndex StorageIndex_;
|
||||
public:
|
||||
typedef SparseVector<_Scalar, RowMajor, _StorageIndex> type;
|
||||
typedef SparseVector<Scalar_, RowMajor, StorageIndex_> type;
|
||||
};
|
||||
|
||||
template<typename T,int Rows,int Flags> struct sparse_eval<T,Rows,1,Flags> {
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::StorageIndex _StorageIndex;
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
typedef typename traits<T>::StorageIndex StorageIndex_;
|
||||
public:
|
||||
typedef SparseVector<_Scalar, ColMajor, _StorageIndex> type;
|
||||
typedef SparseVector<Scalar_, ColMajor, StorageIndex_> type;
|
||||
};
|
||||
|
||||
// TODO this seems almost identical to plain_matrix_type<T, Sparse>
|
||||
template<typename T,int Rows,int Cols,int Flags> struct sparse_eval {
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::StorageIndex _StorageIndex;
|
||||
enum { _Options = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
typedef typename traits<T>::StorageIndex StorageIndex_;
|
||||
enum { Options_ = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };
|
||||
public:
|
||||
typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type;
|
||||
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> type;
|
||||
};
|
||||
|
||||
template<typename T,int Flags> struct sparse_eval<T,1,1,Flags> {
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
public:
|
||||
typedef Matrix<_Scalar, 1, 1> type;
|
||||
typedef Matrix<Scalar_, 1, 1> type;
|
||||
};
|
||||
|
||||
template<typename T> struct plain_matrix_type<T,Sparse>
|
||||
{
|
||||
typedef typename traits<T>::Scalar _Scalar;
|
||||
typedef typename traits<T>::StorageIndex _StorageIndex;
|
||||
enum { _Options = ((evaluator<T>::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };
|
||||
typedef typename traits<T>::Scalar Scalar_;
|
||||
typedef typename traits<T>::StorageIndex StorageIndex_;
|
||||
enum { Options_ = ((evaluator<T>::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor };
|
||||
public:
|
||||
typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type;
|
||||
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
@ -17,7 +17,7 @@ namespace Eigen {
|
||||
*
|
||||
* \brief a sparse vector class
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e. the type of the coefficients
|
||||
* \tparam Scalar_ the scalar type, i.e. the type of the coefficients
|
||||
*
|
||||
* See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.
|
||||
*
|
||||
@ -26,21 +26,21 @@ namespace Eigen {
|
||||
*/
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
struct traits<SparseVector<_Scalar, _Options, _StorageIndex> >
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
struct traits<SparseVector<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
IsColVector = (_Options & RowMajorBit) ? 0 : 1,
|
||||
IsColVector = (Options_ & RowMajorBit) ? 0 : 1,
|
||||
|
||||
RowsAtCompileTime = IsColVector ? Dynamic : 1,
|
||||
ColsAtCompileTime = IsColVector ? 1 : Dynamic,
|
||||
MaxRowsAtCompileTime = RowsAtCompileTime,
|
||||
MaxColsAtCompileTime = ColsAtCompileTime,
|
||||
Flags = _Options | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit,
|
||||
Flags = Options_ | NestByRefBit | LvalueBit | (IsColVector ? 0 : RowMajorBit) | CompressedAccessBit,
|
||||
SupportedAccessPatterns = InnerRandomAccessPattern
|
||||
};
|
||||
};
|
||||
@ -60,9 +60,9 @@ struct sparse_vector_assign_selector;
|
||||
|
||||
}
|
||||
|
||||
template<typename _Scalar, int _Options, typename _StorageIndex>
|
||||
template<typename Scalar_, int Options_, typename StorageIndex_>
|
||||
class SparseVector
|
||||
: public SparseCompressedBase<SparseVector<_Scalar, _Options, _StorageIndex> >
|
||||
: public SparseCompressedBase<SparseVector<Scalar_, Options_, StorageIndex_> >
|
||||
{
|
||||
typedef SparseCompressedBase<SparseVector> Base;
|
||||
using Base::convert_index;
|
||||
@ -75,7 +75,7 @@ class SparseVector
|
||||
enum { IsColVector = internal::traits<SparseVector>::IsColVector };
|
||||
|
||||
enum {
|
||||
Options = _Options
|
||||
Options = Options_
|
||||
};
|
||||
|
||||
EIGEN_STRONG_INLINE Index rows() const { return IsColVector ? m_size : 1; }
|
||||
@ -397,7 +397,7 @@ protected:
|
||||
static void check_template_parameters()
|
||||
{
|
||||
EIGEN_STATIC_ASSERT(NumTraits<StorageIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);
|
||||
EIGEN_STATIC_ASSERT((_Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS);
|
||||
EIGEN_STATIC_ASSERT((Options_&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS);
|
||||
}
|
||||
|
||||
Storage m_data;
|
||||
@ -406,17 +406,17 @@ protected:
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar, int _Options, typename _Index>
|
||||
struct evaluator<SparseVector<_Scalar,_Options,_Index> >
|
||||
: evaluator_base<SparseVector<_Scalar,_Options,_Index> >
|
||||
template<typename Scalar_, int Options_, typename Index_>
|
||||
struct evaluator<SparseVector<Scalar_,Options_,Index_> >
|
||||
: evaluator_base<SparseVector<Scalar_,Options_,Index_> >
|
||||
{
|
||||
typedef SparseVector<_Scalar,_Options,_Index> SparseVectorType;
|
||||
typedef SparseVector<Scalar_,Options_,Index_> SparseVectorType;
|
||||
typedef evaluator_base<SparseVectorType> Base;
|
||||
typedef typename SparseVectorType::InnerIterator InnerIterator;
|
||||
typedef typename SparseVectorType::ReverseInnerIterator ReverseInnerIterator;
|
||||
|
||||
enum {
|
||||
CoeffReadCost = NumTraits<_Scalar>::ReadCost,
|
||||
CoeffReadCost = NumTraits<Scalar_>::ReadCost,
|
||||
Flags = SparseVectorType::Flags
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
template <typename _MatrixType, typename _OrderingType = COLAMDOrdering<typename _MatrixType::StorageIndex> > class SparseLU;
|
||||
template <typename MatrixType_, typename OrderingType_ = COLAMDOrdering<typename MatrixType_::StorageIndex> > class SparseLU;
|
||||
template <typename MappedSparseMatrixType> struct SparseLUMatrixLReturnType;
|
||||
template <typename MatrixLType, typename MatrixUType> struct SparseLUMatrixUReturnType;
|
||||
|
||||
@ -119,25 +119,25 @@ private:
|
||||
* If this is the case for your matrices, you can try the basic scaling method at
|
||||
* "unsupported/Eigen/src/IterativeSolvers/Scaling.h"
|
||||
*
|
||||
* \tparam _MatrixType The type of the sparse matrix. It must be a column-major SparseMatrix<>
|
||||
* \tparam _OrderingType The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD
|
||||
* \tparam MatrixType_ The type of the sparse matrix. It must be a column-major SparseMatrix<>
|
||||
* \tparam OrderingType_ The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept
|
||||
* \sa \ref OrderingMethods_Module
|
||||
*/
|
||||
template <typename _MatrixType, typename _OrderingType>
|
||||
class SparseLU : public SparseSolverBase<SparseLU<_MatrixType,_OrderingType> >, public internal::SparseLUImpl<typename _MatrixType::Scalar, typename _MatrixType::StorageIndex>
|
||||
template <typename MatrixType_, typename OrderingType_>
|
||||
class SparseLU : public SparseSolverBase<SparseLU<MatrixType_,OrderingType_> >, public internal::SparseLUImpl<typename MatrixType_::Scalar, typename MatrixType_::StorageIndex>
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<SparseLU<_MatrixType,_OrderingType> > APIBase;
|
||||
typedef SparseSolverBase<SparseLU<MatrixType_,OrderingType_> > APIBase;
|
||||
using APIBase::m_isInitialized;
|
||||
public:
|
||||
using APIBase::_solve_impl;
|
||||
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _OrderingType OrderingType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef OrderingType_ OrderingType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
@ -197,9 +197,9 @@ class SparseLU : public SparseSolverBase<SparseLU<_MatrixType,_OrderingType> >,
|
||||
*
|
||||
* \sa adjoint(), solve()
|
||||
*/
|
||||
const SparseLUTransposeView<false,SparseLU<_MatrixType,_OrderingType> > transpose()
|
||||
const SparseLUTransposeView<false,SparseLU<MatrixType_,OrderingType_> > transpose()
|
||||
{
|
||||
SparseLUTransposeView<false, SparseLU<_MatrixType,_OrderingType> > transposeView;
|
||||
SparseLUTransposeView<false, SparseLU<MatrixType_,OrderingType_> > transposeView;
|
||||
transposeView.setSparseLU(this);
|
||||
transposeView.setIsInitialized(this->m_isInitialized);
|
||||
return transposeView;
|
||||
@ -218,9 +218,9 @@ class SparseLU : public SparseSolverBase<SparseLU<_MatrixType,_OrderingType> >,
|
||||
*
|
||||
* \sa transpose(), solve()
|
||||
*/
|
||||
const SparseLUTransposeView<true, SparseLU<_MatrixType,_OrderingType> > adjoint()
|
||||
const SparseLUTransposeView<true, SparseLU<MatrixType_,OrderingType_> > adjoint()
|
||||
{
|
||||
SparseLUTransposeView<true, SparseLU<_MatrixType,_OrderingType> > adjointView;
|
||||
SparseLUTransposeView<true, SparseLU<MatrixType_,OrderingType_> > adjointView;
|
||||
adjointView.setSparseLU(this);
|
||||
adjointView.setIsInitialized(this->m_isInitialized);
|
||||
return adjointView;
|
||||
|
@ -29,12 +29,12 @@ namespace internal {
|
||||
* SuperInnerIterator to iterate through all supernodes
|
||||
* Function for triangular solve
|
||||
*/
|
||||
template <typename _Scalar, typename _StorageIndex>
|
||||
template <typename Scalar_, typename StorageIndex_>
|
||||
class MappedSuperNodalMatrix
|
||||
{
|
||||
public:
|
||||
typedef _Scalar Scalar;
|
||||
typedef _StorageIndex StorageIndex;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef StorageIndex_ StorageIndex;
|
||||
typedef Matrix<StorageIndex,Dynamic,1> IndexVector;
|
||||
typedef Matrix<Scalar,Dynamic,1> ScalarVector;
|
||||
public:
|
||||
|
@ -59,8 +59,8 @@ namespace internal {
|
||||
* R is the sparse triangular or trapezoidal matrix. The later occurs when A is rank-deficient.
|
||||
* matrixR().topLeftCorner(rank(), rank()) always returns a triangular factor of full rank.
|
||||
*
|
||||
* \tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<>
|
||||
* \tparam _OrderingType The fill-reducing ordering method. See the \link OrderingMethods_Module
|
||||
* \tparam MatrixType_ The type of the sparse matrix A, must be a column-major SparseMatrix<>
|
||||
* \tparam OrderingType_ The fill-reducing ordering method. See the \link OrderingMethods_Module
|
||||
* OrderingMethods \endlink module for the list of built-in and external ordering methods.
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
@ -80,16 +80,16 @@ namespace internal {
|
||||
* \warning For complex matrices matrixQ().transpose() will actually return the adjoint matrix.
|
||||
*
|
||||
*/
|
||||
template<typename _MatrixType, typename _OrderingType>
|
||||
class SparseQR : public SparseSolverBase<SparseQR<_MatrixType,_OrderingType> >
|
||||
template<typename MatrixType_, typename OrderingType_>
|
||||
class SparseQR : public SparseSolverBase<SparseQR<MatrixType_,OrderingType_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<SparseQR<_MatrixType,_OrderingType> > Base;
|
||||
typedef SparseSolverBase<SparseQR<MatrixType_,OrderingType_> > Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
using Base::_solve_impl;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef _OrderingType OrderingType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef OrderingType_ OrderingType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
|
@ -313,7 +313,7 @@ MappedSparseMatrix<Scalar,Flags,Index> map_superlu(SluMatrix& sluMat)
|
||||
* \class SuperLUBase
|
||||
* \brief The base class for the direct and incomplete LU factorization of SuperLU
|
||||
*/
|
||||
template<typename _MatrixType, typename Derived>
|
||||
template<typename MatrixType_, typename Derived>
|
||||
class SuperLUBase : public SparseSolverBase<Derived>
|
||||
{
|
||||
protected:
|
||||
@ -321,7 +321,7 @@ class SuperLUBase : public SparseSolverBase<Derived>
|
||||
using Base::derived;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
@ -476,7 +476,7 @@ class SuperLUBase : public SparseSolverBase<Derived>
|
||||
* using the SuperLU library. The sparse matrix A must be squared and invertible. The vectors or matrices
|
||||
* X and B can be either dense or sparse.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
*
|
||||
* \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported.
|
||||
*
|
||||
@ -484,12 +484,12 @@ class SuperLUBase : public SparseSolverBase<Derived>
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class SparseLU
|
||||
*/
|
||||
template<typename _MatrixType>
|
||||
class SuperLU : public SuperLUBase<_MatrixType,SuperLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class SuperLU : public SuperLUBase<MatrixType_,SuperLU<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
typedef SuperLUBase<_MatrixType,SuperLU> Base;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef SuperLUBase<MatrixType_,SuperLU> Base;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename Base::Scalar Scalar;
|
||||
typedef typename Base::RealScalar RealScalar;
|
||||
typedef typename Base::StorageIndex StorageIndex;
|
||||
@ -830,19 +830,19 @@ typename SuperLU<MatrixType>::Scalar SuperLU<MatrixType>::determinant() const
|
||||
*
|
||||
* \warning This class is only for the 4.x versions of SuperLU. The 3.x and 5.x versions are not supported.
|
||||
*
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class IncompleteLUT, class ConjugateGradient, class BiCGSTAB
|
||||
*/
|
||||
|
||||
template<typename _MatrixType>
|
||||
class SuperILU : public SuperLUBase<_MatrixType,SuperILU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class SuperILU : public SuperLUBase<MatrixType_,SuperILU<MatrixType_> >
|
||||
{
|
||||
public:
|
||||
typedef SuperLUBase<_MatrixType,SuperILU> Base;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef SuperLUBase<MatrixType_,SuperILU> Base;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename Base::Scalar Scalar;
|
||||
typedef typename Base::RealScalar RealScalar;
|
||||
|
||||
|
@ -278,21 +278,21 @@ inline SuiteSparse_long umfpack_get_determinant(std::complex<double> *Mx, double
|
||||
*
|
||||
* \warning The input matrix A should be in a \b compressed and \b column-major form.
|
||||
* Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
|
||||
* \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
* \tparam MatrixType_ the type of the sparse matrix A, it must be a SparseMatrix<>
|
||||
*
|
||||
* \implsparsesolverconcept
|
||||
*
|
||||
* \sa \ref TutorialSparseSolverConcept, class SparseLU
|
||||
*/
|
||||
template<typename _MatrixType>
|
||||
class UmfPackLU : public SparseSolverBase<UmfPackLU<_MatrixType> >
|
||||
template<typename MatrixType_>
|
||||
class UmfPackLU : public SparseSolverBase<UmfPackLU<MatrixType_> >
|
||||
{
|
||||
protected:
|
||||
typedef SparseSolverBase<UmfPackLU<_MatrixType> > Base;
|
||||
typedef SparseSolverBase<UmfPackLU<MatrixType_> > Base;
|
||||
using Base::m_isInitialized;
|
||||
public:
|
||||
using Base::_solve_impl;
|
||||
typedef _MatrixType MatrixType;
|
||||
typedef MatrixType_ MatrixType;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef typename MatrixType::StorageIndex StorageIndex;
|
||||
|
@ -32,10 +32,10 @@ struct traits<image_retval_base<DecompositionType> >
|
||||
> ReturnType;
|
||||
};
|
||||
|
||||
template<typename _DecompositionType> struct image_retval_base
|
||||
: public ReturnByValue<image_retval_base<_DecompositionType> >
|
||||
template<typename DecompositionType_> struct image_retval_base
|
||||
: public ReturnByValue<image_retval_base<DecompositionType_> >
|
||||
{
|
||||
typedef _DecompositionType DecompositionType;
|
||||
typedef DecompositionType_ DecompositionType;
|
||||
typedef typename DecompositionType::MatrixType MatrixType;
|
||||
typedef ReturnByValue<image_retval_base> Base;
|
||||
|
||||
|
@ -34,10 +34,10 @@ struct traits<kernel_retval_base<DecompositionType> >
|
||||
> ReturnType;
|
||||
};
|
||||
|
||||
template<typename _DecompositionType> struct kernel_retval_base
|
||||
: public ReturnByValue<kernel_retval_base<_DecompositionType> >
|
||||
template<typename DecompositionType_> struct kernel_retval_base
|
||||
: public ReturnByValue<kernel_retval_base<DecompositionType_> >
|
||||
{
|
||||
typedef _DecompositionType DecompositionType;
|
||||
typedef DecompositionType_ DecompositionType;
|
||||
typedef ReturnByValue<kernel_retval_base> Base;
|
||||
|
||||
explicit kernel_retval_base(const DecompositionType& dec)
|
||||
|
@ -34,21 +34,21 @@ class GpuHelper
|
||||
Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required
|
||||
and does a proper call to the right glMultMatrix*() function according to the scalar type
|
||||
and storage order.
|
||||
\warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode().
|
||||
\warning glMatrixMode() must never be called directly. If you are unsure, use forceMatrixMode().
|
||||
\sa Matrix, loadMatrix(), forceMatrixMode()
|
||||
*/
|
||||
template<typename Scalar, int _Flags>
|
||||
void multMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);
|
||||
template<typename Scalar, int Flags_>
|
||||
void multMatrix(const Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget);
|
||||
|
||||
/** Load the matrix \a mat to the OpenGL matrix \a matrixTarget.
|
||||
Essentially, this helper function automatically calls glMatrixMode(matrixTarget) if required
|
||||
and does a proper call to the right glLoadMatrix*() or glLoadIdentity() function according to the scalar type
|
||||
and storage order.
|
||||
\warning glMatrixMode() must never be called directly. If your're unsure, use forceMatrixMode().
|
||||
\warning glMatrixMode() must never be called directly. If you are unsure, use forceMatrixMode().
|
||||
\sa Matrix, multMatrix(), forceMatrixMode()
|
||||
*/
|
||||
template<typename Scalar, int _Flags>
|
||||
void loadMatrix(const Eigen::Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);
|
||||
template<typename Scalar, int Flags_>
|
||||
void loadMatrix(const Eigen::Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget);
|
||||
|
||||
template<typename Scalar, typename Derived>
|
||||
void loadMatrix(
|
||||
@ -66,8 +66,8 @@ class GpuHelper
|
||||
|
||||
/** Push the OpenGL matrix \a matrixTarget and load \a mat.
|
||||
*/
|
||||
template<typename Scalar, int _Flags>
|
||||
inline void pushMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget);
|
||||
template<typename Scalar, int Flags_>
|
||||
inline void pushMatrix(const Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget);
|
||||
|
||||
template<typename Scalar, typename Derived>
|
||||
void pushMatrix(
|
||||
@ -113,22 +113,22 @@ extern GpuHelper gpu;
|
||||
|
||||
/** \internal
|
||||
*/
|
||||
template<bool RowMajor, int _Flags> struct GlMatrixHelper;
|
||||
template<bool RowMajor, int Flags_> struct GlMatrixHelper;
|
||||
|
||||
template<int _Flags> struct GlMatrixHelper<false,_Flags>
|
||||
template<int Flags_> struct GlMatrixHelper<false,Flags_>
|
||||
{
|
||||
static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glLoadMatrixf(mat.data()); }
|
||||
static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.data()); }
|
||||
static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glMultMatrixf(mat.data()); }
|
||||
static void multMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glMultMatrixd(mat.data()); }
|
||||
static void loadMatrix(const Matrix<float, 4,4, Flags_, 4,4>& mat) { glLoadMatrixf(mat.data()); }
|
||||
static void loadMatrix(const Matrix<double,4,4, Flags_, 4,4>& mat) { glLoadMatrixd(mat.data()); }
|
||||
static void multMatrix(const Matrix<float, 4,4, Flags_, 4,4>& mat) { glMultMatrixf(mat.data()); }
|
||||
static void multMatrix(const Matrix<double,4,4, Flags_, 4,4>& mat) { glMultMatrixd(mat.data()); }
|
||||
};
|
||||
|
||||
template<int _Flags> struct GlMatrixHelper<true,_Flags>
|
||||
template<int Flags_> struct GlMatrixHelper<true,Flags_>
|
||||
{
|
||||
static void loadMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glLoadMatrixf(mat.transpose().eval().data()); }
|
||||
static void loadMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glLoadMatrixd(mat.transpose().eval().data()); }
|
||||
static void multMatrix(const Matrix<float, 4,4, _Flags, 4,4>& mat) { glMultMatrixf(mat.transpose().eval().data()); }
|
||||
static void multMatrix(const Matrix<double,4,4, _Flags, 4,4>& mat) { glMultMatrixd(mat.transpose().eval().data()); }
|
||||
static void loadMatrix(const Matrix<float, 4,4, Flags_, 4,4>& mat) { glLoadMatrixf(mat.transpose().eval().data()); }
|
||||
static void loadMatrix(const Matrix<double,4,4, Flags_, 4,4>& mat) { glLoadMatrixd(mat.transpose().eval().data()); }
|
||||
static void multMatrix(const Matrix<float, 4,4, Flags_, 4,4>& mat) { glMultMatrixf(mat.transpose().eval().data()); }
|
||||
static void multMatrix(const Matrix<double,4,4, Flags_, 4,4>& mat) { glMultMatrixd(mat.transpose().eval().data()); }
|
||||
};
|
||||
|
||||
inline void GpuHelper::setMatrixTarget(GLenum matrixTarget)
|
||||
@ -137,11 +137,11 @@ inline void GpuHelper::setMatrixTarget(GLenum matrixTarget)
|
||||
glMatrixMode(mCurrentMatrixTarget=matrixTarget);
|
||||
}
|
||||
|
||||
template<typename Scalar, int _Flags>
|
||||
void GpuHelper::multMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)
|
||||
template<typename Scalar, int Flags_>
|
||||
void GpuHelper::multMatrix(const Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget)
|
||||
{
|
||||
setMatrixTarget(matrixTarget);
|
||||
GlMatrixHelper<_Flags&Eigen::RowMajorBit, _Flags>::multMatrix(mat);
|
||||
GlMatrixHelper<Flags_&Eigen::RowMajorBit, Flags_>::multMatrix(mat);
|
||||
}
|
||||
|
||||
template<typename Scalar, typename Derived>
|
||||
@ -153,11 +153,11 @@ void GpuHelper::loadMatrix(
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
template<typename Scalar, int _Flags>
|
||||
void GpuHelper::loadMatrix(const Eigen::Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)
|
||||
template<typename Scalar, int Flags_>
|
||||
void GpuHelper::loadMatrix(const Eigen::Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget)
|
||||
{
|
||||
setMatrixTarget(matrixTarget);
|
||||
GlMatrixHelper<(_Flags&Eigen::RowMajorBit)!=0, _Flags>::loadMatrix(mat);
|
||||
GlMatrixHelper<(Flags_&Eigen::RowMajorBit)!=0, Flags_>::loadMatrix(mat);
|
||||
}
|
||||
|
||||
inline void GpuHelper::pushMatrix(GLenum matrixTarget)
|
||||
@ -166,11 +166,11 @@ inline void GpuHelper::pushMatrix(GLenum matrixTarget)
|
||||
glPushMatrix();
|
||||
}
|
||||
|
||||
template<typename Scalar, int _Flags>
|
||||
inline void GpuHelper::pushMatrix(const Matrix<Scalar,4,4, _Flags, 4,4>& mat, GLenum matrixTarget)
|
||||
template<typename Scalar, int Flags_>
|
||||
inline void GpuHelper::pushMatrix(const Matrix<Scalar,4,4, Flags_, 4,4>& mat, GLenum matrixTarget)
|
||||
{
|
||||
pushMatrix(matrixTarget);
|
||||
GlMatrixHelper<_Flags&Eigen::RowMajorBit,_Flags>::loadMatrix(mat);
|
||||
GlMatrixHelper<Flags_&Eigen::RowMajorBit,Flags_>::loadMatrix(mat);
|
||||
}
|
||||
|
||||
template<typename Scalar, typename Derived>
|
||||
|
@ -132,11 +132,11 @@ inline static Frame lerpFrame(float alpha, const Frame& a, const Frame& b)
|
||||
Quaternionf(lerp(alpha,OrientationType(a.orientation),OrientationType(b.orientation))));
|
||||
}
|
||||
|
||||
template<typename _Scalar> class EulerAngles
|
||||
template<typename Scalar_> class EulerAngles
|
||||
{
|
||||
public:
|
||||
enum { Dim = 3 };
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef Matrix<Scalar,3,3> Matrix3;
|
||||
typedef Matrix<Scalar,3,1> Vector3;
|
||||
typedef Quaternion<Scalar> QuaternionType;
|
||||
|
@ -88,7 +88,7 @@ You may wonder, isn't it overengineering to have the storage in a separate class
|
||||
|
||||
Let's look at this constructor, in src/Core/DenseStorage.h. You can see that there are many partial template specializations of DenseStorages here, treating separately the cases where dimensions are Dynamic or fixed at compile-time. The partial specialization that we are looking at is:
|
||||
\code
|
||||
template<typename T, int _Cols> class DenseStorage<T, Dynamic, Dynamic, _Cols>
|
||||
template<typename T, int Cols_> class DenseStorage<T, Dynamic, Dynamic, Cols_>
|
||||
\endcode
|
||||
|
||||
Here, the constructor called is DenseStorage::DenseStorage(int size, int rows, int columns)
|
||||
@ -101,7 +101,7 @@ inline DenseStorage(int size, int rows, int) : m_data(internal::aligned_new<T>(s
|
||||
|
||||
Here, the \a m_data member is the actual array of coefficients of the matrix. As you see, it is dynamically allocated. Rather than calling new[] or malloc(), as you can see, we have our own internal::aligned_new defined in src/Core/util/Memory.h. What it does is that if vectorization is enabled, then it uses a platform-specific call to allocate a 128-bit-aligned array, as that is very useful for vectorization with both SSE2 and AltiVec. If vectorization is disabled, it amounts to the standard new[].
|
||||
|
||||
As you can see, the constructor also sets the \a m_rows member to \a size. Notice that there is no \a m_columns member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the _Cols template parameter is different from Dynamic. Namely, in our case, _Cols is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable.
|
||||
As you can see, the constructor also sets the \a m_rows member to \a size. Notice that there is no \a m_columns member: indeed, in this partial specialization of DenseStorage, we know the number of columns at compile-time, since the Cols_ template parameter is different from Dynamic. Namely, in our case, Cols_ is 1, which is to say that our vector is just a matrix with 1 column. Hence, there is no need to store the number of columns as a runtime variable.
|
||||
|
||||
When you call VectorXf::data() to get the pointer to the array of coefficients, it returns DenseStorage::data() which returns the \a m_data member.
|
||||
|
||||
|
@ -16,10 +16,10 @@ struct other_matrix_type
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
|
||||
struct other_matrix_type<Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
|
||||
template<typename Scalar_, int Rows_, int Cols_, int Options_, int MaxRows_, int MaxCols_>
|
||||
struct other_matrix_type<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_> >
|
||||
{
|
||||
typedef Matrix<_Scalar, _Rows, _Cols, _Options^RowMajor, _MaxRows, _MaxCols> type;
|
||||
typedef Matrix<Scalar_, Rows_, Cols_, Options_^RowMajor, MaxRows_, MaxCols_> type;
|
||||
};
|
||||
|
||||
template<typename MatrixType> void swap(const MatrixType& m)
|
||||
|
@ -37,23 +37,23 @@ namespace Eigen {
|
||||
*
|
||||
*/
|
||||
// TODO specialize Cwise
|
||||
template<typename _Scalar> class AlignedVector3;
|
||||
template<typename Scalar_> class AlignedVector3;
|
||||
|
||||
namespace internal {
|
||||
template<typename _Scalar> struct traits<AlignedVector3<_Scalar> >
|
||||
: traits<Matrix<_Scalar,3,1,0,4,1> >
|
||||
template<typename Scalar_> struct traits<AlignedVector3<Scalar_> >
|
||||
: traits<Matrix<Scalar_,3,1,0,4,1> >
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
template<typename _Scalar> class AlignedVector3
|
||||
: public MatrixBase<AlignedVector3<_Scalar> >
|
||||
template<typename Scalar_> class AlignedVector3
|
||||
: public MatrixBase<AlignedVector3<Scalar_> >
|
||||
{
|
||||
typedef Matrix<_Scalar,4,1> CoeffType;
|
||||
typedef Matrix<Scalar_,4,1> CoeffType;
|
||||
CoeffType m_coeffs;
|
||||
public:
|
||||
|
||||
typedef MatrixBase<AlignedVector3<_Scalar> > Base;
|
||||
typedef MatrixBase<AlignedVector3<Scalar_> > Base;
|
||||
EIGEN_DENSE_PUBLIC_INTERFACE(AlignedVector3)
|
||||
using Base::operator*;
|
||||
|
||||
@ -207,10 +207,10 @@ template<typename _Scalar> class AlignedVector3
|
||||
|
||||
namespace internal {
|
||||
|
||||
template<typename _Scalar>
|
||||
struct eval<AlignedVector3<_Scalar>, Dense>
|
||||
template<typename Scalar_>
|
||||
struct eval<AlignedVector3<Scalar_>, Dense>
|
||||
{
|
||||
typedef const AlignedVector3<_Scalar>& type;
|
||||
typedef const AlignedVector3<Scalar_>& type;
|
||||
};
|
||||
|
||||
template<typename Scalar>
|
||||
|
@ -122,16 +122,16 @@ struct traits<TensorRef<PlainObjectType> >
|
||||
};
|
||||
|
||||
|
||||
template<typename _Scalar, int NumIndices_, int Options, typename IndexType_>
|
||||
struct eval<Tensor<_Scalar, NumIndices_, Options, IndexType_>, Eigen::Dense>
|
||||
template<typename Scalar_, int NumIndices_, int Options, typename IndexType_>
|
||||
struct eval<Tensor<Scalar_, NumIndices_, Options, IndexType_>, Eigen::Dense>
|
||||
{
|
||||
typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;
|
||||
typedef const Tensor<Scalar_, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;
|
||||
};
|
||||
|
||||
template<typename _Scalar, int NumIndices_, int Options, typename IndexType_>
|
||||
struct eval<const Tensor<_Scalar, NumIndices_, Options, IndexType_>, Eigen::Dense>
|
||||
template<typename Scalar_, int NumIndices_, int Options, typename IndexType_>
|
||||
struct eval<const Tensor<Scalar_, NumIndices_, Options, IndexType_>, Eigen::Dense>
|
||||
{
|
||||
typedef const Tensor<_Scalar, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;
|
||||
typedef const Tensor<Scalar_, NumIndices_, Options, IndexType_>EIGEN_DEVICE_REF type;
|
||||
};
|
||||
|
||||
template<typename Scalar_, typename Dimensions, int Options, typename IndexType_>
|
||||
|
@ -637,21 +637,21 @@ struct enumerate_group_elements_noid<Multiply, Equality, id, type_list<>, initia
|
||||
* \tparam Equality The equality check operation that checks if two group elements
|
||||
* are equal to another.
|
||||
* \tparam id The identity element
|
||||
* \tparam _generators A list of (possibly redundant) generators of the group
|
||||
* \tparam Generators_ A list of (possibly redundant) generators of the group
|
||||
*/
|
||||
template<
|
||||
template<typename, typename> class Multiply,
|
||||
template<typename, typename> class Equality,
|
||||
typename id,
|
||||
typename _generators
|
||||
typename Generators_
|
||||
>
|
||||
struct enumerate_group_elements
|
||||
: public enumerate_group_elements_noid<
|
||||
Multiply,
|
||||
Equality,
|
||||
id,
|
||||
typename strip_identities<Equality, id, _generators>::type,
|
||||
strip_identities<Equality, id, _generators>::global_flags
|
||||
typename strip_identities<Equality, id, Generators_>::type,
|
||||
strip_identities<Equality, id, Generators_>::global_flags
|
||||
>
|
||||
{
|
||||
};
|
||||
|
@ -203,11 +203,11 @@ class FFT
|
||||
}
|
||||
*/
|
||||
|
||||
template <typename _Input>
|
||||
template <typename Input_>
|
||||
inline
|
||||
void fwd( std::vector<Complex> & dst, const std::vector<_Input> & src)
|
||||
void fwd( std::vector<Complex> & dst, const std::vector<Input_> & src)
|
||||
{
|
||||
if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) )
|
||||
if ( NumTraits<Input_>::IsComplex == 0 && HasFlag(HalfSpectrum) )
|
||||
dst.resize( (src.size()>>1)+1); // half the bins + Nyquist bin
|
||||
else
|
||||
dst.resize(src.size());
|
||||
@ -343,12 +343,12 @@ class FFT
|
||||
}
|
||||
}
|
||||
|
||||
template <typename _Output>
|
||||
template <typename Output_>
|
||||
inline
|
||||
void inv( std::vector<_Output> & dst, const std::vector<Complex> & src,Index nfft=-1)
|
||||
void inv( std::vector<Output_> & dst, const std::vector<Complex> & src,Index nfft=-1)
|
||||
{
|
||||
if (nfft<1)
|
||||
nfft = ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size();
|
||||
nfft = ( NumTraits<Output_>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size();
|
||||
dst.resize( nfft );
|
||||
inv( &dst[0],&src[0],nfft);
|
||||
}
|
||||
|
@ -55,23 +55,23 @@ struct get_boxes_helper<ObjectList, VolumeList, int> {
|
||||
/** \class KdBVH
|
||||
* \brief A simple bounding volume hierarchy based on AlignedBox
|
||||
*
|
||||
* \param _Scalar The underlying scalar type of the bounding boxes
|
||||
* \param _Dim The dimension of the space in which the hierarchy lives
|
||||
* \param Scalar_ The underlying scalar type of the bounding boxes
|
||||
* \param Dim_ The dimension of the space in which the hierarchy lives
|
||||
* \param _Object The object type that lives in the hierarchy. It must have value semantics. Either bounding_box(_Object) must
|
||||
* be defined and return an AlignedBox<_Scalar, _Dim> or bounding boxes must be provided to the tree initializer.
|
||||
* be defined and return an AlignedBox<Scalar_, Dim_> or bounding boxes must be provided to the tree initializer.
|
||||
*
|
||||
* This class provides a simple (as opposed to optimized) implementation of a bounding volume hierarchy analogous to a Kd-tree.
|
||||
* Given a sequence of objects, it computes their bounding boxes, constructs a Kd-tree of their centers
|
||||
* and builds a BVH with the structure of that Kd-tree. When the elements of the tree are too expensive to be copied around,
|
||||
* it is useful for _Object to be a pointer.
|
||||
*/
|
||||
template<typename _Scalar, int _Dim, typename _Object> class KdBVH
|
||||
template<typename Scalar_, int Dim_, typename _Object> class KdBVH
|
||||
{
|
||||
public:
|
||||
enum { Dim = _Dim };
|
||||
enum { Dim = Dim_ };
|
||||
typedef _Object Object;
|
||||
typedef std::vector<Object, aligned_allocator<Object> > ObjectList;
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef AlignedBox<Scalar, Dim> Volume;
|
||||
typedef std::vector<Volume, aligned_allocator<Volume> > VolumeList;
|
||||
typedef int Index;
|
||||
|
@ -92,18 +92,18 @@ namespace Eigen
|
||||
*
|
||||
* More information about Euler angles: https://en.wikipedia.org/wiki/Euler_angles
|
||||
*
|
||||
* \tparam _Scalar the scalar type, i.e. the type of the angles.
|
||||
* \tparam Scalar_ the scalar type, i.e. the type of the angles.
|
||||
*
|
||||
* \tparam _System the EulerSystem to use, which represents the axes of rotation.
|
||||
*/
|
||||
template <typename _Scalar, class _System>
|
||||
class EulerAngles : public RotationBase<EulerAngles<_Scalar, _System>, 3>
|
||||
template <typename Scalar_, class _System>
|
||||
class EulerAngles : public RotationBase<EulerAngles<Scalar_, _System>, 3>
|
||||
{
|
||||
public:
|
||||
typedef RotationBase<EulerAngles<_Scalar, _System>, 3> Base;
|
||||
typedef RotationBase<EulerAngles<Scalar_, _System>, 3> Base;
|
||||
|
||||
/** the scalar type of the angles */
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
||||
/** the EulerSystem to use, which represents the axes of rotation. */
|
||||
@ -322,10 +322,10 @@ EIGEN_EULER_ANGLES_TYPEDEFS(double, d)
|
||||
|
||||
namespace internal
|
||||
{
|
||||
template<typename _Scalar, class _System>
|
||||
struct traits<EulerAngles<_Scalar, _System> >
|
||||
template<typename Scalar_, class _System>
|
||||
struct traits<EulerAngles<Scalar_, _System> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Scalar_ Scalar;
|
||||
};
|
||||
|
||||
// set from a rotation matrix
|
||||
|
@ -13,7 +13,7 @@
|
||||
namespace Eigen
|
||||
{
|
||||
// Forward declarations
|
||||
template <typename _Scalar, class _System>
|
||||
template <typename Scalar_, class _System>
|
||||
class EulerAngles;
|
||||
|
||||
namespace internal
|
||||
@ -272,7 +272,7 @@ namespace Eigen
|
||||
res.gamma() = -res.gamma();
|
||||
}
|
||||
|
||||
template <typename _Scalar, class _System>
|
||||
template <typename Scalar_, class _System>
|
||||
friend class Eigen::EulerAngles;
|
||||
|
||||
template<typename System,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user