Go to the documentation of this file.
10 #ifndef EIGEN_SPARSEMATRIXBASE_H
11 #define EIGEN_SPARSEMATRIXBASE_H
26 template<
typename Derived>
class SparseMatrixBase
27 :
public EigenBase<Derived>
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>
210 template<
typename OtherDerived>
213 template<
typename OtherDerived>
220 typedef typename Derived::Nested Nested;
225 Nested nm(
m.derived());
232 for ( ;
col<it.index(); ++
col)
234 s << it.value() <<
" ";
244 Nested nm(
m.derived());
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
363 template<
typename OtherDerived>
367 template<
typename OtherDerived>
390 return internal::convert_index<StorageIndex>(idx);
393 template<
typename Dest>
void evalTo(Dest &)
const;
398 #endif // EIGEN_SPARSEMATRIXBASE_H
const EIGEN_STRONG_INLINE CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct(const MatrixBase< OtherDerived > &other) const
Matrix< Scalar, Dynamic, 1 > ScalarVector
const internal::eval< Derived >::type eval() const
idx_t idx_t idx_t idx_t idx_t * perm
SparseMatrixBase StorageBaseType
Namespace containing all symbols from the Eigen library.
A versatible sparse matrix representation.
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const Derived > >, Transpose< const Derived > >::type AdjointReturnType
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Derived & operator-=(const SparseMatrixBase< OtherDerived > &other)
bool isApprox(const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
internal::conditional< _HasDirectAccess, const Scalar &, Scalar >::type CoeffReturnType
const typedef SparseSelfAdjointView< const Derived, UpLo > Type
const unsigned int RowMajorBit
Derived & operator+=(const SparseMatrixBase< OtherDerived > &other)
bool isApprox(const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Derived & operator*=(const Scalar &other)
SparseSymmetricPermutationProduct< Derived, Upper|Lower > twistedBy(const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const
Derived & operator=(const EigenBase< OtherDerived > &other)
void assignGeneric(const OtherDerived &other)
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Derived & const_cast_derived() const
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
#define EIGEN_SIZE_MAX(a, b)
RealScalar squaredNorm() const
DenseMatrixType toDense() const
TransposeReturnType transpose()
CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > ConstantReturnType
Expression of the transpose of a matrix.
const unsigned int DirectAccessBit
internal::traits< Derived >::StorageKind StorageKind
Generic expression of a matrix where all coefficients are defined by a functor.
SparseSelfAdjointView< Derived, UpLo > Type
const EIGEN_DEVICE_FUNC Derived & derived() const
static StorageIndex convert_index(const Index idx)
const TriangularView< const Derived, Mode > triangularView() const
Derived & operator/=(const Scalar &other)
internal::traits< Derived >::Scalar Scalar
Transpose< Derived > TransposeReturnType
void evalTo(Dest &) const
internal::packet_traits< Scalar >::type PacketScalar
const Product< Derived, OtherDerived > operator*(const MatrixBase< OtherDerived > &other) const
#define EIGEN_STRONG_INLINE
EigenBase< Derived > Base
Expression of the product of two arbitrary matrices or vectors.
const AdjointReturnType adjoint() const
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
NumTraits< Scalar >::Real RealScalar
const Product< Derived, OtherDerived > operator*(const DiagonalBase< OtherDerived > &other) const
internal::add_const< Transpose< const Derived > >::type ConstTransposeReturnType
internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
Derived & assign(const OtherDerived &other)
Generic expression where a coefficient-wise unary operator is applied to an expression.
internal::traits< Derived >::StorageIndex StorageIndex
const ConstTransposeReturnType transpose() const
friend std::ostream & operator<<(std::ostream &s, const SparseMatrixBase &m)
Expression of a dense or sparse matrix with zero or too small values removed.
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView() const
Base class of any sparse matrices or sparse expressions.
const Derived & derived() const
NumTraits< Scalar >::Real RealScalar
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Base class for all dense matrices, vectors, and expressions.
SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > PlainObject
Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
CwiseBinaryOp< internal::scalar_product_op< typename ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType >, const Derived, const OtherDerived > Type
const friend Product< OtherDerived, Derived > operator*(const MatrixBase< OtherDerived > &lhs, const SparseMatrixBase &rhs)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Scalar dot(const MatrixBase< OtherDerived > &other) const
const friend Product< OtherDerived, Derived > operator*(const DiagonalBase< OtherDerived > &lhs, const SparseMatrixBase &rhs)
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
RealScalar blueNorm() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:36:01