Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter > Class Template Reference

#include <iterators.h>

Public Types

using value_type = V
 
using reference = V&
 
using pointer = V*
 
using difference_type = typename BaseIter::difference_type
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 UpdateDataFieldIterator (BaseIter base_iter)
 
reference operator* () const
 
pointer operator-> () const
 
UpdateDataFieldIteratoroperator++ ()
 Prefix.
 
UpdateDataFieldIterator operator++ (int)
 Postfix.
 

Friends

bool operator== (const UpdateDataFieldIterator &lhs, const UpdateDataFieldIterator &rhs)
 
bool operator!= (const UpdateDataFieldIterator &lhs, const UpdateDataFieldIterator &rhs)
 

Detailed Description

template<typename UpdateData, typename V, V UpdateData::* Field, typename BaseIter>
class operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >

An iterator for iterating over a field of the update trackers stored by ModelStorage. Typically create with MakeUpdateDataFieldIterator() below to avoid manually giving all type parameters, or better, with MakeUpdateDataFieldRange().

Sample use: const std::vector<std::pair< UpdateTrackerId, std::unique_ptr<UpdateTrackerData>>>& data = ...; for(LinearConstraintStorage::Diff& diff : MakeUpdateDataFieldRange< &UpdateTrackerData::dirty_linear_constraints>(data)) { ... }

BaseIter must iterate over const std::pair<XXX, std::unique_ptr<UpdateData>>& The returned iterator will be over non-const references to Field as read off the UpdateData values.

Definition at line 43 of file iterators.h.

Member Typedef Documentation

◆ difference_type

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
using operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::difference_type = typename BaseIter::difference_type

Definition at line 48 of file iterators.h.

◆ iterator_category

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
using operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::iterator_category = std::forward_iterator_tag

Definition at line 49 of file iterators.h.

◆ pointer

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
using operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::pointer = V*

Definition at line 47 of file iterators.h.

◆ reference

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
using operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::reference = V&

Definition at line 46 of file iterators.h.

◆ value_type

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
using operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::value_type = V

Definition at line 45 of file iterators.h.

Constructor & Destructor Documentation

◆ UpdateDataFieldIterator()

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::UpdateDataFieldIterator ( BaseIter base_iter)
inlineexplicit

Definition at line 51 of file iterators.h.

Member Function Documentation

◆ operator*()

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
reference operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::operator* ( ) const
inline

Definition at line 54 of file iterators.h.

◆ operator++() [1/2]

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
UpdateDataFieldIterator & operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::operator++ ( )
inline

Prefix.

Definition at line 57 of file iterators.h.

◆ operator++() [2/2]

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
UpdateDataFieldIterator operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::operator++ ( int )
inline

Postfix.

Definition at line 62 of file iterators.h.

◆ operator->()

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
pointer operations_research::math_opt::UpdateDataFieldIterator< UpdateData, V, Field, BaseIter >::operator-> ( ) const
inline

Definition at line 55 of file iterators.h.

Friends And Related Symbol Documentation

◆ operator!=

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
bool operator!= ( const UpdateDataFieldIterator< UpdateData, V, Field, BaseIter > & lhs,
const UpdateDataFieldIterator< UpdateData, V, Field, BaseIter > & rhs )
friend

Definition at line 72 of file iterators.h.

◆ operator==

template<typename UpdateData , typename V , V UpdateData::* Field, typename BaseIter >
bool operator== ( const UpdateDataFieldIterator< UpdateData, V, Field, BaseIter > & lhs,
const UpdateDataFieldIterator< UpdateData, V, Field, BaseIter > & rhs )
friend

Definition at line 68 of file iterators.h.


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