Go to the documentation of this file.
10 #ifndef EIGEN_DYNAMIC_SPARSEMATRIX_H
11 #define EIGEN_DYNAMIC_SPARSEMATRIX_H
36 template<
typename _Scalar,
int _Options,
typename _StorageIndex>
55 template<
typename _Scalar,
int _Options,
typename _StorageIndex>
56 class DynamicSparseMatrix
57 :
public SparseMatrixBase<DynamicSparseMatrix<_Scalar, _Options, _StorageIndex> >
67 using
Base::IsRowMajor;
68 using
Base::operator=;
78 std::vector<internal::CompressedStorage<Scalar,StorageIndex> >
m_data;
88 std::vector<internal::CompressedStorage<Scalar,StorageIndex> >&
_data() {
return m_data; }
89 const std::vector<internal::CompressedStorage<Scalar,StorageIndex> >&
_data()
const {
return m_data; }
98 return m_data[outer].at(inner);
109 return m_data[outer].atWithInsertion(inner);
113 class ReverseInnerIterator;
139 m_data[
j].reserve(reserveSizePerVector);
162 &&
"wrong sorted insertion");
163 m_data[outer].append(0, inner);
174 m_data[outer].resize(
id+2,1);
176 while ( (
id >= startId) && (
m_data[outer].index(
id) > inner) )
182 m_data[outer].index(
id+1) = inner;
183 m_data[outer].value(
id+1) = 0;
184 return m_data[outer].value(
id+1);
231 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
241 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
248 template<
typename OtherDerived>
252 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
261 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
264 *
this =
other.derived();
277 if (
other.isRValue())
332 # ifdef EIGEN_DYNAMICSPARSEMATRIX_PLUGIN
333 # include EIGEN_DYNAMICSPARSEMATRIX_PLUGIN
337 template<
typename Scalar,
int _Options,
typename _StorageIndex>
354 template<
typename Scalar,
int _Options,
typename _StorageIndex>
373 template<
typename _Scalar,
int _Options,
typename _StorageIndex>
375 :
evaluator_base<DynamicSparseMatrix<_Scalar,_Options,_StorageIndex> >
384 Flags = SparseMatrixType::Flags
404 #endif // EIGEN_DYNAMIC_SPARSEMATRIX_H
A sparse matrix class designed for matrix assembly purpose.
DynamicSparseMatrix(const DynamicSparseMatrix &other)
ReverseInnerIterator(const DynamicSparseMatrix &mat, Index outer)
Namespace containing all symbols from the Eigen library.
Index innerNonZeros(Index j) const
SparseVector< Scalar, _Options, _StorageIndex >::ReverseInnerIterator Base
EIGEN_DEPRECATED DynamicSparseMatrix(Index rows, Index cols)
EIGEN_DEPRECATED void startFill(Index reserveSize=1000)
const SparseMatrixType * m_matrix
DynamicSparseMatrix< _Scalar, _Options, _StorageIndex > SparseMatrixType
const unsigned int RowMajorBit
EIGEN_DEPRECATED DynamicSparseMatrix()
void reserve(Index reserveSize=1000)
EIGEN_DEPRECATED DynamicSparseMatrix(const SparseMatrixBase< OtherDerived > &other)
Derived & operator=(const EigenBase< OtherDerived > &other)
Scalar & insert(Index row, Index col)
SparseMatrixType::InnerIterator InnerIterator
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
DynamicSparseMatrix & operator=(const DynamicSparseMatrix &other)
std::vector< internal::CompressedStorage< Scalar, StorageIndex > > & _data()
void swap(DynamicSparseMatrix &other)
void resize(Index rows, Index cols)
#define EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
static StorageIndex convert_index(const Index idx)
static const Similarity3 id
const unsigned int LvalueBit
InnerIterator(const DynamicSparseMatrix &mat, Index outer)
SparseVector< Scalar, _Options, _StorageIndex >::InnerIterator Base
Scalar & insertBack(Index row, Index col)
void swap(GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &a, GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &b)
DynamicSparseMatrix< Scalar,(Flags &~RowMajorBit)|(IsRowMajor?RowMajorBit:0), StorageIndex > TransposedSparseMatrix
Scalar & coeffRef(Index row, Index col)
An InnerIterator allows to loop over the element of any matrix expression.
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
const std::vector< internal::CompressedStorage< Scalar, StorageIndex > > & _data() const
SparseMatrixBase< DynamicSparseMatrix > Base
evaluator(const SparseMatrixType &mat)
std::vector< internal::CompressedStorage< Scalar, StorageIndex > > m_data
NumTraits< Scalar >::Real RealScalar
Scalar coeff(Index row, Index col) const
Index nonZerosEstimate() const
void resizeAndKeepData(Index rows, Index cols)
SparseMatrixType::ReverseInnerIterator ReverseInnerIterator
Scalar coeff(Index row, Index col) const
Base class of any sparse matrices or sparse expressions.
const int OuterRandomAccessPattern
EIGEN_DEPRECATED void endFill()
EIGEN_DEPRECATED Scalar & fill(Index row, Index col)
const unsigned int NestByRefBit
EIGEN_DEPRECATED Scalar & fillrand(Index row, Index col)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Scalar & insertBackByOuterInner(Index outer, Index inner)
void prune(Scalar reference, RealScalar epsilon=NumTraits< RealScalar >::dummy_precision())
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
_StorageIndex StorageIndex
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:01:04