![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
This view provides access to elements of a container of integral types, which are used as indices to a filter (in) vector. The view filters and returns only those elements that, when used a subscript to the filter vector, are evaluated to a true value. Looping over this view is equivalent to:
for (decltype(auto) item : container) { if (is_active[item]) { your_code(iter); } }
#include <views.h>
Classes | |
| struct | ValueFilterViewIterator |
Public Types | |
| using | value_type = const ValueT |
| using | value_iterator = typename absl::Span<value_type>::iterator |
Public Member Functions | |
| template<typename ValueRangeT> | |
| ValueFilterView (const ValueRangeT *values, const EnableVectorT *is_active) | |
| ValueFilterViewIterator | begin () const |
| ValueFilterViewIterator | end () const |
| template<typename IndexT> | |
| decltype(auto) | operator[] (IndexT index) const |
| absl::Span< value_type > | base () const |
| using util_intops::ValueFilterView< ValueT, EnableVectorT >::value_iterator = typename absl::Span<value_type>::iterator |
| using util_intops::ValueFilterView< ValueT, EnableVectorT >::value_type = const ValueT |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |