![]() |
OR-Tools
8.2
|
Definition at line 83 of file sparse_vector.h.
Public Types | |
| typedef IndexType | Index |
| typedef StrictITIVector< Index, Fractional > | DenseVector |
| typedef Permutation< Index > | IndexPermutation |
| using | Iterator = IteratorType |
| using | Entry = typename Iterator::Entry |
Protected Member Functions | |
| void | AddEntry (Index index, Fractional value) |
| void | ResizeDown (EntryIndex new_size) |
| Index | GetIndex (EntryIndex i) const |
| Fractional | GetCoefficient (EntryIndex i) const |
| Index & | MutableIndex (EntryIndex i) |
| Fractional & | MutableCoefficient (EntryIndex i) |
Protected Attributes | |
| std::unique_ptr< char[]> | buffer_ |
| EntryIndex | num_entries_ |
| EntryIndex | capacity_ |
| Index * | index_ |
| Fractional * | coefficient_ |
| bool | may_contain_duplicates_ |
| typedef StrictITIVector<Index, Fractional> DenseVector |
Definition at line 87 of file sparse_vector.h.
| using Entry = typename Iterator::Entry |
Definition at line 91 of file sparse_vector.h.
| typedef IndexType Index |
Definition at line 85 of file sparse_vector.h.
| typedef Permutation<Index> IndexPermutation |
Definition at line 88 of file sparse_vector.h.
| using Iterator = IteratorType |
Definition at line 90 of file sparse_vector.h.
Definition at line 459 of file sparse_vector.h.
| SparseVector | ( | const SparseVector< IndexType, IteratorType > & | other | ) |
Definition at line 467 of file sparse_vector.h.
|
default |
|
inlineprotected |
Definition at line 317 of file sparse_vector.h.
| void AddMultipleToDenseVector | ( | Fractional | multiplier, |
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 815 of file sparse_vector.h.
| void AddMultipleToSparseVectorAndDeleteCommonIndex | ( | Fractional | multiplier, |
| Index | removed_common_index, | ||
| Fractional | drop_tolerance, | ||
| SparseVector< IndexType, IteratorType > * | accumulator_vector | ||
| ) | const |
Definition at line 825 of file sparse_vector.h.
| void AddMultipleToSparseVectorAndIgnoreCommonIndex | ( | Fractional | multiplier, |
| Index | removed_common_index, | ||
| Fractional | drop_tolerance, | ||
| SparseVector< IndexType, IteratorType > * | accumulator_vector | ||
| ) | const |
Definition at line 834 of file sparse_vector.h.
|
inline |
Definition at line 302 of file sparse_vector.h.
| void AppendEntriesWithOffset | ( | const SparseVector< IndexType, IteratorType > & | sparse_vector, |
| Index | offset | ||
| ) |
Definition at line 626 of file sparse_vector.h.
| void ApplyIndexPermutation | ( | const IndexPermutation & | index_perm | ) |
Definition at line 926 of file sparse_vector.h.
| void ApplyPartialIndexPermutation | ( | const IndexPermutation & | index_perm | ) |
Definition at line 934 of file sparse_vector.h.
| IteratorType begin |
Definition at line 446 of file sparse_vector.h.
| bool CheckNoDuplicates |
Definition at line 669 of file sparse_vector.h.
| bool CheckNoDuplicates | ( | StrictITIVector< Index, bool > * | boolean_vector | ) | const |
Definition at line 637 of file sparse_vector.h.
| void CleanUp |
Definition at line 544 of file sparse_vector.h.
| void Clear |
Definition at line 479 of file sparse_vector.h.
| void ClearAndRelease |
Definition at line 485 of file sparse_vector.h.
| void ComponentWiseDivide | ( | const DenseVector & | factors | ) |
Definition at line 786 of file sparse_vector.h.
| void ComponentWiseMultiply | ( | const DenseVector & | factors | ) |
Definition at line 770 of file sparse_vector.h.
| void CopyToDenseVector | ( | Index | num_indices, |
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 794 of file sparse_vector.h.
| std::string DebugString |
Definition at line 1007 of file sparse_vector.h.
| void DeleteEntry | ( | Index | index | ) |
Definition at line 687 of file sparse_vector.h.
| void DivideByConstant | ( | Fractional | factor | ) |
Definition at line 778 of file sparse_vector.h.
| IteratorType end |
Definition at line 451 of file sparse_vector.h.
|
inlineprotected |
Definition at line 349 of file sparse_vector.h.
|
inline |
Definition at line 283 of file sparse_vector.h.
|
inline |
Definition at line 279 of file sparse_vector.h.
|
inlineprotected |
Definition at line 344 of file sparse_vector.h.
|
inline |
Definition at line 293 of file sparse_vector.h.
|
inline |
Definition at line 289 of file sparse_vector.h.
| bool IsCleanedUp |
Definition at line 580 of file sparse_vector.h.
| bool IsEmpty |
Definition at line 529 of file sparse_vector.h.
| bool IsEqualTo | ( | const SparseVector< IndexType, IteratorType > & | other | ) | const |
Definition at line 995 of file sparse_vector.h.
| Fractional LookUpCoefficient | ( | Index | index | ) | const |
Definition at line 979 of file sparse_vector.h.
| void MoveEntryToFirstPosition | ( | Index | index | ) |
Definition at line 735 of file sparse_vector.h.
| void MoveEntryToLastPosition | ( | Index | index | ) |
Definition at line 748 of file sparse_vector.h.
| void MoveTaggedEntriesTo | ( | const IndexPermutation & | index_perm, |
| SparseVector< IndexType, IteratorType > * | output | ||
| ) |
Definition at line 949 of file sparse_vector.h.
| void MultiplyByConstant | ( | Fractional | factor | ) |
Definition at line 762 of file sparse_vector.h.
|
inlineprotected |
Definition at line 362 of file sparse_vector.h.
|
inlineprotected |
Definition at line 357 of file sparse_vector.h.
|
inline |
Definition at line 270 of file sparse_vector.h.
| SparseVector< IndexType, IteratorType > & operator= | ( | const SparseVector< IndexType, IteratorType > & | other | ) |
Definition at line 473 of file sparse_vector.h.
|
default |
| void PermutedCopyToDenseVector | ( | const IndexPermutation & | index_perm, |
| Index | num_indices, | ||
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 804 of file sparse_vector.h.
| void PopulateFromDenseVector | ( | const DenseVector & | dense_vector | ) |
Definition at line 613 of file sparse_vector.h.
| void PopulateFromSparseVector | ( | const SparseVector< IndexType, IteratorType > & | sparse_vector | ) |
Definition at line 592 of file sparse_vector.h.
| void RemoveNearZeroEntries | ( | Fractional | threshold | ) |
Definition at line 704 of file sparse_vector.h.
| void RemoveNearZeroEntriesWithWeights | ( | Fractional | threshold, |
| const DenseVector & | weights | ||
| ) |
Definition at line 720 of file sparse_vector.h.
| void Reserve | ( | EntryIndex | new_capacity | ) |
Definition at line 495 of file sparse_vector.h.
|
inlineprotected |
Definition at line 336 of file sparse_vector.h.
| void SetCoefficient | ( | Index | index, |
| Fractional | value | ||
| ) |
Definition at line 680 of file sparse_vector.h.
| void Swap | ( | SparseVector< IndexType, IteratorType > * | other | ) |
Definition at line 534 of file sparse_vector.h.
|
protected |
Definition at line 379 of file sparse_vector.h.
|
protected |
Definition at line 381 of file sparse_vector.h.
|
protected |
Definition at line 385 of file sparse_vector.h.
|
protected |
Definition at line 384 of file sparse_vector.h.
|
mutableprotected |
Definition at line 389 of file sparse_vector.h.
|
protected |
Definition at line 380 of file sparse_vector.h.