10 #ifndef EIGEN_SKYLINE_STORAGE_H 11 #define EIGEN_SKYLINE_STORAGE_H 21 template<
typename Scalar>
88 Index newAllocatedSize = size + upperSize +
lowerSize;
90 reallocate(size, upperProfileSize, lowerProfileSize, upperSize, lowerSize);
100 reallocate(diagSize, upperProfileSize, lowerProfileSize, upperSize +
Index(reserveSizeFactor * upperSize), lowerSize +
Index(reserveSizeFactor * lowerSize));
140 inline const Scalar&
diag(Index i)
const {
148 inline const Scalar&
upper(Index i)
const {
156 inline const Scalar&
lower(Index i)
const {
197 void prune(Scalar reference, RealScalar epsilon = dummy_precision<RealScalar>()) {
211 Index copyDiagSize = (std::min)(diagSize,
m_diagSize);
212 Index copyUpperSize = (std::min)(upperSize,
m_upperSize);
213 Index copyLowerSize = (std::min)(lowerSize,
m_lowerSize);
218 memcpy(diag,
m_diag, copyDiagSize *
sizeof (Scalar));
219 memcpy(upper,
m_upper, copyUpperSize *
sizeof (Scalar));
220 memcpy(lower,
m_lower, copyLowerSize *
sizeof (Scalar));
221 memcpy(upperProfile,
m_upperProfile, copyUpperProfileSize *
sizeof (Index));
222 memcpy(lowerProfile,
m_lowerProfile, copyLowerProfileSize *
sizeof (Index));
259 #endif // EIGEN_COMPRESSED_STORAGE_H
SkylineStorage(const SkylineStorage &other)
Index lowerProfileSize() const
void prune(Scalar reference, RealScalar epsilon=dummy_precision< RealScalar >())
const Scalar & lower(Index i) const
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
SkylineStorage & operator=(const SkylineStorage &other)
void reallocate(Index diagSize, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize)
NumTraits< Scalar >::Real RealScalar
const Index & lowerProfile(Index i) const
const Index & upperProfile(Index i) const
void reserve(Index size, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize)
void swap(SkylineStorage &other)
const Scalar & diag(Index i) const
Index allocatedSize() const
void resize(Index diagSize, Index upperProfileSize, Index lowerProfileSize, Index upperSize, Index lowerSize, float reserveSizeFactor=0)
const Scalar & upper(Index i) const
Index upperProfileSize() const
Index & upperProfile(Index i)
Index & lowerProfile(Index i)
static SkylineStorage Map(Index *upperProfile, Index *lowerProfile, Scalar *diag, Scalar *upper, Scalar *lower, Index size, Index upperSize, Index lowerSize)