Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property > Class Template Reference

#include <graph.h>

Inheritance diagram for util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >:

Public Types

using value_type = PropertyT
using difference_type = std::ptrdiff_t

Public Member Functions

 ArcPropertyIterator ()=default
 ArcPropertyIterator (const Graph &graph, ArcIterator arc_it)
value_type operator* () const
ArcPropertyIteratoroperator++ ()
ArcPropertyIterator operator++ (int)

Friends

bool operator== (const ArcPropertyIterator &l, const ArcPropertyIterator &r)
bool operator!= (const ArcPropertyIterator &l, const ArcPropertyIterator &r)

Detailed Description

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
class util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >

An iterator that wraps an arc iterator and retrieves a property of the arc. The property to retrieve is specified by a Graph member function taking an ArcIndex parameter. For example, ArcHeadIterator retrieves the head of an arc with &Graph::Head.

Definition at line 317 of file graph.h.

Member Typedef Documentation

◆ difference_type

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
using util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::difference_type = std::ptrdiff_t
Todo
(b/385094969): This should be NodeIndex for integers, NodeIndex::value_type for strong signed integer types.

Definition at line 326 of file graph.h.

◆ value_type

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
using util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::value_type = PropertyT

Definition at line 323 of file graph.h.

Constructor & Destructor Documentation

◆ ArcPropertyIterator() [1/2]

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::ArcPropertyIterator ( )
default

◆ ArcPropertyIterator() [2/2]

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::ArcPropertyIterator ( const Graph & graph,
ArcIterator arc_it )
inline

Definition at line 330 of file graph.h.

Member Function Documentation

◆ operator*()

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
value_type util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::operator* ( ) const
inline

Definition at line 333 of file graph.h.

◆ operator++() [1/2]

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
ArcPropertyIterator & util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::operator++ ( )
inline

Definition at line 335 of file graph.h.

◆ operator++() [2/2]

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
ArcPropertyIterator util::ArcPropertyIterator< Graph, ArcIterator, PropertyT, property >::operator++ ( int )
inline

Definition at line 339 of file graph.h.

◆ operator!=

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
bool operator!= ( const ArcPropertyIterator< Graph, ArcIterator, PropertyT, property > & l,
const ArcPropertyIterator< Graph, ArcIterator, PropertyT, property > & r )
friend

Definition at line 349 of file graph.h.

◆ operator==

template<typename Graph, typename ArcIterator, typename PropertyT, PropertyT(Graph::*)(typename Graph::ArcIndex) const property>
bool operator== ( const ArcPropertyIterator< Graph, ArcIterator, PropertyT, property > & l,
const ArcPropertyIterator< Graph, ArcIterator, PropertyT, property > & r )
friend

Definition at line 345 of file graph.h.


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