10 #ifndef EIGEN_SKYLINEMATRIXBASE_H 11 #define EIGEN_SKYLINEMATRIXBASE_H 13 #include "SkylineUtil.h" 31 typedef typename internal::index<StorageKind>::type
Index;
57 MaxColsAtCompileTime>::ret),
78 #ifndef EIGEN_PARSED_BY_DOXYGEN 91 inline const Derived& derived()
const {
92 return *
static_cast<const Derived*
> (
this);
95 inline Derived& derived() {
96 return *
static_cast<Derived*
> (
this);
99 inline Derived& const_cast_derived()
const {
102 #endif // not EIGEN_PARSED_BY_DOXYGEN 106 return derived().rows();
111 return derived().cols();
123 return derived().nonZeros();
138 bool isRValue()
const {
142 Derived& markAsRValue() {
151 inline Derived & operator=(
const Derived& other) {
152 this->
operator=<Derived > (other);
156 template<
typename OtherDerived>
157 inline void assignGeneric(
const OtherDerived& other) {
158 derived().resize(other.rows(), other.cols());
159 for (Index row = 0; row <
rows(); row++)
160 for (Index col = 0; col <
cols(); col++) {
161 if (other.coeff(row, col) != Scalar(0))
162 derived().insert(row, col) = other.coeff(row, col);
164 derived().finalize();
167 template<
typename OtherDerived>
172 template<
typename Lhs,
typename Rhs>
175 friend std::ostream & operator <<(std::ostream & s,
const SkylineMatrixBase& m) {
180 template<
typename OtherDerived>
185 template<
typename DenseDerived>
188 for (Index i = 0; i <
rows(); i++)
189 for (Index j = 0; j <
rows(); j++)
190 dst(i, j) = derived().coeff(i, j);
212 #endif // EIGEN_SkylineMatrixBase_H Index cols() const
Definition: SkylineMatrixBase.h:110
Index innerSize() const
Definition: SkylineMatrixBase.h:134
This is a rough measure of how expensive it is to read one coefficient from this expression.
Definition: SkylineMatrixBase.h:70
The number of columns at compile-time.
Definition: SkylineMatrixBase.h:40
EIGEN_DEVICE_FUNC Derived & setZero()
Sets all coefficients in this expression to zero.
Definition: CwiseNullaryOp.h:499
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Holds information about the various numeric (i.e.
Definition: NumTraits.h:150
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:37
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
Definition: EigenBase.h:28
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime) > SquareMatrixType
type of the equivalent square matrix
Definition: SkylineMatrixBase.h:89
Index nonZeros() const
Definition: SkylineMatrixBase.h:122
This is set to true if either the number of rows or the number of columns is known at compile-time to...
Definition: SkylineMatrixBase.h:59
Index rows() const
Definition: SkylineMatrixBase.h:105
EIGEN_STRONG_INLINE const internal::eval< Derived, IsSkyline >::type eval() const
Definition: SkylineMatrixBase.h:202
Definition: SkylineUtil.h:22
This is equal to the number of coefficients, i.e.
Definition: SkylineMatrixBase.h:47
This stores expression Flags flags which may or may not be inherited by new expressions constructed f...
Definition: SkylineMatrixBase.h:65
Base class of any skyline matrices or skyline expressions.
Definition: SkylineMatrixBase.h:26
Index outerSize() const
Definition: SkylineMatrixBase.h:128
The number of rows at compile-time.
Definition: SkylineMatrixBase.h:34
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
NumTraits< Scalar >::Real RealScalar
This is the "real scalar" type; if the Scalar type is already real numbers (e.g.
Definition: SkylineMatrixBase.h:85
Index size() const
Definition: SkylineMatrixBase.h:116
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:312
Definition: XprHelper.h:261