Go to the documentation of this file.
10 #ifndef EIGEN_SPARSEVECTOR_H
11 #define EIGEN_SPARSEVECTOR_H
29 template<
typename _Scalar,
int _Options,
typename _StorageIndex>
39 RowsAtCompileTime = IsColVector ?
Dynamic : 1,
40 ColsAtCompileTime = IsColVector ? 1 :
Dynamic,
41 MaxRowsAtCompileTime = RowsAtCompileTime,
42 MaxColsAtCompileTime = ColsAtCompileTime,
55 template<
typename Dest,
typename Src,
57 : Src::InnerSizeAtCompileTime==1 ?
SVA_Outer
63 template<
typename _Scalar,
int _Options,
typename _StorageIndex>
265 template<
typename OtherDerived>
269 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
273 *
this =
other.derived();
280 *
this =
other.derived();
293 template<
int OtherOptions>
303 if (
other.isRValue())
315 template<
typename OtherDerived>
324 #ifndef EIGEN_PARSED_BY_DOXYGEN
325 template<
typename Lhs,
typename Rhs>
328 return Base::operator=(
product);
335 s <<
"(" <<
m.m_data.value(
i) <<
"," <<
m.m_data.index(
i) <<
") ";
391 # ifdef EIGEN_SPARSEVECTOR_PLUGIN
392 # include EIGEN_SPARSEVECTOR_PLUGIN
409 template<
typename _Scalar,
int _Options,
typename _Index>
420 Flags = SparseVectorType::Flags
431 return m_matrix->nonZeros();
440 template<
typename Dest,
typename Src>
442 static void run(Dest& dst,
const Src& src) {
445 SrcEvaluatorType srcEval(src);
446 for(
typename SrcEvaluatorType::InnerIterator it(srcEval, 0); it; ++it)
447 dst.insert(it.index()) = it.value();
451 template<
typename Dest,
typename Src>
453 static void run(Dest& dst,
const Src& src) {
456 SrcEvaluatorType srcEval(src);
459 typename SrcEvaluatorType::InnerIterator it(srcEval,
i);
461 dst.insert(
i) = it.value();
466 template<
typename Dest,
typename Src>
468 static void run(Dest& dst,
const Src& src) {
478 #endif // EIGEN_SPARSEVECTOR_H
static void check_template_parameters()
SparseVector & operator=(const SparseMatrixBase< OtherDerived > &other)
_StorageIndex StorageIndex
Scalar & insertBackByOuterInnerUnordered(Index outer, Index inner)
Namespace containing all symbols from the Eigen library.
StorageIndex * outerIndexPtr()
A versatible sparse matrix representation.
SparseVectorType::ReverseInnerIterator ReverseInnerIterator
EIGEN_STRONG_INLINE StorageIndex * innerIndexPtr()
void append(const Scalar &v, Index i)
StorageIndex & index(Index i)
void reserve(Index reserveSize)
EIGEN_DEPRECATED void endFill()
void swap(CompressedStorage &other)
const EIGEN_STRONG_INLINE StorageIndex * innerIndexPtr() const
SparseVector(const SparseMatrixBase< OtherDerived > &other)
const unsigned int RowMajorBit
EIGEN_STRONG_INLINE Scalar * valuePtr()
const unsigned int CompressedAccessBit
void prune(const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision())
static void run(Dest &dst, const Src &src)
void resize(Index rows, Index cols)
SparseVector(const SparseVector &other)
#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op)
void startVec(Index outer)
EIGEN_DEPRECATED Scalar & fillrand(Index r, Index c)
EIGEN_STRONG_INLINE Index outerSize() const
evaluator_base< SparseVectorType > Base
SparseVector< _Scalar, _Options, _Index > SparseVectorType
Scalar & insertBackByOuterInner(Index outer, Index inner)
#define eigen_internal_assert(x)
const StorageIndex * outerIndexPtr() const
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
void swap(SparseVector &other)
const StorageIndex * innerNonZeroPtr() const
#define EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
Common base class for sparse [compressed]-{row|column}-storage format.
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
EIGEN_DEPRECATED Scalar & fill(Index i)
EIGEN_DEPRECATED Storage & _data()
void resize(Index newSize)
#define EIGEN_UNUSED_VARIABLE(var)
SparseVector & operator=(const SparseSparseProduct< Lhs, Rhs > &product)
const unsigned int LvalueBit
void resizeNonZeros(Index size)
const EIGEN_DEPRECATED Storage & _data() const
void conservativeResize(Index newSize)
#define EIGEN_STRONG_INLINE
const StorageIndex * indexPtr() const
void swap(GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &a, GeographicLib::NearestNeighbor< dist_t, pos_t, distfun_t > &b)
const Storage & data() const
EIGEN_STRONG_INLINE Index rows() const
const EIGEN_STRONG_INLINE Scalar * valuePtr() const
Scalar & atWithInsertion(Index key, const Scalar &defaultValue=Scalar(0))
Scalar & insertBack(Index i)
Base::ReverseInnerIterator ReverseInnerIterator
Scalar at(Index key, const Scalar &defaultValue=Scalar(0)) const
EIGEN_DEVICE_FUNC IndexDest convert_index(const IndexSrc &idx)
static void run(Dest &dst, const Src &src)
EIGEN_DEPRECATED void startFill(Index reserve)
SparseVector & operator=(const SparseVector &other)
void resize(Index size, double reserveSizeFactor=0)
evaluator(const SparseVectorType &mat)
const Scalar * valuePtr() const
SparseVector(Index rows, Index cols)
NumTraits< Scalar >::Real RealScalar
EIGEN_DEPRECATED Scalar & fill(Index r, Index c)
SparseCompressedBase< SparseVector > Base
EIGEN_STRONG_INLINE Index innerSize() const
void prune(const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision())
Base::InnerIterator InnerIterator
SparseVectorType::InnerIterator InnerIterator
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Scalar & coeffRef(Index i)
static void run(Dest &dst, const Src &src)
const SparseVectorType * m_matrix
Scalar & insertBackUnordered(Index i)
Base class of any sparse matrices or sparse expressions.
friend std::ostream & operator<<(std::ostream &s, const SparseVector &m)
void product(const MatrixType &m)
StorageIndex * innerNonZeroPtr()
Index nonZerosEstimate() const
EIGEN_STRONG_INLINE Index cols() const
const int InnerRandomAccessPattern
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
EIGEN_DEPRECATED Scalar & fillrand(Index i)
const unsigned int NestByRefBit
Scalar & coeffRef(Index row, Index col)
void swap(SparseMatrix< Scalar, OtherOptions, StorageIndex > &other)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Scalar & insert(Index row, Index col)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Scalar coeff(Index row, Index col) const
Scalar coeff(Index i) const
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:56