Eigen::SkylineMatrixBase< Derived > Class Template Reference

Base class of any skyline matrices or skyline expressions. More...

+ Inheritance diagram for Eigen::SkylineMatrixBase< Derived >:

Public Types

enum  {
  RowsAtCompileTime ,
  ColsAtCompileTime ,
  SizeAtCompileTime ,
  MaxRowsAtCompileTime ,
  MaxColsAtCompileTime ,
  MaxSizeAtCompileTime ,
  IsVectorAtCompileTime ,
  Flags ,
  CoeffReadCost ,
  IsRowMajor
}
 
typedef internal::index< StorageKind >::type Index
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef internal::traits< Derived >::StorageKind StorageKind
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

template<typename OtherDerived >
void assignGeneric (const OtherDerived &other)
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
const internal::eval< Derived, IsSkyline >::type eval () const
 
template<typename DenseDerived >
void evalTo (MatrixBase< DenseDerived > &dst) const
 
Index innerSize () const
 
bool isRValue () const
 
Derived & markAsRValue ()
 
Index nonZeros () const
 
template<typename OtherDerived >
const SkylineProductReturnType< Derived, OtherDerived >::Type operator* (const MatrixBase< OtherDerived > &other) const
 
Derived & operator= (const Derived &other)
 
template<typename OtherDerived >
Derived & operator= (const SkylineMatrixBase< OtherDerived > &other)
 
template<typename Lhs , typename Rhs >
Derived & operator= (const SkylineProduct< Lhs, Rhs, SkylineTimeSkylineProduct > &product)
 
Index outerSize () const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
 SkylineMatrixBase ()
 
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTimetoDense () const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
void addTo (Dest &dst) const
 
void applyThisOnTheLeft (Dest &dst) const
 
void applyThisOnTheRight (Dest &dst) const
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Derived & const_cast_derived () const
 
const Derived & const_derived () const
 
Derived & derived ()
 
const Derived & derived () const
 
void evalTo (Dest &dst) const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
void subTo (Dest &dst) const
 

Protected Attributes

bool m_isRValue
 

Detailed Description

template<typename Derived>
class Eigen::SkylineMatrixBase< Derived >

Base class of any skyline matrices or skyline expressions.

Parameters
Derived

Definition at line 28 of file SkylineMatrixBase.h.

Member Typedef Documentation

◆ Index

template<typename Derived >
typedef internal::index<StorageKind>::type Eigen::SkylineMatrixBase< Derived >::Index

Definition at line 33 of file SkylineMatrixBase.h.

◆ Scalar

template<typename Derived >
typedef internal::traits<Derived>::Scalar Eigen::SkylineMatrixBase< Derived >::Scalar

Definition at line 31 of file SkylineMatrixBase.h.

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::SkylineMatrixBase< Derived >::StorageKind

Definition at line 32 of file SkylineMatrixBase.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived >
anonymous enum
Enumerator
RowsAtCompileTime 

The number of rows at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime
ColsAtCompileTime 

The number of columns at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime
SizeAtCompileTime 

This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to Dynamic if this is not known at compile-time.

See also
RowsAtCompileTime, ColsAtCompileTime
MaxRowsAtCompileTime 
MaxColsAtCompileTime 
MaxSizeAtCompileTime 
IsVectorAtCompileTime 

This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).

Flags 

This stores expression Flags flags which may or may not be inherited by new expressions constructed from this one. See the list of flags.

CoeffReadCost 

This is a rough measure of how expensive it is to read one coefficient from this expression.

IsRowMajor 

Definition at line 35 of file SkylineMatrixBase.h.

35  {
36  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
42  ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
49  SizeAtCompileTime = (internal::size_of_xpr_at_compile_time<Derived>::ret),
56 
59 
66  Flags = internal::traits<Derived>::Flags,
71  CoeffReadCost = internal::traits<Derived>::CoeffReadCost,
76  IsRowMajor = Flags & RowMajorBit ? 1 : 0
77  };
const unsigned int RowMajorBit
constexpr int size_at_compile_time(int rows, int cols)

Constructor & Destructor Documentation

◆ SkylineMatrixBase()

template<typename Derived >
Eigen::SkylineMatrixBase< Derived >::SkylineMatrixBase ( )
inline

Definition at line 148 of file SkylineMatrixBase.h.

148  : m_isRValue(false) {
149  /* TODO check flags */
150  }

Member Function Documentation

◆ assignGeneric()

template<typename Derived >
template<typename OtherDerived >
void Eigen::SkylineMatrixBase< Derived >::assignGeneric ( const OtherDerived &  other)
inline

Definition at line 158 of file SkylineMatrixBase.h.

158  {
159  derived().resize(other.rows(), other.cols());
160  for (Index row = 0; row < rows(); row++)
161  for (Index col = 0; col < cols(); col++) {
162  if (other.coeff(row, col) != Scalar(0))
163  derived().insert(row, col) = other.coeff(row, col);
164  }
165  derived().finalize();
166  }
RowXpr row(Index i) const
ColXpr col(Index i) const
internal::traits< Derived >::Scalar Scalar
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index

◆ cols()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::SkylineMatrixBase< Derived >::cols ( void  ) const
inline
Returns
the number of columns.
See also
rows(), ColsAtCompileTime

Definition at line 111 of file SkylineMatrixBase.h.

111  {
112  return derived().cols();
113  }

◆ eval()

template<typename Derived >
const internal::eval<Derived, IsSkyline>::type Eigen::SkylineMatrixBase< Derived >::eval ( ) const
inline
Returns
the matrix or vector obtained by evaluating this expression.

Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy.

Definition at line 203 of file SkylineMatrixBase.h.

203  {
204  return typename internal::eval<Derived>::type(derived());
205  }

◆ evalTo()

template<typename Derived >
template<typename DenseDerived >
void Eigen::SkylineMatrixBase< Derived >::evalTo ( MatrixBase< DenseDerived > &  dst) const
inline

Definition at line 187 of file SkylineMatrixBase.h.

187  {
188  dst.setZero();
189  for (Index i = 0; i < rows(); i++)
190  for (Index j = 0; j < rows(); j++)
191  dst(i, j) = derived().coeff(i, j);
192  }
int i
std::ptrdiff_t j

◆ innerSize()

template<typename Derived >
Index Eigen::SkylineMatrixBase< Derived >::innerSize ( ) const
inline
Returns
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise

Definition at line 135 of file SkylineMatrixBase.h.

135  {
136  return (int(Flags) & RowMajorBit) ? this->cols() : this->rows();
137  }

◆ isRValue()

template<typename Derived >
bool Eigen::SkylineMatrixBase< Derived >::isRValue ( ) const
inline

Definition at line 139 of file SkylineMatrixBase.h.

139  {
140  return m_isRValue;
141  }

◆ markAsRValue()

template<typename Derived >
Derived& Eigen::SkylineMatrixBase< Derived >::markAsRValue ( )
inline

Definition at line 143 of file SkylineMatrixBase.h.

143  {
144  m_isRValue = true;
145  return derived();
146  }

◆ nonZeros()

template<typename Derived >
Index Eigen::SkylineMatrixBase< Derived >::nonZeros ( ) const
inline
Returns
the number of nonzero coefficients which is in practice the number of stored coefficients.

Definition at line 123 of file SkylineMatrixBase.h.

123  {
124  return derived().nonZeros();
125  }

◆ operator*()

template<typename Derived >
template<typename OtherDerived >
const SkylineProductReturnType< Derived, OtherDerived >::Type Eigen::SkylineMatrixBase< Derived >::operator* ( const MatrixBase< OtherDerived > &  other) const
inline

Definition at line 290 of file SkylineProduct.h.

290  {
291 
292  return typename SkylineProductReturnType<Derived, OtherDerived>::Type(derived(), other.derived());
293 }
SkylineProduct< LhsNested, RhsNested, ProductMode > Type

◆ operator=() [1/3]

template<typename Derived >
Derived& Eigen::SkylineMatrixBase< Derived >::operator= ( const Derived &  other)
inline

Definition at line 152 of file SkylineMatrixBase.h.

152  {
153  this->operator=<Derived > (other);
154  return derived();
155  }

◆ operator=() [2/3]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::SkylineMatrixBase< Derived >::operator= ( const SkylineMatrixBase< OtherDerived > &  other)
inline

Definition at line 169 of file SkylineMatrixBase.h.

169  {
170  //TODO
171  }

◆ operator=() [3/3]

template<typename Derived >
template<typename Lhs , typename Rhs >
Derived& Eigen::SkylineMatrixBase< Derived >::operator= ( const SkylineProduct< Lhs, Rhs, SkylineTimeSkylineProduct > &  product)
inline

◆ outerSize()

template<typename Derived >
Index Eigen::SkylineMatrixBase< Derived >::outerSize ( ) const
inline
Returns
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise

Definition at line 129 of file SkylineMatrixBase.h.

129  {
130  return (int(Flags) & RowMajorBit) ? this->rows() : this->cols();
131  }

◆ rows()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::SkylineMatrixBase< Derived >::rows ( void  ) const
inline
Returns
the number of rows.
See also
cols(), RowsAtCompileTime

Definition at line 106 of file SkylineMatrixBase.h.

106  {
107  return derived().rows();
108  }

◆ size()

template<typename Derived >
EIGEN_CONSTEXPR Index Eigen::SkylineMatrixBase< Derived >::size ( ) const
inline
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols(), SizeAtCompileTime.

Definition at line 117 of file SkylineMatrixBase.h.

117  {
118  return rows() * cols();
119  }

◆ toDense()

template<typename Derived >
Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime> Eigen::SkylineMatrixBase< Derived >::toDense ( ) const
inline

Definition at line 194 of file SkylineMatrixBase.h.

194  {
195  return derived();
196  }

Member Data Documentation

◆ m_isRValue

template<typename Derived >
bool Eigen::SkylineMatrixBase< Derived >::m_isRValue
protected

Definition at line 208 of file SkylineMatrixBase.h.


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