Construct version 5.4.4
An agent based modeling framework
graph_utils::col_graph_iterator< link_type > Struct Template Reference

An iterator parent for iterators that increment through a column. More...

Inheritance diagram for graph_utils::col_graph_iterator< link_type >:
Collaboration diagram for graph_utils::col_graph_iterator< link_type >:

Public Member Functions

unsigned int index () const noexcept
 Returns the row index of the iterator. More...
 
unsigned int max () const noexcept
 Returns the source dimension size. More...
 
const link_type & operator* (void) const
 If the entry exists, a reference to the value of the element being pointed to is returned, otherwise the default value is returned.
 
const link_type * operator-> (void) const
 If the entry exists, a pointer to the value of the element being pointed to is returned, otherwise a pointer to the default value is returned.
 
const link_type & examine (void) const
 Returns the value of the link the iterator is pointing to. More...
 
- Public Member Functions inherited from graph_utils::graph_iterator< link_type >
 graph_iterator (unsigned int row, unsigned int col, const Graph< link_type > *parent, void *ptr)
 
virtual const link_type & examine (void) const =0
 Returns the value of the link the iterator is pointing to. More...
 
- Public Member Functions inherited from typeless_graph_iterator
 typeless_graph_iterator (unsigned int row=0, unsigned int col=0, void *ptr=NULL)
 
unsigned int row (void) const noexcept
 The row index this iterator is pointing to.
 
unsigned int col (void) const noexcept
 The column index this iterator is pointing to.
 
virtual unsigned int index () const noexcept
 Depending on implementation, returns either row or col. More...
 
virtual unsigned int max () const noexcept
 Returns the maximum value that Construct can return. More...
 
virtual const typeless_graph_iteratoroperator++ (void) const
 Depending on implementation, increments the iterator to point to the next relevant element. More...
 

Additional Inherited Members

- Public Attributes inherited from graph_utils::graph_iterator< link_type >
Graph< link_type > * _parent = NULL
 
- Public Attributes inherited from typeless_graph_iterator
void * _ptr
 
unsigned int _row
 
unsigned int _col
 

Detailed Description

template<typename link_type>
struct graph_utils::col_graph_iterator< link_type >

An iterator parent for iterators that increment through a column.

All iterators that inheriet from this class access data in a similar way and return the same indexes. Not all iterators that inheriet from this class increment the same.

Member Function Documentation

◆ examine()

template<typename link_type >
const link_type & graph_utils::col_graph_iterator< link_type >::examine ( void  ) const
inlinevirtual

Returns the value of the link the iterator is pointing to.

Implements graph_utils::graph_iterator< link_type >.

Here is the call graph for this function:

◆ index()

template<typename link_type >
unsigned int graph_utils::col_graph_iterator< link_type >::index ( void  ) const
virtualnoexcept

Returns the row index of the iterator.

Reimplemented from typeless_graph_iterator.

Here is the caller graph for this function:

◆ max()

template<typename link_type >
unsigned int graph_utils::col_graph_iterator< link_type >::max ( void  ) const
virtualnoexcept

Returns the source dimension size.

Reimplemented from typeless_graph_iterator.