#include <sparse_column.h>
Class to iterate on the entries of a given column with the same interface as for SparseColumn.
Definition at line 69 of file sparse_column.h.
◆ Entry
Clients should pass Entry by value rather than by reference. This is because SparseColumnEntry is small (2 pointers and an index) and previous profiling of this type of use showed no performance penalty (see cl/51057736). Example: for(const Entry e : column_view)
Definition at line 76 of file sparse_column.h.
◆ Iterator
◆ ColumnView() [1/2]
operations_research::glop::ColumnView::ColumnView |
( |
EntryIndex | num_entries, |
|
|
const RowIndex * | rows, |
|
|
const Fractional *const | coefficients ) |
|
inline |
◆ ColumnView() [2/2]
operations_research::glop::ColumnView::ColumnView |
( |
const SparseColumn & | column | ) |
|
|
inlineexplicit |
◆ begin()
Iterator operations_research::glop::ColumnView::begin |
( |
| ) |
const |
|
inline |
◆ end()
Iterator operations_research::glop::ColumnView::end |
( |
| ) |
const |
|
inline |
◆ EntryCoefficient()
Fractional operations_research::glop::ColumnView::EntryCoefficient |
( |
EntryIndex | i | ) |
const |
|
inline |
◆ EntryRow()
RowIndex operations_research::glop::ColumnView::EntryRow |
( |
EntryIndex | i | ) |
const |
|
inline |
◆ GetFirstCoefficient()
Fractional operations_research::glop::ColumnView::GetFirstCoefficient |
( |
| ) |
const |
|
inline |
◆ GetFirstRow()
RowIndex operations_research::glop::ColumnView::GetFirstRow |
( |
| ) |
const |
|
inline |
◆ IsEmpty()
bool operations_research::glop::ColumnView::IsEmpty |
( |
| ) |
const |
|
inline |
◆ LookUpCoefficient()
Fractional operations_research::glop::ColumnView::LookUpCoefficient |
( |
RowIndex | index | ) |
const |
|
inline |
Keep in mind the vector may contains several entries with the same index. In such a case the last one is returned.
- Todo
- (user): investigate whether an optimized version of LookUpCoefficient for "clean" columns yields speed-ups.
Definition at line 104 of file sparse_column.h.
◆ num_entries()
EntryIndex operations_research::glop::ColumnView::num_entries |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: