10 #ifndef EIGEN_BANDMATRIX_H 11 #define EIGEN_BANDMATRIX_H 17 template<
typename Derived>
60 inline const CoefficientsType&
coeffs()
const {
return derived().coeffs(); }
72 Index len =
coeffs().rows();
79 len = std::max<Index>(0,
coeffs().rows() - (i + 1 -
rows() +
subs()));
134 template<
typename Dest>
inline void evalTo(Dest& dst)
const 139 for (Index i=1; i<=
supers();++i)
141 for (Index i=1; i<=
subs();++i)
177 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Supers,
int _Subs,
int _Options>
198 template<
typename _Scalar,
int Rows,
int Cols,
int Supers,
int Subs,
int Options>
214 inline Index
rows()
const {
return m_rows.value(); }
217 inline Index
cols()
const {
return m_coeffs.cols(); }
220 inline Index
supers()
const {
return m_supers.value(); }
223 inline Index
subs()
const {
return m_subs.value(); }
225 inline const CoefficientsType&
coeffs()
const {
return m_coeffs; }
226 inline CoefficientsType&
coeffs() {
return m_coeffs; }
236 template<
typename _CoefficientsType,
int _Rows,
int _Cols,
int _Supers,
int _Subs,
int _Options>
239 template<
typename _CoefficientsType,
int _Rows,
int _Cols,
int _Supers,
int _Subs,
int _Options>
242 typedef typename _CoefficientsType::Scalar
Scalar;
244 typedef typename _CoefficientsType::Index
Index;
260 template<
typename _CoefficientsType,
int _Rows,
int _Cols,
int _Supers,
int _Subs,
int _Options>
278 inline Index
rows()
const {
return m_rows.value(); }
281 inline Index
cols()
const {
return m_coeffs.cols(); }
284 inline Index
supers()
const {
return m_supers.value(); }
287 inline Index
subs()
const {
return m_subs.value(); }
289 inline const CoefficientsType&
coeffs()
const {
return m_coeffs; }
311 template<
typename Scalar,
int Size,
int Options>
320 {
return Base::template diagonal<1>(); }
322 {
return Base::template diagonal<1>(); }
324 {
return Base::template
diagonal<-1>(); }
326 {
return Base::template
diagonal<-1>(); }
334 #endif // EIGEN_BANDMATRIX_H internal::variable_if_dynamic< Index, _Rows > m_rows
internal::variable_if_dynamic< Index, _Supers > m_supers
TridiagonalMatrix(Index size=Size)
internal::traits< BandMatrix >::Index Index
Index diagonalLength(Index i) const
internal::variable_if_dynamic< Index, Supers > m_supers
CoefficientsType & coeffs()
const Base::template DiagonalIntReturnType<-1 >::Type sub() const
const Block< const CoefficientsType, 1, Dynamic > diagonal(Index i) const
internal::traits< BandMatrixWrapper >::Scalar Scalar
#define EIGEN_UNUSED_VARIABLE(var)
const unsigned int LvalueBit
internal::traits< Derived >::CoefficientsType CoefficientsType
Represents a rectangular matrix with a banded storage.
const DiagonalIntReturnType< N >::Type diagonal() const
internal::traits< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Index Index
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
internal::traits< Derived >::Scalar Scalar
const CoefficientsType & coeffs() const
Block< CoefficientsType, 1, SizeAtCompileTime > diagonal()
EigenBase< Derived > Base
_CoefficientsType::Index Index
const CoefficientsType & m_coeffs
Base::template DiagonalIntReturnType< 1 >::Type super()
DiagonalIntReturnType< N >::Type diagonal()
internal::variable_if_dynamic< Index, Subs > m_subs
internal::traits< BandMatrix >::CoefficientsType CoefficientsType
Represents a tridiagonal matrix with a compact banded storage.
_CoefficientsType::StorageKind StorageKind
internal::traits< BandMatrix >::Scalar Scalar
BandMatrix(Index rows=Rows, Index cols=Cols, Index supers=Supers, Index subs=Subs)
DenseMatrixType toDenseMatrix() const
internal::variable_if_dynamic< Index, _Subs > m_subs
_CoefficientsType CoefficientsType
Matrix< Scalar, DataRowsAtCompileTime, ColsAtCompileTime, Options &RowMajor?RowMajor:ColMajor > CoefficientsType
Provides a generic way to set and pass user-specified options.
DenseMatrixType::Index Index
internal::traits< Derived >::Index Index
const Base::template DiagonalIntReturnType< 1 >::Type super() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
void evalTo(Dest &dst) const
CoefficientsType m_coeffs
BandMatrixWrapper(const CoefficientsType &coeffs, Index rows=_Rows, Index cols=_Cols, Index supers=_Supers, Index subs=_Subs)
CoefficientsType & coeffs()
Expression of a fixed-size or dynamic-size block.
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Block< CoefficientsType, 1, DiagonalSize > BuildType
const CoefficientsType & coeffs() const
BandMatrix< Scalar, Size, Size, Options &SelfAdjoint?0:1, 1, Options|RowMajor > Base
const Block< const CoefficientsType, 1, SizeAtCompileTime > diagonal() const
const CoefficientsType & coeffs() const
internal::variable_if_dynamic< Index, Rows > m_rows
Block< CoefficientsType, Dynamic, 1 > col(Index i)
internal::traits< BandMatrixWrapper >::Index Index
Block< CoefficientsType, 1, Dynamic > diagonal(Index i)
_CoefficientsType::Scalar Scalar
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
internal::conditional< Conjugate, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, BuildType >, BuildType >::type Type
Generic expression where a coefficient-wise unary operator is applied to an expression.
The matrix class, also used for vectors and row-vectors.
internal::traits< BandMatrixWrapper >::CoefficientsType CoefficientsType
Base::template DiagonalIntReturnType<-1 >::Type sub()