|
| SparseColumn () |
|
RowIndex | EntryRow (EntryIndex i) const |
| Use a separate API to get the row and coefficient of entry #i.
|
|
Fractional | EntryCoefficient (EntryIndex i) const |
|
RowIndex | GetFirstRow () const |
|
RowIndex | GetLastRow () const |
|
void | ApplyRowPermutation (const RowPermutation &p) |
|
void | ApplyPartialRowPermutation (const RowPermutation &p) |
|
| SparseVector () |
|
| SparseVector (const SparseVector &other) |
|
| SparseVector (SparseVector &&other)=default |
|
SparseVector & | operator= (const SparseVector &other) |
|
SparseVector & | operator= (SparseVector &&other)=default |
|
Iterator | begin () const |
|
Iterator | end () const |
|
void | Clear () |
| Clears the vector, i.e. removes all entries.
|
|
void | ClearAndRelease () |
| Clears the vector and releases the memory it uses.
|
|
void | Reserve (EntryIndex new_capacity) |
| Reserve the underlying storage for the given number of entries.
|
|
bool | IsEmpty () const |
| Returns true if the vector is empty.
|
|
void | CleanUp () |
|
bool | IsCleanedUp () const |
|
void | Swap (SparseVector *other) |
|
void | PopulateFromSparseVector (const SparseVector &sparse_vector) |
|
void | PopulateFromDenseVector (const DenseVector &dense_vector) |
|
void | AppendEntriesWithOffset (const SparseVector &sparse_vector, Index offset) |
|
bool | CheckNoDuplicates () const |
|
bool | CheckNoDuplicates (StrictITIVector< Index, bool > *boolean_vector) const |
|
void | SetCoefficient (Index index, Fractional value) |
| Defines the coefficient at index, i.e. vector[index] = value;.
|
|
void | DeleteEntry (Index index) |
|
void | RemoveNearZeroEntries (Fractional threshold) |
|
void | RemoveNearZeroEntriesWithWeights (Fractional threshold, const DenseVector &weights) |
|
void | MoveEntryToFirstPosition (Index index) |
|
void | MoveEntryToLastPosition (Index index) |
|
void | MultiplyByConstant (Fractional factor) |
|
void | ComponentWiseMultiply (const DenseVector &factors) |
|
void | DivideByConstant (Fractional factor) |
|
void | ComponentWiseDivide (const DenseVector &factors) |
|
void | CopyToDenseVector (Index num_indices, DenseVector *dense_vector) const |
|
void | PermutedCopyToDenseVector (const IndexPermutation &index_perm, Index num_indices, DenseVector *dense_vector) const |
|
void | AddMultipleToDenseVector (Fractional multiplier, DenseVector *dense_vector) const |
|
void | AddMultipleToSparseVectorAndDeleteCommonIndex (Fractional multiplier, Index removed_common_index, Fractional drop_tolerance, SparseVector *accumulator_vector) const |
|
void | AddMultipleToSparseVectorAndIgnoreCommonIndex (Fractional multiplier, Index removed_common_index, Fractional drop_tolerance, SparseVector *accumulator_vector) const |
|
void | ApplyIndexPermutation (const IndexPermutation &index_perm) |
| Applies the index permutation to all entries: index = index_perm[index];.
|
|
void | ApplyPartialIndexPermutation (const IndexPermutation &index_perm) |
|
void | MoveTaggedEntriesTo (const IndexPermutation &index_perm, SparseVector *output) |
|
Fractional | LookUpCoefficient (Index index) const |
|
EntryIndex | num_entries () const |
| Note this method can only be used when the vector has no duplicates.
|
|
Index | GetFirstIndex () const |
|
Fractional | GetFirstCoefficient () const |
|
Index | GetLastIndex () const |
| Like GetFirst*, but for the last entry.
|
|
Fractional | GetLastCoefficient () const |
|
::util::IntegerRange< EntryIndex > | AllEntryIndices () const |
|
bool | IsEqualTo (const SparseVector &other) const |
|
std::string | DebugString () const |
|
A SparseColumn is a SparseVector<RowIndex>, with a few methods renamed to help readability on the client side.
Definition at line 48 of file sparse_column.h.