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

#include <views.h>

Inheritance diagram for util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >:

Classes

struct  TwoLevelsViewIterator

Public Types

using level1_iterator = util::range_const_iterator_type<Lvl1ViewT>
using level1_value = util::range_value_type<Lvl1ViewT>
using level2_value = util::range_value_type<level1_value>
using level2_type = ValueFilterView<level2_value, EnableVectorT>

Public Member Functions

 TwoLevelsView ()=default
 TwoLevelsView (Lvl1ViewT lvl1_view, const EnableVectorT *active_items)
TwoLevelsViewIterator begin () const
TwoLevelsViewIterator end () const
template<typename indexT>
level2_type operator[] (indexT i) const

Detailed Description

template<typename Lvl1ViewT, typename EnableVectorT>
class util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >

This view provides a mechanism to access and filter elements in a 2D container. The filtering is applied in two stages:

  1. The first dimension is generic and can be both and index-list or bool-vector based view.
  2. The second dimension (items of each sub-container) is further filtered using a boolean-vector-like object, which determines which elements within the sub-container are included in the view.

Definition at line 359 of file views.h.

Member Typedef Documentation

◆ level1_iterator

template<typename Lvl1ViewT, typename EnableVectorT>
using util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::level1_iterator = util::range_const_iterator_type<Lvl1ViewT>

Definition at line 361 of file views.h.

◆ level1_value

template<typename Lvl1ViewT, typename EnableVectorT>
using util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::level1_value = util::range_value_type<Lvl1ViewT>

Definition at line 362 of file views.h.

◆ level2_type

template<typename Lvl1ViewT, typename EnableVectorT>
using util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::level2_type = ValueFilterView<level2_value, EnableVectorT>

Definition at line 364 of file views.h.

◆ level2_value

template<typename Lvl1ViewT, typename EnableVectorT>
using util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::level2_value = util::range_value_type<level1_value>

Definition at line 363 of file views.h.

Constructor & Destructor Documentation

◆ TwoLevelsView() [1/2]

template<typename Lvl1ViewT, typename EnableVectorT>
util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::TwoLevelsView ( )
default

◆ TwoLevelsView() [2/2]

template<typename Lvl1ViewT, typename EnableVectorT>
util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::TwoLevelsView ( Lvl1ViewT lvl1_view,
const EnableVectorT * active_items )
inline

Definition at line 390 of file views.h.

Member Function Documentation

◆ begin()

template<typename Lvl1ViewT, typename EnableVectorT>
TwoLevelsViewIterator util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::begin ( ) const
inline

Definition at line 392 of file views.h.

◆ end()

template<typename Lvl1ViewT, typename EnableVectorT>
TwoLevelsViewIterator util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::end ( ) const
inline

Definition at line 395 of file views.h.

◆ operator[]()

template<typename Lvl1ViewT, typename EnableVectorT>
template<typename indexT>
level2_type util_intops::TwoLevelsView< Lvl1ViewT, EnableVectorT >::operator[] ( indexT i) const
inline

Definition at line 400 of file views.h.


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