Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <sparse_vector.h>
Public Types | |
using | Index = IndexType |
Public Member Functions | |
Index | index () const |
Fractional | coefficient () const |
Protected Member Functions | |
SparseVectorEntry (const Index *indices, const Fractional *coefficients, EntryIndex i) | |
Protected Attributes | |
EntryIndex | i_ |
The index of the sparse vector entry represented by this object. | |
const Index * | index_ |
const Fractional * | coefficient_ |
SparseVectorEntry A reference-like class that points to a certain element of a sparse data structure that stores its elements in two parallel arrays. The main purpose of the entry class is to support implementation of iterator objects over the sparse data structure.
Definition at line 417 of file sparse_vector.h.
using operations_research::glop::SparseVectorEntry< IndexType >::Index = IndexType |
Definition at line 419 of file sparse_vector.h.
|
inlineprotected |
Creates the sparse vector entry from the given base pointers and the index. We accept the low-level data structures rather than a SparseVector reference to make it possible to use the SparseVectorEntry and SparseVectorIterator classes also for other data structures using the same internal data representation.
Definition at line 433 of file sparse_vector.h.
|
inline |
Definition at line 422 of file sparse_vector.h.
|
inline |
Definition at line 421 of file sparse_vector.h.
|
protected |
Definition at line 448 of file sparse_vector.h.
|
protected |
The index of the sparse vector entry represented by this object.
Definition at line 438 of file sparse_vector.h.
|
protected |
The index and coefficient arrays of the sparse vector. NOTE(user): Keeping directly the index and the base pointers gives the best performance with a tiny margin of the options:
Definition at line 447 of file sparse_vector.h.