10 #ifndef EIGEN_COMPRESSED_STORAGE_H 11 #define EIGEN_COMPRESSED_STORAGE_H 21 template<
typename _Scalar,
typename _Index>
89 reallocate(size +
size_t(reserveSizeFactor*size));
95 Index
id =
static_cast<Index
>(
m_size);
131 size_t mid = (end+start)>>1;
137 return static_cast<Index
>(start);
142 inline Scalar
at(Index key,
const Scalar& defaultValue =
Scalar(0))
const 155 inline Scalar
atInRange(
size_t start,
size_t end, Index key,
const Scalar& defaultValue =
Scalar(0))
const 159 else if (end>start && key==
m_indices[end-1])
176 for (
size_t j=
m_size-1; j>id; --j)
191 for (
size_t i=0; i<n; ++i)
207 Scalar* newValues =
new Scalar[
size];
208 Index* newIndices =
new Index[
size];
209 size_t copySize = (std::min)(size,
m_size);
233 #endif // EIGEN_COMPRESSED_STORAGE_H
static CompressedStorage Map(Index *indices, Scalar *values, size_t size)
Index searchLowerIndex(Index key) const
iterative scaling algorithm to equilibrate rows and column norms in matrices
void append(const Scalar &v, Index i)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Scalar & atWithInsertion(Index key, const Scalar &defaultValue=Scalar(0))
void reallocate(size_t size)
bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, typename NumTraits< Scalar >::Real precision=NumTraits< Scalar >::dummy_precision())
void reserve(size_t size)
Index searchLowerIndex(size_t start, size_t end, Index key) const
size_t allocatedSize() const
const Index & index(size_t i) const
void smart_copy(const T *start, const T *end, T *target)
const Scalar & value(size_t i) const
CompressedStorage & operator=(const CompressedStorage &other)
Scalar at(Index key, const Scalar &defaultValue=Scalar(0)) const
CompressedStorage(const CompressedStorage &other)
void swap(CompressedStorage &other)
void resize(size_t size, float reserveSizeFactor=0)
CompressedStorage(size_t size)
NumTraits< Scalar >::Real RealScalar
void prune(const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision())
Scalar atInRange(size_t start, size_t end, Index key, const Scalar &defaultValue=Scalar(0)) const