Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > Class Template Reference

Represents a rectangular matrix with a banded storage. More...

#include <src/eigen/Eigen/src/Core/BandMatrix.h>

+ Inheritance diagram for Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >:
+ Collaboration diagram for Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >:

Public Types

typedef internal::traits< BandMatrix >::Scalar Scalar
 
typedef internal::traits< BandMatrix >::StorageIndex StorageIndex
 
typedef internal::traits< BandMatrix >::CoefficientsType CoefficientsType
 
enum  
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTimeDenseMatrixType
 
typedef EigenBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > > Base
 
typedef Eigen::Index Index
 The interface type of indices.
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

 BandMatrix (Index rows=Rows, Index cols=Cols, Index supers=Supers, Index subs=Subs)
 
Index rows () const
 
Index cols () const
 
Index supers () const
 
Index subs () const
 
const CoefficientsTypecoeffs () const
 
CoefficientsTypecoeffs ()
 
Block< CoefficientsType, Dynamic, 1 > col (Index i)
 
Block< CoefficientsType, 1, SizeAtCompileTimediagonal ()
 
const Block< const CoefficientsType, 1, SizeAtCompileTimediagonal () const
 
DiagonalIntReturnType< N >::Type diagonal ()
 
const DiagonalIntReturnType< N >::Type diagonal () const
 
Block< CoefficientsType, 1, Dynamicdiagonal (Index i)
 
const Block< const CoefficientsType, 1, Dynamicdiagonal (Index i) const
 
void evalTo (Dest &dst) const
 
DenseMatrixType toDenseMatrix () const
 
EIGEN_DEVICE_FUNC BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > & derived ()
 
EIGEN_DEVICE_FUNC const BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC Index size () const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 

Protected Types

enum  
 

Protected Member Functions

Index diagonalLength (Index i) const
 

Protected Attributes

CoefficientsType m_coeffs
 
internal::variable_if_dynamic< Index, Rows > m_rows
 
internal::variable_if_dynamic< Index, Supersm_supers
 
internal::variable_if_dynamic< Index, Subsm_subs
 

Detailed Description

template<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options>
class Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >

Represents a rectangular matrix with a banded storage.

Template Parameters
_ScalarNumeric type, i.e. float, double, int
_RowsNumber of rows, or Dynamic
_ColsNumber of columns, or Dynamic
_SupersNumber of super diagonal
_SubsNumber of sub diagonal
_OptionsA combination of either RowMajor or ColMajor, and of SelfAdjoint The former controls 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.
See also
class TridiagonalMatrix

Member Typedef Documentation

◆ Base

typedef EigenBase<BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::Base
inherited

◆ CoefficientsType

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
typedef internal::traits<BandMatrix>::CoefficientsType Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::CoefficientsType

◆ DenseMatrixType

typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::DenseMatrixType
inherited

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, TopicPreprocessorDirectives.

◆ Scalar

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
typedef internal::traits<BandMatrix>::Scalar Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::Scalar

◆ StorageIndex

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
typedef internal::traits<BandMatrix>::StorageIndex Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::StorageIndex

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::EigenBase< Derived >::StorageKind
inherited

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
22 {
23 Flags = internal::traits<Derived>::Flags,
24 CoeffReadCost = internal::traits<Derived>::CoeffReadCost,
25 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
26 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
27 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
28 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
29 Supers = internal::traits<Derived>::Supers,
30 Subs = internal::traits<Derived>::Subs,
31 Options = internal::traits<Derived>::Options
32 };

◆ anonymous enum

anonymous enum
protectedinherited
40 {
41 DataRowsAtCompileTime = ((Supers!=Dynamic) && (Subs!=Dynamic))
42 ? 1 + Supers + Subs
43 : Dynamic,
45 };
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Definition Macros.h:881
const int Dynamic
Definition Constants.h:21

Constructor & Destructor Documentation

◆ BandMatrix()

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::BandMatrix ( Index  rows = Rows,
Index  cols = Cols,
Index  supers = Supers,
Index  subs = Subs 
)
inlineexplicit
210 {
211 }
internal::variable_if_dynamic< Index, Rows > m_rows
Definition BandMatrix.h:231
Index supers() const
Definition BandMatrix.h:220
Index rows() const
Definition BandMatrix.h:214
internal::variable_if_dynamic< Index, Supers > m_supers
Definition BandMatrix.h:232
internal::variable_if_dynamic< Index, Subs > m_subs
Definition BandMatrix.h:233
CoefficientsType m_coeffs
Definition BandMatrix.h:230
Index subs() const
Definition BandMatrix.h:223
Index cols() const
Definition BandMatrix.h:217

Member Function Documentation

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inlineinherited
78 {
79 // This is the default implementation,
80 // derived class can reimplement it in a more optimized way.
81 typename Dest::PlainObject res(rows(),cols());
82 evalTo(res);
83 dst += res;
84 }
EIGEN_DEVICE_FUNC Index cols() const
Definition EigenBase.h:62
EIGEN_DEVICE_FUNC Index rows() const
Definition EigenBase.h:59
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition EigenBase.h:71

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inlineinherited
110 {
111 // This is the default implementation,
112 // derived class can reimplement it in a more optimized way.
113 dst = this->derived() * dst;
114 }
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inlineinherited
101 {
102 // This is the default implementation,
103 // derived class can reimplement it in a more optimized way.
104 dst = dst * this->derived();
105 }

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ coeffs() [1/2]

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
CoefficientsType & Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::coeffs ( )
inline
226{ return m_coeffs; }

◆ coeffs() [2/2]

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
const CoefficientsType & Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::coeffs ( ) const
inline
225{ return m_coeffs; }

◆ col()

Block< CoefficientsType, Dynamic, 1 > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::col ( Index  i)
inlineinherited
Returns
a vector expression of the i -th column, only the meaningful part is returned.
Warning
the internal storage must be column major.
69 {
70 EIGEN_STATIC_ASSERT((Options&RowMajor)==0,THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
71 Index start = 0;
72 Index len = coeffs().rows();
73 if (i<=supers())
74 {
75 start = supers()-i;
76 len = (std::min)(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));
77 }
78 else if (i>=rows()-subs())
79 len = std::max<Index>(0,coeffs().rows() - (i + 1 - rows() + subs()));
80 return Block<CoefficientsType,Dynamic,1>(coeffs(), start, i, len, 1);
81 }
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:38

◆ cols()

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
Index Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::cols ( ) const
inline
Returns
the number of rows
217{ return m_coeffs.cols(); }

◆ const_cast_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC Derived & Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inlineinherited
52 { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }

Referenced by Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap().

+ Here is the caller graph for this function:

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::const_derived ( ) const
inlineinherited
55 { return *static_cast<const Derived*>(this); }

◆ derived() [1/2]

EIGEN_DEVICE_FUNC BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > & Eigen::EigenBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::derived ( )
inlineinherited
Returns
a reference to the derived object
45{ return *static_cast<Derived*>(this); }

◆ derived() [2/2]

EIGEN_DEVICE_FUNC const BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > & Eigen::EigenBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::derived ( ) const
inlineinherited
Returns
a const reference to the derived object
48{ return *static_cast<const Derived*>(this); }

◆ diagonal() [1/6]

Block< CoefficientsType, 1, SizeAtCompileTime > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( )
inlineinherited
Returns
a vector expression of the main diagonal
85 { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }

◆ diagonal() [2/6]

DiagonalIntReturnType< N >::Type Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( )
inlineinherited
Returns
a vector expression of the N -th sub or super diagonal
110 {
111 return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
112 }

◆ diagonal() [3/6]

const Block< const CoefficientsType, 1, SizeAtCompileTime > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( ) const
inlineinherited
Returns
a vector expression of the main diagonal (const version)
89 { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }

◆ diagonal() [4/6]

const DiagonalIntReturnType< N >::Type Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( ) const
inlineinherited
Returns
a vector expression of the N -th sub or super diagonal
116 {
117 return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
118 }

◆ diagonal() [5/6]

Block< CoefficientsType, 1, Dynamic > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( Index  i)
inlineinherited
Returns
a vector expression of the i -th sub or super diagonal
122 {
123 eigen_assert((i<0 && -i<=subs()) || (i>=0 && i<=supers()));
124 return Block<CoefficientsType,1,Dynamic>(coeffs(), supers()-i, std::max<Index>(0,i), 1, diagonalLength(i));
125 }
#define eigen_assert(x)
Definition Macros.h:579

◆ diagonal() [6/6]

const Block< const CoefficientsType, 1, Dynamic > Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonal ( Index  i) const
inlineinherited
Returns
a vector expression of the i -th sub or super diagonal
129 {
130 eigen_assert((i<0 && -i<=subs()) || (i>=0 && i<=supers()));
131 return Block<const CoefficientsType,1,Dynamic>(coeffs(), supers()-i, std::max<Index>(0,i), 1, diagonalLength(i));
132 }

◆ diagonalLength()

Index Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::diagonalLength ( Index  i) const
inlineprotectedinherited
155 { return i<0 ? (std::min)(cols(),rows()+i) : (std::min)(rows(),cols()-i); }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half() min(const half &a, const half &b)
Definition Half.h:507
STL namespace.

◆ evalTo()

void Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::evalTo ( Dest &  dst) const
inlineinherited
135 {
136 dst.resize(rows(),cols());
137 dst.setZero();
138 dst.diagonal() = diagonal();
139 for (Index i=1; i<=supers();++i)
140 dst.diagonal(i) = diagonal(i);
141 for (Index i=1; i<=subs();++i)
142 dst.diagonal(-i) = diagonal(-i);
143 }
Block< CoefficientsType, 1, SizeAtCompileTime > diagonal()
Definition BandMatrix.h:84

◆ rows()

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
Index Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::rows ( ) const
inline
Returns
the number of columns
214{ return m_rows.value(); }
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value()
Definition XprHelper.h:111

◆ size()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::EigenBase< Derived >::size ( ) const
inlineinherited
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols(), SizeAtCompileTime.
66{ return rows() * cols(); }

References Eigen::EigenBase< Derived >::cols(), and Eigen::EigenBase< Derived >::rows().

Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity(), and Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subs()

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
Index Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::subs ( ) const
inline
Returns
the number of sub diagonals
223{ return m_subs.value(); }

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inlineinherited
90 {
91 // This is the default implementation,
92 // derived class can reimplement it in a more optimized way.
93 typename Dest::PlainObject res(rows(),cols());
94 evalTo(res);
95 dst -= res;
96 }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ supers()

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
Index Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::supers ( ) const
inline
Returns
the number of super diagonals
220{ return m_supers.value(); }

◆ toDenseMatrix()

DenseMatrixType Eigen::internal::BandMatrixBase< BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options > >::toDenseMatrix ( ) const
inlineinherited
146 {
147 DenseMatrixType res(rows(),cols());
148 evalTo(res);
149 return res;
150 }
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
Definition BandMatrix.h:34

Member Data Documentation

◆ m_coeffs

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
CoefficientsType Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::m_coeffs
protected

◆ m_rows

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
internal::variable_if_dynamic<Index, Rows> Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::m_rows
protected

◆ m_subs

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
internal::variable_if_dynamic<Index, Subs> Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::m_subs
protected

◆ m_supers

template<typename _Scalar , int Rows, int Cols, int Supers, int Subs, int Options>
internal::variable_if_dynamic<Index, Supers> Eigen::internal::BandMatrix< _Scalar, Rows, Cols, Supers, Subs, Options >::m_supers
protected

The documentation for this class was generated from the following file: