![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Somewhat equivalent to ValueFilterView<StrongIntRange, EnableVectorT> Looping over this view is equivalent to:
auto c_it = container.begin(); auto active_it = is_active.begin(); for (; active_it != is_active.end(); ++active_it, ++c_it) { if (*active_it) { your_code(*c_it); } }
#include <views.h>
Classes | |
| struct | IndexFilterViewIterator |
Public Types | |
| using | value_type = const ValueT |
| using | value_iterator = typename absl::Span<value_type>::iterator |
| using | enable_iterator = util::range_const_iterator_type<EnableVectorT> |
Public Member Functions | |
| template<typename ValueRangeT> | |
| IndexFilterView (const ValueRangeT *values, const EnableVectorT *is_active_) | |
| IndexFilterViewIterator | begin () const |
| IndexFilterViewIterator | end () const |
| absl::Span< value_type > | base () const |
| template<typename IndexT> | |
| decltype(auto) | operator[] (IndexT index) const |
| using util_intops::IndexFilterView< ValueT, EnableVectorT >::enable_iterator = util::range_const_iterator_type<EnableVectorT> |
| using util_intops::IndexFilterView< ValueT, EnableVectorT >::value_iterator = typename absl::Span<value_type>::iterator |
| using util_intops::IndexFilterView< ValueT, EnableVectorT >::value_type = const ValueT |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |