![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
View exposing only the elements of a container that are indexed by a list of indices. Looping over this view is equivalent to:
for (decltype(auto) index : indices) { your_code(container[index]); }
#include <views.h>
Classes | |
| struct | IndexListViewIterator |
Public Types | |
| using | value_type = const ValueT |
| using | index_type = const IndexT |
| using | value_iterator = typename absl::Span<value_type>::iterator |
| using | index_iterator = typename absl::Span<index_type>::iterator |
Public Member Functions | |
| IndexListView ()=default | |
| template<typename ValueRangeT, typename IndexRangeT> | |
| IndexListView (const ValueRangeT *values, const IndexRangeT *indices) | |
| auto | size () const |
| bool | empty () const |
| decltype(auto) | operator[] (index_type index) const |
| IndexListViewIterator | begin () const |
| IndexListViewIterator | end () const |
| absl::Span< value_type > | base () const |
| using util_intops::IndexListView< ValueT, IndexT >::index_iterator = typename absl::Span<index_type>::iterator |
| using util_intops::IndexListView< ValueT, IndexT >::index_type = const IndexT |
| using util_intops::IndexListView< ValueT, IndexT >::value_iterator = typename absl::Span<value_type>::iterator |
| using util_intops::IndexListView< ValueT, IndexT >::value_type = const ValueT |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |