CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
graph< N, E >::const_iterator Class Reference

#include <adjgraph.h>

Classes

struct  value_type
 

Public Types

typedef graph::adj_list adj_list
 
typedef graph::edge_list edge_list
 
typedef graph::index_type index_type
 
typedef value_typepointer
 
typedef value_typereference
 

Public Member Functions

bool operator!= (const const_iterator &i) const
 
const value_typeoperator* () const
 
void operator++ ()
 
const value_typeoperator-> () const
 
bool operator== (const const_iterator &i) const
 

Private Member Functions

 const_iterator (const graph &g)
 
 const_iterator (const graph &g, index_type ait, index_type eit)
 
bool operator< (const const_iterator &i) const
 
bool operator> (const const_iterator &i) const
 

Private Attributes

value_type vt_
 

Friends

class graph< N, E >
 

Detailed Description

template<class N, class E>
class graph< N, E >::const_iterator

Definition at line 23 of file adjgraph.h.

Member Typedef Documentation

template<class N, class E>
typedef graph::adj_list graph< N, E >::const_iterator::adj_list

Definition at line 28 of file adjgraph.h.

template<class N, class E>
typedef graph::edge_list graph< N, E >::const_iterator::edge_list

Definition at line 29 of file adjgraph.h.

template<class N, class E>
typedef graph::index_type graph< N, E >::const_iterator::index_type

Definition at line 27 of file adjgraph.h.

template<class N, class E>
typedef value_type* graph< N, E >::const_iterator::pointer

Definition at line 48 of file adjgraph.h.

template<class N, class E>
typedef value_type& graph< N, E >::const_iterator::reference

Definition at line 47 of file adjgraph.h.

Constructor & Destructor Documentation

template<class N, class E>
graph< N, E >::const_iterator::const_iterator ( const graph g)
inlineexplicitprivate

Definition at line 89 of file adjgraph.h.

Referenced by graph< Node2, AnotherDummy2 >::begin_iter(), and graph< Node2, AnotherDummy2 >::end_iter().

90  : vt_( g, 0, 0 )
91  {}
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
graph< N, E >::const_iterator::const_iterator ( const graph g,
index_type  ait,
index_type  eit 
)
inlineprivate

Definition at line 93 of file adjgraph.h.

94  : vt_( g, ait, eit )
95  {}
value_type vt_
Definition: adjgraph.h:97

Member Function Documentation

template<class N, class E>
bool graph< N, E >::const_iterator::operator!= ( const const_iterator i) const
inline

Definition at line 54 of file adjgraph.h.

References graph< N, E >::const_iterator::value_type::a_, graph< N, E >::const_iterator::value_type::e_, and graph< N, E >::const_iterator::vt_.

54  {
55  return (( vt_.a_ == i.vt_.a_ ) && ( vt_.e_ == i.vt_.e_ )) ? false : true;
56  }
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
const value_type& graph< N, E >::const_iterator::operator* ( void  ) const
inline

Definition at line 80 of file adjgraph.h.

References graph< N, E >::const_iterator::vt_.

80  {
81  return vt_;
82  }
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
void graph< N, E >::const_iterator::operator++ ( void  )
inline

Definition at line 58 of file adjgraph.h.

References graph< N, E >::const_iterator::value_type::a_, graph< N, E >::adjl_, graph< N, E >::const_iterator::value_type::e_, graph< N, E >::const_iterator::value_type::gr_, mps_fire::i, graph< N, E >::size(), and graph< N, E >::const_iterator::vt_.

58  {
59  while( vt_.gr_.size() > vt_.a_ )
60  {
61  index_type i = vt_.gr_.adjl_[vt_.a_].size();
62  if( i > vt_.e_+1 )
63  {
64  ++vt_.e_;
65  return;
66  }
67  vt_.e_=0;
68  ++vt_.a_;
69  while( vt_.gr_.size() > vt_.a_ )
70  {
71  if( vt_.gr_.adjl_[vt_.a_].size())
72  {
73  return;
74  }
75  ++vt_.a_;
76  }
77  }
78  }
adj_list::size_type size() const
Definition: adjgraph.h:201
adj_list adjl_
Definition: adjgraph.h:215
value_type vt_
Definition: adjgraph.h:97
graph::index_type index_type
Definition: adjgraph.h:27
template<class N, class E>
const value_type* graph< N, E >::const_iterator::operator-> ( ) const
inline

Definition at line 84 of file adjgraph.h.

References graph< N, E >::const_iterator::vt_.

84  {
85  return &vt_;
86  }
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
bool graph< N, E >::const_iterator::operator< ( const const_iterator i) const
inlineprivate

Definition at line 99 of file adjgraph.h.

References graph< N, E >::const_iterator::value_type::a_, graph< N, E >::const_iterator::value_type::e_, and graph< N, E >::const_iterator::vt_.

99  {
100  return ( vt_.a_ < i.vt_.a_ ) && ( vt_.e_ < i.vt_.e_ );
101  }
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
bool graph< N, E >::const_iterator::operator== ( const const_iterator i) const
inline

Definition at line 50 of file adjgraph.h.

References graph< N, E >::const_iterator::value_type::a_, graph< N, E >::const_iterator::value_type::e_, and graph< N, E >::const_iterator::vt_.

50  {
51  return (( vt_.a_ == i.vt_.a_ ) && ( vt_.e_ == i.vt_.e_ )) ? true : false;
52  }
value_type vt_
Definition: adjgraph.h:97
template<class N, class E>
bool graph< N, E >::const_iterator::operator> ( const const_iterator i) const
inlineprivate

Friends And Related Function Documentation

template<class N, class E>
friend class graph< N, E >
friend

Definition at line 25 of file adjgraph.h.

Member Data Documentation

template<class N, class E>
value_type graph< N, E >::const_iterator::vt_
private