![]() |
OR-Tools
9.6
|
Definition at line 84 of file lp_data/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 88 of file lp_data/sparse_vector.h.
| using Entry = typename Iterator::Entry |
Definition at line 92 of file lp_data/sparse_vector.h.
| typedef IndexType Index |
Definition at line 86 of file lp_data/sparse_vector.h.
| typedef Permutation<Index> IndexPermutation |
Definition at line 89 of file lp_data/sparse_vector.h.
| using Iterator = IteratorType |
Definition at line 91 of file lp_data/sparse_vector.h.
Definition at line 460 of file lp_data/sparse_vector.h.
| SparseVector | ( | const SparseVector< IndexType, IteratorType > & | other | ) |
Definition at line 468 of file lp_data/sparse_vector.h.
|
default |
|
inlineprotected |
Definition at line 318 of file lp_data/sparse_vector.h.
| void AddMultipleToDenseVector | ( | Fractional | multiplier, |
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 821 of file lp_data/sparse_vector.h.
| void AddMultipleToSparseVectorAndDeleteCommonIndex | ( | Fractional | multiplier, |
| Index | removed_common_index, | ||
| Fractional | drop_tolerance, | ||
| SparseVector< IndexType, IteratorType > * | accumulator_vector | ||
| ) | const |
Definition at line 831 of file lp_data/sparse_vector.h.
| void AddMultipleToSparseVectorAndIgnoreCommonIndex | ( | Fractional | multiplier, |
| Index | removed_common_index, | ||
| Fractional | drop_tolerance, | ||
| SparseVector< IndexType, IteratorType > * | accumulator_vector | ||
| ) | const |
Definition at line 840 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 303 of file lp_data/sparse_vector.h.
| void AppendEntriesWithOffset | ( | const SparseVector< IndexType, IteratorType > & | sparse_vector, |
| Index | offset | ||
| ) |
Definition at line 632 of file lp_data/sparse_vector.h.
| void ApplyIndexPermutation | ( | const IndexPermutation & | index_perm | ) |
Definition at line 932 of file lp_data/sparse_vector.h.
| void ApplyPartialIndexPermutation | ( | const IndexPermutation & | index_perm | ) |
Definition at line 940 of file lp_data/sparse_vector.h.
| IteratorType begin |
Definition at line 447 of file lp_data/sparse_vector.h.
| bool CheckNoDuplicates |
Definition at line 675 of file lp_data/sparse_vector.h.
| bool CheckNoDuplicates | ( | StrictITIVector< Index, bool > * | boolean_vector | ) | const |
Definition at line 643 of file lp_data/sparse_vector.h.
| void CleanUp |
Definition at line 545 of file lp_data/sparse_vector.h.
| void Clear |
Definition at line 480 of file lp_data/sparse_vector.h.
| void ClearAndRelease |
Definition at line 486 of file lp_data/sparse_vector.h.
| void ComponentWiseDivide | ( | const DenseVector & | factors | ) |
Definition at line 792 of file lp_data/sparse_vector.h.
| void ComponentWiseMultiply | ( | const DenseVector & | factors | ) |
Definition at line 776 of file lp_data/sparse_vector.h.
| void CopyToDenseVector | ( | Index | num_indices, |
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 800 of file lp_data/sparse_vector.h.
| std::string DebugString |
Definition at line 1013 of file lp_data/sparse_vector.h.
| void DeleteEntry | ( | Index | index | ) |
Definition at line 693 of file lp_data/sparse_vector.h.
| void DivideByConstant | ( | Fractional | factor | ) |
Definition at line 784 of file lp_data/sparse_vector.h.
| IteratorType end |
Definition at line 452 of file lp_data/sparse_vector.h.
|
inlineprotected |
Definition at line 350 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 284 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 280 of file lp_data/sparse_vector.h.
|
inlineprotected |
Definition at line 345 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 294 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 290 of file lp_data/sparse_vector.h.
| bool IsCleanedUp |
Definition at line 581 of file lp_data/sparse_vector.h.
| bool IsEmpty |
Definition at line 530 of file lp_data/sparse_vector.h.
| bool IsEqualTo | ( | const SparseVector< IndexType, IteratorType > & | other | ) | const |
Definition at line 1001 of file lp_data/sparse_vector.h.
| Fractional LookUpCoefficient | ( | Index | index | ) | const |
Definition at line 985 of file lp_data/sparse_vector.h.
| void MoveEntryToFirstPosition | ( | Index | index | ) |
Definition at line 741 of file lp_data/sparse_vector.h.
| void MoveEntryToLastPosition | ( | Index | index | ) |
Definition at line 754 of file lp_data/sparse_vector.h.
| void MoveTaggedEntriesTo | ( | const IndexPermutation & | index_perm, |
| SparseVector< IndexType, IteratorType > * | output | ||
| ) |
Definition at line 955 of file lp_data/sparse_vector.h.
| void MultiplyByConstant | ( | Fractional | factor | ) |
Definition at line 768 of file lp_data/sparse_vector.h.
|
inlineprotected |
Definition at line 363 of file lp_data/sparse_vector.h.
|
inlineprotected |
Definition at line 358 of file lp_data/sparse_vector.h.
|
inline |
Definition at line 271 of file lp_data/sparse_vector.h.
| SparseVector< IndexType, IteratorType > & operator= | ( | const SparseVector< IndexType, IteratorType > & | other | ) |
Definition at line 474 of file lp_data/sparse_vector.h.
|
default |
| void PermutedCopyToDenseVector | ( | const IndexPermutation & | index_perm, |
| Index | num_indices, | ||
| DenseVector * | dense_vector | ||
| ) | const |
Definition at line 810 of file lp_data/sparse_vector.h.
| void PopulateFromDenseVector | ( | const DenseVector & | dense_vector | ) |
Definition at line 619 of file lp_data/sparse_vector.h.
| void PopulateFromSparseVector | ( | const SparseVector< IndexType, IteratorType > & | sparse_vector | ) |
Definition at line 593 of file lp_data/sparse_vector.h.
| void RemoveNearZeroEntries | ( | Fractional | threshold | ) |
Definition at line 710 of file lp_data/sparse_vector.h.
| void RemoveNearZeroEntriesWithWeights | ( | Fractional | threshold, |
| const DenseVector & | weights | ||
| ) |
Definition at line 726 of file lp_data/sparse_vector.h.
| void Reserve | ( | EntryIndex | new_capacity | ) |
Definition at line 496 of file lp_data/sparse_vector.h.
|
inlineprotected |
Definition at line 337 of file lp_data/sparse_vector.h.
| void SetCoefficient | ( | Index | index, |
| Fractional | value | ||
| ) |
Definition at line 686 of file lp_data/sparse_vector.h.
| void Swap | ( | SparseVector< IndexType, IteratorType > * | other | ) |
Definition at line 535 of file lp_data/sparse_vector.h.
|
protected |
Definition at line 380 of file lp_data/sparse_vector.h.
|
protected |
Definition at line 382 of file lp_data/sparse_vector.h.
|
protected |
Definition at line 386 of file lp_data/sparse_vector.h.
|
protected |
Definition at line 385 of file lp_data/sparse_vector.h.
|
mutableprotected |
Definition at line 390 of file lp_data/sparse_vector.h.
|
protected |
Definition at line 381 of file lp_data/sparse_vector.h.