![]() |
|
A versatible sparse matrix representation. More...
#include <SparseMatrix.h>
Classes | |
struct | IndexPosPair |
class | SingletonVector |
Public Member Functions | |
Index | rows () const |
Index | cols () const |
Index | innerSize () const |
Index | outerSize () const |
const Scalar * | valuePtr () const |
Scalar * | valuePtr () |
const StorageIndex * | innerIndexPtr () const |
StorageIndex * | innerIndexPtr () |
const StorageIndex * | outerIndexPtr () const |
StorageIndex * | outerIndexPtr () |
const StorageIndex * | innerNonZeroPtr () const |
StorageIndex * | innerNonZeroPtr () |
constexpr Storage & | data () |
constexpr const Storage & | data () const |
Scalar | coeff (Index row, Index col) const |
Scalar & | findOrInsertCoeff (Index row, Index col, bool *inserted) |
Scalar & | coeffRef (Index row, Index col) |
Scalar & | insert (Index row, Index col) |
void | setZero () |
void | reserve (Index reserveSize) |
template<class SizesType > | |
void | reserve (const SizesType &reserveSizes, const typename SizesType::value_type &enableif=typename SizesType::value_type()) |
Scalar & | insertBack (Index row, Index col) |
Scalar & | insertBackByOuterInner (Index outer, Index inner) |
Scalar & | insertBackByOuterInnerUnordered (Index outer, Index inner) |
void | startVec (Index outer) |
void | finalize () |
void | removeOuterVectors (Index j, Index num=1) |
void | insertEmptyOuterVectors (Index j, Index num=1) |
template<typename InputIterators > | |
void | setFromTriplets (const InputIterators &begin, const InputIterators &end) |
template<typename InputIterators , typename DupFunctor > | |
void | setFromTriplets (const InputIterators &begin, const InputIterators &end, DupFunctor dup_func) |
template<typename Derived , typename DupFunctor > | |
void | collapseDuplicates (DenseBase< Derived > &wi, DupFunctor dup_func=DupFunctor()) |
template<typename InputIterators > | |
void | setFromSortedTriplets (const InputIterators &begin, const InputIterators &end) |
template<typename InputIterators , typename DupFunctor > | |
void | setFromSortedTriplets (const InputIterators &begin, const InputIterators &end, DupFunctor dup_func) |
template<typename InputIterators > | |
void | insertFromTriplets (const InputIterators &begin, const InputIterators &end) |
template<typename InputIterators , typename DupFunctor > | |
void | insertFromTriplets (const InputIterators &begin, const InputIterators &end, DupFunctor dup_func) |
template<typename InputIterators > | |
void | insertFromSortedTriplets (const InputIterators &begin, const InputIterators &end) |
template<typename InputIterators , typename DupFunctor > | |
void | insertFromSortedTriplets (const InputIterators &begin, const InputIterators &end, DupFunctor dup_func) |
Scalar & | insertByOuterInner (Index j, Index i) |
void | makeCompressed () |
void | uncompress () |
void | prune (const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision()) |
template<typename KeepFunc > | |
void | prune (const KeepFunc &keep=KeepFunc()) |
void | conservativeResize (Index rows, Index cols) |
void | resize (Index rows, Index cols) |
void | resizeNonZeros (Index size) |
const ConstDiagonalReturnType | diagonal () const |
DiagonalReturnType | diagonal () |
SparseMatrix () | |
SparseMatrix (Index rows, Index cols) | |
template<typename OtherDerived > | |
SparseMatrix (const SparseMatrixBase< OtherDerived > &other) | |
template<typename OtherDerived , unsigned int UpLo> | |
SparseMatrix (const SparseSelfAdjointView< OtherDerived, UpLo > &other) | |
SparseMatrix (SparseMatrix &&other) | |
template<typename OtherDerived > | |
SparseMatrix (SparseCompressedBase< OtherDerived > &&other) | |
SparseMatrix (const SparseMatrix &other) | |
template<typename OtherDerived > | |
SparseMatrix (const ReturnByValue< OtherDerived > &other) | |
Copy constructor with in-place evaluation. More... | |
template<typename OtherDerived > | |
SparseMatrix (const DiagonalBase< OtherDerived > &other) | |
Copy constructor with in-place evaluation. More... | |
void | swap (SparseMatrix &other) |
void | setIdentity () |
SparseMatrix & | operator= (const SparseMatrix &other) |
SparseMatrix & | operator= (SparseMatrix &&other) |
template<typename OtherDerived > | |
SparseMatrix & | operator= (const EigenBase< OtherDerived > &other) |
template<typename Lhs , typename Rhs > | |
SparseMatrix & | operator= (const Product< Lhs, Rhs, AliasFreeProduct > &other) |
template<typename OtherDerived > | |
EIGEN_DONT_INLINE SparseMatrix & | operator= (const SparseMatrixBase< OtherDerived > &other) |
template<typename OtherDerived > | |
SparseMatrix & | operator= (SparseCompressedBase< OtherDerived > &&other) |
~SparseMatrix () | |
Scalar | sum () const |
EIGEN_STRONG_INLINE Scalar & | insertBackUncompressed (Index row, Index col) |
template<typename OtherDerived > | |
EIGEN_DONT_INLINE SparseMatrix< Scalar, Options_, StorageIndex_ > & | operator= (const SparseMatrixBase< OtherDerived > &other) |
template<typename Lhs , typename Rhs > | |
SparseMatrix< Scalar, Options_, StorageIndex_ > & | operator= (const Product< Lhs, Rhs, AliasFreeProduct > &src) |
bool | isCompressed () const |
Index | nonZeros () const |
![]() | |
Index | nonZeros () const |
const Scalar * | valuePtr () const |
Scalar * | valuePtr () |
const StorageIndex * | innerIndexPtr () const |
StorageIndex * | innerIndexPtr () |
const StorageIndex * | outerIndexPtr () const |
StorageIndex * | outerIndexPtr () |
const StorageIndex * | innerNonZeroPtr () const |
StorageIndex * | innerNonZeroPtr () |
bool | isCompressed () const |
const Map< const Array< Scalar, Dynamic, 1 > > | coeffs () const |
Map< Array< Scalar, Dynamic, 1 > > | coeffs () |
void | sortInnerIndices (Index begin, Index end) |
void | sortInnerIndices () |
Index | innerIndicesAreSorted (Index begin, Index end) const |
Index | innerIndicesAreSorted () const |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const EigenBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const ReturnByValue< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const SparseMatrix< Scalar_, Options_, StorageIndex_ > &other) |
![]() | |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const EigenBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const ReturnByValue< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator= (const SparseMatrix< Scalar_, Options_, StorageIndex_ > &other) |
const SparseMatrix< Scalar_, Options_, StorageIndex_ > & | derived () const |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | derived () |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | const_cast_derived () const |
Index | rows () const |
Index | cols () const |
Index | size () const |
bool | isVector () const |
Index | outerSize () const |
Index | innerSize () const |
bool | isRValue () const |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | markAsRValue () |
SparseMatrixBase () | |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator+= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator+= (const DiagonalBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator+= (const EigenBase< OtherDerived > &other) |
EIGEN_STRONG_INLINE SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator+= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator-= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator-= (const DiagonalBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator-= (const EigenBase< OtherDerived > &other) |
EIGEN_STRONG_INLINE SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator-= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator*= (const Scalar &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator*= (const SparseMatrixBase< OtherDerived > &other) |
SparseMatrix< Scalar_, Options_, StorageIndex_ > & | operator/= (const Scalar &other) |
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
EIGEN_STRONG_INLINE const SparseMatrixBase< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::template CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
const Product< SparseMatrix< Scalar_, Options_, StorageIndex_ >, OtherDerived > | operator* (const DiagonalBase< OtherDerived > &other) const |
const Product< SparseMatrix< Scalar_, Options_, StorageIndex_ >, OtherDerived, AliasFreeProduct > | operator* (const SparseMatrixBase< OtherDerived > &other) const |
const Product< SparseMatrix< Scalar_, Options_, StorageIndex_ >, OtherDerived > | operator* (const MatrixBase< OtherDerived > &other) const |
SparseSymmetricPermutationProduct< SparseMatrix< Scalar_, Options_, StorageIndex_ >, Upper|Lower > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
const TriangularView< const SparseMatrix< Scalar_, Options_, StorageIndex_ >, Mode > | triangularView () const |
ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
SparseMatrixBase< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::template ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
SparseMatrixBase< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::template SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
Scalar | dot (const MatrixBase< OtherDerived > &other) const |
Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
internal::traits< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::Scalar | dot (const MatrixBase< OtherDerived > &other) const |
internal::traits< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
RealScalar | squaredNorm () const |
RealScalar | norm () const |
RealScalar | blueNorm () const |
TransposeReturnType | transpose () |
const ConstTransposeReturnType | transpose () const |
const AdjointReturnType | adjoint () const |
DenseMatrixType | toDense () const |
bool | isApprox (const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
bool | isApprox (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
const internal::eval< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::type | eval () const |
Scalar | sum () const |
const SparseView< SparseMatrix< Scalar_, Options_, StorageIndex_ > > | pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const |
![]() | |
constexpr EIGEN_DEVICE_FUNC SparseMatrix< Scalar_, Options_, StorageIndex_ > & | derived () |
constexpr EIGEN_DEVICE_FUNC const SparseMatrix< Scalar_, Options_, StorageIndex_ > & | derived () const |
EIGEN_DEVICE_FUNC SparseMatrix< Scalar_, Options_, StorageIndex_ > & | const_cast_derived () const |
EIGEN_DEVICE_FUNC const SparseMatrix< Scalar_, Options_, StorageIndex_ > & | const_derived () const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< SparseMatrix< Scalar_, Options_, StorageIndex_ >, Device > | device (Device &device) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const SparseMatrix< Scalar_, Options_, StorageIndex_ >, Device > | device (Device &device) const |
Protected Types | |
typedef SparseMatrix< Scalar, IsRowMajor ? ColMajor :RowMajor, StorageIndex > | TransposedSparseMatrix |
![]() | |
typedef Base::IndexVector | IndexVector |
Protected Attributes | |
Index | m_outerSize |
Index | m_innerSize |
StorageIndex * | m_outerIndex |
StorageIndex * | m_innerNonZeros |
Storage | m_data |
![]() | |
bool | m_isRValue |
Private Types | |
typedef SparseCompressedBase< SparseMatrix > | Base |
Private Member Functions | |
EIGEN_STATIC_ASSERT ((Options &(ColMajor|RowMajor))==Options, INVALID_MATRIX_TEMPLATE_PARAMETERS) struct default_prunning_func | |
Friends | |
class | SparseVector< Scalar_, 0, StorageIndex_ > |
template<typename , typename , typename , typename , typename > | |
struct | internal::Assignment |
EIGEN_DEVICE_FUNC void | swap (SparseMatrix &a, SparseMatrix &b) |
std::ostream & | operator<< (std::ostream &s, const SparseMatrix &m) |
Additional Inherited Members | |
![]() | |
static StorageIndex | convert_index (const Index idx) |
A versatible sparse matrix representation.
This class implements a more versatile variants of the common compressed row/column storage format. Each colmun's (resp. row) non zeros are stored as a pair of value with associated row (resp. colmiun) index. All the non zeros are stored in a single large buffer. Unlike the compressed format, there might be extra space in between the nonzeros of two successive colmuns (resp. rows) such that insertion of new non-zero can be done with limited memory reallocation and copies.
A call to the function makeCompressed() turns the matrix into the standard compressed format compatible with many library.
More details on this storage sceheme are given in the manual pages.
Scalar_ | the scalar type, i.e. the type of the coefficients |
Options_ | Union of bit flags controlling the storage scheme. Currently the only possibility is ColMajor or RowMajor. The default is 0 which means column-major. |
StorageIndex_ | the type of the indices. It has to be a signed type (e.g., short, int, std::ptrdiff_t). Default is int . |
SparseMatrix::Index
was improperly defined as the storage index type (e.g., int), whereas it is now (starting from Eigen 3.3) deprecated and always defined as Eigen::Index. Codes making use of SparseMatrix::Index
, might thus likely have to be changed to use SparseMatrix::StorageIndex
instead.This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_SPARSEMATRIX_PLUGIN
.
|
private |
typedef Diagonal<const SparseMatrix> Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::ConstDiagonalReturnType |
typedef Diagonal<SparseMatrix> Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::DiagonalReturnType |
typedef Base::IndexVector Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IndexVector |
typedef Base::InnerIterator Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::InnerIterator |
typedef Eigen::Map<SparseMatrix<Scalar, Options_, StorageIndex> > Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::Map |
typedef Base::ReverseInnerIterator Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::ReverseInnerIterator |
typedef Base::ScalarVector Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::ScalarVector |
typedef internal::CompressedStorage<Scalar, StorageIndex> Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::Storage |
|
protected |
|
inline |
Default constructor yielding an empty 0
x
0
matrix
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize().
|
inline |
Constructs a rows x
cols empty matrix
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows().
|
inline |
Constructs a sparse matrix from the sparse expression other
References Eigen::internal::call_assignment_no_alias(), Eigen::SparseMatrixBase< Derived >::derived(), EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::EIGEN_STATIC_ASSERT(), and Eigen::RowMajorBit.
|
inline |
Constructs a sparse matrix from the sparse selfadjoint view other
References Eigen::SparseCompressedBase< Derived >::operator=().
|
inline |
|
inline |
References Eigen::SparseMatrixBase< Derived >::derived().
|
inline |
Copy constructor (it performs a deep copy)
References Eigen::SparseMatrixBase< Derived >::derived().
|
inline |
Copy constructor with in-place evaluation.
References Eigen::ReturnByValue< Derived >::evalTo(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::initAssignment().
|
inlineexplicit |
|
inline |
Destructor
|
inlineprotected |
assign diagXpr to the diagonal of *this
There are different strategies: 1 - if *this is overwritten (Func==assign_op) or *this is empty, then we can work treat *this as a dense vector expression. 2 - otherwise, for each diagonal coeff, 2.a - if it already exists, then we update it, 2.b - if the correct position is at the end of the vector, and there is capacity, push to back 2.b - otherwise, the insertion requires a data move, record insertion locations and handle in a second pass 3 - at the end, if some entries failed to be updated in-place, then we alloc a new buffer, copy each chunk at the right position, and insert the new elements.
References Eigen::internal::call_assignment_no_alias(), ei_declare_aligned_stack_constructed_variable, eigen_assert, Eigen::placeholders::end, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), j, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), n, resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size(), tmp, Eigen::value, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
Referenced by Eigen::internal::Assignment< DstXprType, SrcXprType, Functor, Diagonal2Sparse >::run().
|
inline |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::atInRange(), col(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), eigen_assert, Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, row(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows().
Referenced by EIGEN_DECLARE_TEST(), Eigen::Rotation2D< Scalar_ >::fromRotationMatrix(), Eigen::internal::llt_rank_update_lower(), Eigen::internal::visitor_impl< Visitor, Derived, UnrollCount, Vectorize, false, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, UnrollCount, Vectorize, true, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, false, false, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, true, false, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, false, true, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, true, true, ShortCircuitEvaluation >::run(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::run(), Eigen::internal::quaternionbase_assign_impl< Other, 3, 3 >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 2, false >::run(), Eigen::internal::llt_inplace< Scalar, Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::updateInPlace(), and Eigen::internal::upperbidiagonalization_inplace_unblocked().
|
inline |
If the element does not exist then it is inserted via the insert(Index,Index) function which itself turns the matrix into a non compressed form if that was not the case.
This is a O(log(nnz_j)) operation (binary search) plus the cost of insert(Index,Index) function if the element does not already exist.
References col(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), and row().
Referenced by bug1105(), Eigen::SparseInverse< Scalar >::computeInverse(), sparseGaussianTest< Scalar >::df(), Eigen::internal::householder_qr_inplace_update(), Eigen::internal::llt_rank_update_lower(), Eigen::internal::transform_make_affine< Mode >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 2, false >::run(), setrand_eigen_compact(), setrand_eigen_dynamic(), setrand_eigen_gnu_hash(), setrand_eigen_google_dense(), setrand_eigen_google_sparse(), setrand_eigen_sumeq(), setrand_scipy(), Eigen::internal::llt_inplace< Scalar, Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::updateInPlace(), and Eigen::internal::upperbidiagonalization_inplace_unblocked().
void Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::collapseDuplicates | ( | DenseBase< Derived > & | wi, |
DupFunctor | dup_func = DupFunctor() |
||
) |
References eigen_assert, Eigen::placeholders::end, i, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), j, k, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::DenseBase< Derived >::setConstant(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize.
Referenced by gdb.printers._MatrixEntryIterator::__next__(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::analyzePattern(), Eigen::SparseQR< MatrixType_, OrderingType_ >::analyzePattern(), Eigen::SparseLU< MatrixType_, OrderingType_ >::analyzePattern(), benchBasic(), Eigen::internal::bicgstab(), checkOptimalTraversal_impl(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeff(), Eigen::internal::coletree(), MatrixReplacement::cols(), Eigen::SimplicialCholeskyBase< Derived >::cols(), Eigen::SparseLU< MatrixType_, OrderingType_ >::cols(), Eigen::SparseQR< MatrixType_, OrderingType_ >::cols(), Eigen::SuperLUBase< MatrixType_, Derived >::cols(), Eigen::IncompleteLU< Scalar_ >::cols(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::cols(), Eigen::IncompleteLUT< Scalar_, StorageIndex_ >::cols(), Eigen::PastixBase< Derived >::compute(), Eigen::IncompleteLU< Scalar_ >::compute(), Eigen::IterScaling< MatrixType_ >::compute(), Eigen::SPQR< MatrixType_ >::compute(), Eigen::internal::conjugate_gradient(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), sparseGaussianTest< Scalar >::df(), dostuff(), Eigen::SimplicialCholeskyBase< Derived >::dumpMemory(), eiToDense(), eiToGmm(), eiToMtl(), eiToUblas(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::DiagonalPreconditioner< Scalar_ >::factorize(), Eigen::LeastSquareDiagonalPreconditioner< Scalar_ >::factorize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::internal::householder_qr_inplace_unblocked(), Eigen::internal::householder_qr_inplace_update(), initSPD(), Eigen::internal::insert_from_triplets(), Eigen::internal::insert_from_triplets_sorted(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::internal::least_square_conjugate_gradient(), Eigen::internal::llt_rank_update_lower(), main(), Eigen::SluMatrix::Map(), Eigen::internal::minres(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::MatrixMarketIterator< Scalar >::refX(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::MatrixMarketIterator< Scalar >::rhs(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, false, false, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, true, false, ShortCircuitEvaluation >::run(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::run(), Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >::run(), Eigen::internal::lapacke_helpers::lapacke_hqr< MatrixQR, HCoeffs >::run(), Eigen::selfadjoint_product_selector< MatrixType, OtherType, UpLo, false >::run(), Eigen::general_product_to_triangular_selector< MatrixType, ProductType, UpLo, false >::run(), Eigen::SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 3, false >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 2, false >::run(), Eigen::saveMarket(), Eigen::saveMarketDense(), Eigen::internal::set_from_triplets(), Eigen::internal::set_from_triplets_sorted(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), Eigen::internal::tridiagonalization_inplace(), Eigen::internal::llt_inplace< Scalar, Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::updateInPlace(), Eigen::internal::upperbidiagonalization_inplace_unblocked(), use_n_times(), and Eigen::viewAsCholmod().
|
inline |
Resizes the matrix to a rows x cols matrix leaving old values untouched.
If the sizes of the matrix are decreased, then the matrix is turned to uncompressed-mode and the storage of the out of bounds coefficients is kept and reserved. Call makeCompressed() to pack the entries and squeeze extra memory.
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), eigen_assert, Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size(), oomph::CumulativeTimings::start(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress().
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors().
|
inlineconstexpr |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data.
Referenced by bug1105(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenQuaternionPrinter::children(), GlMatrixHelper< false, Flags_ >::loadMatrix(), Eigen::SluMatrix::Map(), GlMatrixHelper< false, Flags_ >::multMatrix(), operator*(), Eigen::internal::lapacke_helpers::lapacke_hqr< MatrixQR, HCoeffs >::run(), Eigen::selfadjoint_product_selector< MatrixType, OtherType, UpLo, true >::run(), Eigen::selfadjoint_product_selector< MatrixType, OtherType, UpLo, false >::run(), Eigen::general_product_to_triangular_selector< MatrixType, ProductType, UpLo, true >::run(), Eigen::general_product_to_triangular_selector< MatrixType, ProductType, UpLo, false >::run(), Eigen::SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run(), Eigen::internal::set_from_triplets_sorted(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), and gdb.printers.EigenQuaternionPrinter::to_string().
|
inlineconstexpr |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data.
Referenced by gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), gdb.printers.EigenQuaternionPrinter::children(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), and gdb.printers.EigenQuaternionPrinter::to_string().
|
inline |
|
inline |
Referenced by Eigen::SparseInverse< Scalar >::computeInverse(), Eigen::SimplicialLLT< MatrixType_, UpLo_, Ordering_ >::determinant(), Eigen::SimplicialNonHermitianLLT< MatrixType_, UpLo_, Ordering_ >::determinant(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 3, false >::extract_kernel(), Eigen::MatrixMarketIterator< Scalar >::matrix(), Eigen::internal::tridiagonalization_inplace_selector< MatrixType, Size, IsComplex >::run(), and Eigen::internal::ldlt_inplace< Lower >::unblocked().
|
inlineprivate |
References CRBond_Bessel::eps, oomph::SarahBL::epsilon, Eigen::internal::isMuchSmallerThan(), and Eigen::value.
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix().
|
inline |
Must be called after inserting a set of non zero entries using the low level compressed API.
References i, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size(), and Eigen::SparseMatrixBase< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::size().
Referenced by fillMatrix(), fillMatrix2(), initSPD(), setinnerrand_eigen(), and setrand_eigen_dynamic().
|
inline |
If the element does not exist then it is inserted via the insert(Index,Index) function which itself turns the matrix into a non compressed form if that was not the case. The output parameter inserted
is set to true.
Otherwise, if the element does exist, inserted
will be set to false.
This is a O(log(nnz_j)) operation (binary search) plus the cost of insert(Index,Index) function if the element does not already exist.
References col(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), eigen_assert, Eigen::placeholders::end, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertAtByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, row(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), oomph::CumulativeTimings::start(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeffRef().
|
inlineprotected |
|
inline |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::indexPtr(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data.
|
inline |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::indexPtr(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data.
Referenced by Eigen::PastixBase< Derived >::analyzePattern(), Eigen::internal::c_to_fortran_numbering(), Eigen::PastixBase< Derived >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::internal::fortran_to_c_numbering(), Eigen::SluMatrix::Map(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::internal::permute_symm_to_symm(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), sparse_solvers(), and Eigen::viewAsCholmod().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros.
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros.
Referenced by Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), and Eigen::viewAsCholmod().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize.
Referenced by initSparse(), and Eigen::internal::set_from_triplets().
|
inline |
If the matrix *this
is in compressed mode, then *this
is turned into uncompressed mode while reserving room for 2 x this->innerSize() non zeros if reserve(Index) has not been called earlier. In this case, the insertion procedure is optimized for a sequential insertion mode where elements are assumed to be inserted by increasing outer-indices.
If that's not the case, then it is strongly recommended to either use a triplet-list to assemble the matrix, or to first call reserve(const SizesType &) to reserve the appropriate number of non-zero elements per inner vector.
Assuming memory has been appropriately reserved, this function performs a sorted insertion in O(1) if the elements of each inner vector are inserted in increasing inner index order, and in O(nnz_j) for a random insertion.
Referenced by fillMatrix(), fillMatrix2(), initSPD(), setinnerrand_eigen(), Eigen::SparseLUMatrixUReturnType< MatrixLType, MatrixUType >::toSparse(), and Eigen::SparseLUMatrixLReturnType< MappedSupernodalType >::toSparse().
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner().
|
inline |
Before filling a given inner vector you must call the statVec(Index) function.
After an insertion session, you should call the finalize() function.
References col(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBackByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, and row().
|
inline |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::append(), eigen_assert, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, p, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBack().
|
inline |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::append(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, p, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
References col(), eigen_assert, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), p, row(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
same as insert(Index,Index) except that the indices are given relative to the storage order
References eigen_assert, Eigen::placeholders::end, i, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertAtByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), oomph::CumulativeTimings::start(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
Referenced by initSparse().
|
protected |
References col(), eigen_assert, Eigen::placeholders::end, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), row(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), and oomph::CumulativeTimings::start().
|
protected |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::allocatedSize(), eigen_assert, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), j, Eigen::numext::maxi(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::reserve(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), eigen_assert, Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), and Eigen::internal::smart_memmove().
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::insertFromSortedTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end | ||
) |
The same as insertFromTriplets but triplets are assumed to be pre-sorted. This is faster and requires less temporary storage. Two triplets a
and b
are appropriately ordered if:
References Eigen::placeholders::end.
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::insertFromSortedTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end, | ||
DupFunctor | dup_func | ||
) |
The same as insertFromSortedTriplets but when duplicates are met the functor dup_func is applied:
Here is a C++11 example keeping the latest entry only:
References Eigen::placeholders::end.
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::insertFromTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end | ||
) |
Insert a batch of elements into the matrix *this
with the list of triplets defined in the half-open range from begin to end.
A triplet is a tuple (i,j,value) defining a non-zero element. The input list of triplets does not have to be sorted, and may contain duplicated elements. In any case, the result is a sorted and compressed sparse matrix where the duplicates have been summed up. This is a O(n) operation, with n the number of triplet elements. The initial contents of *this
are preserved (except for the summation of duplicate elements). The matrix *this
must be properly sized beforehand. The sizes are not extracted from the triplet list.
The InputIterators value_type must provide the following interface:
See for instance the Eigen::Triplet template class.
Here is a typical usage example:
References Eigen::placeholders::end.
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::insertFromTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end, | ||
DupFunctor | dup_func | ||
) |
The same as insertFromTriplets but when duplicates are met the functor dup_func is applied:
Here is a C++11 example keeping the latest entry only:
References Eigen::placeholders::end.
|
protected |
References col(), eigen_assert, Eigen::placeholders::end, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), row(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::searchLowerIndex(), oomph::CumulativeTimings::start(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
protected |
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::allocatedSize(), eigen_assert, Eigen::placeholders::end, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), j, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), oomph::CumulativeTimings::start(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
*this
is in compressed form. Referenced by Eigen::SparseQR< MatrixType_, OrderingType_ >::analyzePattern(), Eigen::SparseLU< MatrixType_, OrderingType_ >::analyzePattern(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::finalize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::prune(), Eigen::Ref< SparseMatrix< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserve(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress(), and Eigen::viewAsCholmod().
|
inline |
Turns the matrix into the compressed format.
References eigen_internal_assert, Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::squeeze(), and oomph::CumulativeTimings::start().
Referenced by Eigen::PardisoLU< MatrixType >::getMatrix(), Eigen::PardisoLLT< MatrixType, UpLo_ >::getMatrix(), Eigen::PardisoLDLT< MatrixType, Options >::getMatrix(), Eigen::SparseLUMatrixUReturnType< MatrixLType, MatrixUType >::toSparse(), and Eigen::SparseLUMatrixLReturnType< MappedSupernodalType >::toSparse().
|
inline |
Referenced by Eigen::SimplicialCholeskyBase< Derived >::_solve_impl(), Eigen::SparseQR< MatrixType_, OrderingType_ >::analyzePattern(), Browse_Matrices(), Eigen::internal::c_to_fortran_numbering(), doEigen(), Eigen::SimplicialCholeskyBase< Derived >::dumpMemory(), Eigen::internal::fortran_to_c_numbering(), Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), main(), Eigen::SluMatrix::Map(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::saveMarket(), sparse_solvers(), and Eigen::viewAsCholmod().
|
inline |
|
inline |
SparseMatrix<Scalar, Options_, StorageIndex_>& Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator= | ( | const Product< Lhs, Rhs, AliasFreeProduct > & | src | ) |
|
inline |
References Eigen::SparseMatrixBase< Derived >::const_cast_derived(), EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::initAssignment(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrixBase< Derived >::isRValue(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::SparseCompressedBase< Derived >::operator=(), Eigen::internal::smart_copy(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap().
EIGEN_DONT_INLINE SparseMatrix& Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other | ) |
EIGEN_DONT_INLINE SparseMatrix<Scalar, Options_, StorageIndex_>& Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator= | ( | const SparseMatrixBase< OtherDerived > & | other | ) |
References Eigen::SparseMatrixBase< Derived >::cols(), Eigen::SparseMatrixBase< Derived >::derived(), EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN, EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN, EIGEN_STATIC_ASSERT, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), Eigen::SparseMatrixBase< Derived >::isRValue(), j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerSize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::RowMajorBit, Eigen::SparseMatrixBase< Derived >::rows(), swap(), tmp, compute_granudrum_aor::type, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
References Eigen::SparseMatrixBase< Derived >::derived().
|
inline |
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex.
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex.
Referenced by Eigen::PastixBase< Derived >::analyzePattern(), Eigen::SparseLU< MatrixType_, OrderingType_ >::analyzePattern(), Eigen::internal::c_to_fortran_numbering(), Eigen::PastixBase< Derived >::factorize(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::internal::fortran_to_c_numbering(), Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SluMatrix::Map(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::internal::permute_symm_to_symm(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::internal::set_from_triplets_sorted(), sparse_solvers(), and Eigen::viewAsCholmod().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize.
Referenced by Eigen::DiagonalPreconditioner< Scalar_ >::factorize(), Eigen::LeastSquareDiagonalPreconditioner< Scalar_ >::factorize(), Eigen::PastixLU< MatrixType_, IsStrSym >::grabMatrix(), initSparse(), is_sorted(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::saveMarket(), Eigen::internal::set_from_triplets(), Eigen::internal::set_from_triplets_sorted(), Eigen::internal::stable_norm_impl(), and Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >::swap().
|
inline |
Turns the matrix into compressed format, and suppresses all nonzeros which do not satisfy the predicate keep. The functor type KeepFunc must implement the following function:
References col(), Eigen::placeholders::end, i, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::index(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, j, k, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), row(), and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::value().
|
inline |
Suppresses all nonzeros which are much smaller than reference under the tolerance epsilon
References oomph::SarahBL::epsilon.
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), eigen_assert, Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::internal::smart_memmove(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress().
|
inline |
|
inline |
Preallocates reserveSize non zeros.
Precondition: the matrix must be in compressed mode.
References eigen_assert, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::reserve().
Referenced by fillMatrix(), fillMatrix2(), initSparse(), Eigen::loadMarket(), setrand_eigen_dynamic(), setrand_eigen_sumeq(), Eigen::SparseLUMatrixUReturnType< MatrixLType, MatrixUType >::toSparse(), and Eigen::SparseLUMatrixLReturnType< MappedSupernodalType >::toSparse().
|
inlineprotected |
References Eigen::placeholders::end, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerIndexPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::numext::maxi(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::moveChunk(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::reserve(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::internal::smart_memmove(), swap(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::valuePtr().
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserve().
|
inline |
Resizes the matrix to a rows x cols matrix and initializes it to zero.
This function does not free the currently allocated memory. To release as much as memory as possible, call
after resizing it.
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::clear(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerSize(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows().
Referenced by Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::analyzePattern(), cholesky_faillure_cases(), Eigen::IterScaling< MatrixType_ >::compute(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::PardisoLLT< MatrixType, UpLo_ >::getMatrix(), Eigen::PardisoLDLT< MatrixType, Options >::getMatrix(), Eigen::loadMarket(), Eigen::loadMarketDense(), Eigen::internal::permute_symm_to_symm(), Eigen::internal::set_from_triplets_sorted(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix().
|
inline |
Resize the nonzero vector to size
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), and Eigen::SparseMatrixBase< SparseMatrix< Scalar_, Options_, StorageIndex_ > >::size().
Referenced by Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::internal::permute_symm_to_symm(), Eigen::internal::set_from_triplets_sorted(), and setrand_scipy().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::IsRowMajor, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize.
Referenced by gdb.printers._MatrixEntryIterator::__next__(), Eigen::SimplicialCholeskyBase< Derived >::_solve_impl(), Eigen::PastixBase< Derived >::analyzePattern(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::analyzePattern(), Eigen::SparseQR< MatrixType_, OrderingType_ >::analyzePattern(), benchBasic(), Browse_Matrices(), Eigen::internal::c_to_fortran_numbering(), checkOptimalTraversal_impl(), gdb.printers.EigenMatrixPrinter::children(), gdb.printers.EigenSparseMatrixPrinter::children(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeff(), Eigen::internal::coletree(), Eigen::PastixBase< Derived >::compute(), Eigen::IterScaling< MatrixType_ >::compute(), Eigen::SPQR< MatrixType_ >::compute(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), sparseGaussianTest< Scalar >::df(), Eigen::DGMRES< MatrixType_, Preconditioner_ >::dgmres(), Eigen::DGMRES< MatrixType_, Preconditioner_ >::dgmresCycle(), dostuff(), eiToGmm(), eiToUblas(), Eigen::PastixBase< Derived >::factorize(), Eigen::SparseQR< MatrixType_, OrderingType_ >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::internal::fortran_to_c_numbering(), Eigen::internal::gmres(), Eigen::internal::householder_qr_inplace_unblocked(), Eigen::internal::householder_qr_inplace_update(), initSPD(), Eigen::internal::insert_from_triplets(), Eigen::internal::insert_from_triplets_sorted(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::internal::least_square_conjugate_gradient(), Eigen::internal::llt_rank_update_lower(), main(), Eigen::SluMatrix::Map(), Eigen::COLAMDOrdering< StorageIndex >::operator()(), Eigen::internal::permute_symm_to_fullsymm(), Eigen::internal::permute_symm_to_symm(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), MatrixReplacement::rows(), Eigen::SimplicialCholeskyBase< Derived >::rows(), Eigen::SparseLU< MatrixType_, OrderingType_ >::rows(), Eigen::SparseQR< MatrixType_, OrderingType_ >::rows(), Eigen::SuperLUBase< MatrixType_, Derived >::rows(), Eigen::IncompleteLU< Scalar_ >::rows(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::rows(), Eigen::IncompleteLUT< Scalar_, StorageIndex_ >::rows(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, false, false, ShortCircuitEvaluation >::run(), Eigen::internal::visitor_impl< Visitor, Derived, Dynamic, true, false, ShortCircuitEvaluation >::run(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, DenseShape >::run(), Eigen::internal::householder_qr_inplace_blocked< MatrixQR, HCoeffs, MatrixQRScalar, InnerStrideIsOne >::run(), Eigen::internal::lapacke_helpers::lapacke_hqr< MatrixQR, HCoeffs >::run(), Eigen::internal::tridiagonalization_inplace_selector< MatrixType, Size, IsComplex >::run(), Eigen::SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 3, false >::run(), Eigen::internal::direct_selfadjoint_eigenvalues< SolverType, 2, false >::run(), Eigen::saveMarket(), Eigen::saveMarketDense(), Eigen::internal::set_from_triplets(), Eigen::internal::set_from_triplets_sorted(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix(), gdb.printers.EigenMatrixPrinter::to_string(), gdb.printers.EigenSparseMatrixPrinter::to_string(), Eigen::internal::tridiagonalization_inplace(), Eigen::internal::llt_inplace< Scalar, Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::unblocked(), Eigen::internal::ldlt_inplace< Lower >::updateInPlace(), Eigen::internal::upperbidiagonalization_inplace_unblocked(), use_n_times(), and Eigen::viewAsCholmod().
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::setFromSortedTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end | ||
) |
The same as setFromTriplets but triplets are assumed to be pre-sorted. This is faster and requires less temporary storage. Two triplets a
and b
are appropriately ordered if:
References Eigen::placeholders::end.
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::setFromSortedTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end, | ||
DupFunctor | dup_func | ||
) |
The same as setFromSortedTriplets but when duplicates are met the functor dup_func is applied:
Here is a C++11 example keeping the latest entry only:
References Eigen::placeholders::end.
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::setFromTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end | ||
) |
Fill the matrix *this
with the list of triplets defined in the half-open range from begin to end.
A triplet is a tuple (i,j,value) defining a non-zero element. The input list of triplets does not have to be sorted, and may contain duplicated elements. In any case, the result is a sorted and compressed sparse matrix where the duplicates have been summed up. This is a O(n) operation, with n the number of triplet elements. The initial contents of *this
are destroyed. The matrix *this
must be properly resized beforehand using the SparseMatrix(Index,Index) constructor, or the resize(Index,Index) method. The sizes are not extracted from the triplet list.
The InputIterators value_type must provide the following interface:
See for instance the Eigen::Triplet template class.
Here is a typical usage example:
References Eigen::placeholders::end.
Referenced by Eigen::loadMarket().
void Eigen::SparseMatrix< Scalar, Options_, StorageIndex_ >::setFromTriplets | ( | const InputIterators & | begin, |
const InputIterators & | end, | ||
DupFunctor | dup_func | ||
) |
The same as setFromTriplets but when duplicates are met the functor dup_func is applied:
Here is a C++11 example keeping the latest entry only:
References Eigen::placeholders::end.
|
inline |
Sets *this to the identity matrix. This function also turns the matrix into compressed mode, and drop any reserved memory.
References eigen_assert, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerIndexPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::resize(), Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::squeeze(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::valuePtr().
Referenced by initMatrix_identity(), and Eigen::internal::tridiagonalization_inplace_selector< MatrixType, 3, false >::run().
|
inline |
Removes all non zeros but keep allocated memory
This function does not free the currently allocated memory. To release as much as memory as possible, call
after resizing it.
References Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::clear(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize.
Referenced by dostuff(), initSparse(), initSPD(), main(), Eigen::internal::transform_make_affine< Mode >::run(), Eigen::general_product_to_triangular_selector< MatrixType, ProductType, UpLo, true >::run(), Eigen::general_product_to_triangular_selector< MatrixType, ProductType, UpLo, false >::run(), and test_random_setter().
|
inline |
References eigen_assert, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::size().
internal::traits< SparseMatrix< Scalar_, Options_, Index_ > >::Scalar Eigen::SparseMatrix< Scalar_, Options_, Index_ >::sum |
Overloaded for performance
References cols, eigen_assert, Eigen::PlainObjectBase< Matrix< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::Map(), and rows.
Referenced by main().
|
inline |
Swaps the content of two sparse matrices of the same type. This is a fast operation that simply swaps the underlying pointers and parameters.
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerSize, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize, Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::swap(), and swap().
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::internal::transposition_matrix_product< ExpressionType, Side, Transposed, ExpressionShape >::run(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix(), and Eigen::internal::ldlt_inplace< Lower >::unblocked().
|
inline |
Turns the matrix into the uncompressed mode
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::isCompressed(), j, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_innerNonZeros, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerIndex, and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_outerSize.
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::valuePtr().
|
inline |
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::m_data, and Eigen::internal::CompressedStorage< Scalar_, StorageIndex_ >::valuePtr().
Referenced by Eigen::PastixBase< Derived >::analyzePattern(), Eigen::PastixBase< Derived >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), Eigen::SluMatrix::Map(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_inner(), Eigen::internal::permutation_matrix_product< ExpressionType, Side, Transposed, SparseShape >::permute_outer(), Eigen::internal::permute_symm_to_symm(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), sparse_solvers(), and Eigen::viewAsCholmod().
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::data(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::finalize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerIndexPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBackByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBackByOuterInnerUnordered(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::prune(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserve(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resizeNonZeros(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setZero(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::startVec(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap(), Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >::swap(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::valuePtr().
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerNonZeroPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::prune(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setZero(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress().
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerSize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap(), and Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >::swap().
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::coeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::finalize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::findOrInsertCoeff(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBackByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertBackByOuterInnerUnordered(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerIndexPtr(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::prune(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setZero(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::startVec(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress().
|
protected |
Referenced by Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::conservativeResize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::finalize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertByOuterInner(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::insertEmptyOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerSize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::prune(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::removeOuterVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::reserveInnerVectors(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setIdentity(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::setZero(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::swap(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::uncompress().