Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util_intops::FilterIndexRangeView< IntT, EnableVectorT > Class Template Reference

#include <views.h>

Classes

struct  FilterIndicesViewIterator

Public Member Functions

 FilterIndexRangeView (const EnableVectorT *is_active)
FilterIndicesViewIterator begin () const
FilterIndicesViewIterator end () const

Detailed Description

template<typename IntT, typename EnableVectorT>
class util_intops::FilterIndexRangeView< IntT, EnableVectorT >

View exposing only the indices of a container that are marked as active. Looping over this view is equivalent to:

for (IntT index; index < IntT<is_active_->size()); ++index) { if (is_active[index]) { your_code(index); } }

Definition at line 83 of file views.h.

Constructor & Destructor Documentation

◆ FilterIndexRangeView()

template<typename IntT, typename EnableVectorT>
util_intops::FilterIndexRangeView< IntT, EnableVectorT >::FilterIndexRangeView ( const EnableVectorT * is_active)
inline

Definition at line 114 of file views.h.

Member Function Documentation

◆ begin()

template<typename IntT, typename EnableVectorT>
FilterIndicesViewIterator util_intops::FilterIndexRangeView< IntT, EnableVectorT >::begin ( ) const
inline

Definition at line 116 of file views.h.

◆ end()

template<typename IntT, typename EnableVectorT>
FilterIndicesViewIterator util_intops::FilterIndexRangeView< IntT, EnableVectorT >::end ( ) const
inline

Definition at line 119 of file views.h.


The documentation for this class was generated from the following file: