10 #ifndef EIGEN_SPARSEMATRIXBASE_H 11 #define EIGEN_SPARSEMATRIXBASE_H 26 template<
typename Derived>
class SparseMatrixBase
54 template<
typename OtherDerived>
105 #ifndef EIGEN_PARSED_BY_DOXYGEN
121 #ifndef EIGEN_PARSED_BY_DOXYGEN 143 inline const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
144 inline Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
150 #endif // not EIGEN_PARSED_BY_DOXYGEN 152 #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase 153 #ifdef EIGEN_PARSED_BY_DOXYGEN 154 #define EIGEN_DOC_UNARY_ADDONS(METHOD,OP) 155 #define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL 156 #define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) 158 #define EIGEN_DOC_UNARY_ADDONS(X,Y) 159 #define EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL 160 #define EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(COND) 162 # include "../plugins/CommonCwiseUnaryOps.h" 163 # include "../plugins/CommonCwiseBinaryOps.h" 164 # include "../plugins/MatrixCwiseUnaryOps.h" 165 # include "../plugins/MatrixCwiseBinaryOps.h" 166 # include "../plugins/BlockMethods.h" 167 # ifdef EIGEN_SPARSEMATRIXBASE_PLUGIN 168 # include EIGEN_SPARSEMATRIXBASE_PLUGIN 170 #undef EIGEN_CURRENT_STORAGE_BASE_CLASS 171 #undef EIGEN_DOC_UNARY_ADDONS 172 #undef EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL 173 #undef EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF 200 template<
typename OtherDerived>
203 template<
typename OtherDerived>
206 inline Derived&
operator=(
const Derived& other);
210 template<
typename OtherDerived>
211 inline Derived&
assign(
const OtherDerived& other);
213 template<
typename OtherDerived>
220 typedef typename Derived::Nested Nested;
232 for ( ; col<it.index(); ++
col)
234 s << it.value() <<
" ";
250 for ( ; row<it.index(); ++
row)
251 s <<
"0" << std::endl;
252 s << it.value() << std::endl;
256 s <<
"0" << std::endl;
261 s << static_cast<const SparseMatrixBase<SparseMatrix<Scalar, RowMajorBit, StorageIndex> >&>(
trans);
267 template<
typename OtherDerived>
269 template<
typename OtherDerived>
272 template<
typename OtherDerived>
274 template<
typename OtherDerived>
277 template<
typename OtherDerived>
279 template<
typename OtherDerived>
295 template<
typename OtherDerived>
300 template<
typename OtherDerived>
306 template<
typename OtherDerived>
friend 312 template<
typename OtherDerived>
317 template<
typename OtherDerived>
323 template<
typename OtherDerived>
friend 334 template<
typename OtherDerived>
343 template<
unsigned int UpLo>
inline 345 template<
unsigned int UpLo>
inline 351 RealScalar
norm()
const;
363 template<
typename OtherDerived>
367 template<
typename OtherDerived>
370 {
return toDense().isApprox(other,prec); }
390 return internal::convert_index<StorageIndex>(idx);
393 template<
typename Dest>
void evalTo(Dest &)
const;
398 #endif // EIGEN_SPARSEMATRIXBASE_H
Generic expression of a matrix where all coefficients are defined by a functor.
#define EIGEN_STRONG_INLINE
const ConstTransposeReturnType transpose() const
friend std::ostream & operator<<(std::ostream &s, const SparseMatrixBase &m)
internal::traits< Derived >::StorageKind StorageKind
SparseMatrixBase StorageBaseType
Expression of the product of two arbitrary matrices or vectors.
A versatible sparse matrix representation.
RealScalar squaredNorm() const
internal::packet_traits< Scalar >::type PacketScalar
CwiseBinaryOp< internal::scalar_product_op< typename ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType >, const Derived, const OtherDerived > Type
Expression of the transpose of a matrix.
const unsigned int DirectAccessBit
CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > ConstantReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE RowXpr row(Index i)
Derived & operator+=(const SparseMatrixBase< OtherDerived > &other)
Namespace containing all symbols from the Eigen library.
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Derived & operator=(const EigenBase< OtherDerived > &other)
void evalTo(Dest &) const
Eigen::Index Index
The interface type of indices.
const unsigned int RowMajorBit
Transpose< Derived > TransposeReturnType
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const Derived > >, Transpose< const Derived > >::type AdjointReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ColXpr col(Index i)
static StorageIndex convert_index(const Index idx)
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
internal::traits< Derived >::StorageIndex StorageIndex
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Base class of any sparse matrices or sparse expressions.
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct(const MatrixBase< OtherDerived > &other) const
TransposeReturnType transpose()
internal::traits< Derived >::Scalar Scalar
SparseSelfAdjointView< Derived, UpLo > Type
RealScalar blueNorm() const
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
Scalar dot(const MatrixBase< OtherDerived > &other) const
idx_t idx_t idx_t idx_t idx_t * perm
Expression of a dense or sparse matrix with zero or too small values removed.
const TriangularView< const Derived, Mode > triangularView() const
Derived & assign(const OtherDerived &other)
const AdjointReturnType adjoint() const
bool isApprox(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
internal::add_const< Transpose< const Derived > >::type ConstTransposeReturnType
const Product< Derived, OtherDerived > operator*(const DiagonalBase< OtherDerived > &other) const
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView() const
EigenBase< Derived > Base
Derived & operator*=(const Scalar &other)
Derived & const_cast_derived() const
Derived & operator/=(const Scalar &other)
Expression of a triangular part in a matrix.
Derived & operator-=(const SparseMatrixBase< OtherDerived > &other)
internal::conditional< _HasDirectAccess, const Scalar &, Scalar >::type CoeffReturnType
void assignGeneric(const OtherDerived &other)
SparseSymmetricPermutationProduct< Derived, Upper|Lower > twistedBy(const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
const Derived & derived() const
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
const internal::eval< Derived >::type eval() const
DenseMatrixType toDense() const
const SparseSelfAdjointView< const Derived, UpLo > Type
Generic expression where a coefficient-wise unary operator is applied to an expression.
NumTraits< Scalar >::Real RealScalar
Matrix< Scalar, Dynamic, 1 > ScalarVector
internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
#define EIGEN_SIZE_MAX(a, b)
SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > PlainObject
Base class for all dense matrices, vectors, and expressions.
const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
friend const Product< OtherDerived, Derived > operator*(const DiagonalBase< OtherDerived > &lhs, const SparseMatrixBase &rhs)
EIGEN_DEVICE_FUNC const Derived & derived() const
bool isApprox(const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const