Rosetta 3.4
Public Member Functions
core::graph::EdgeList Class Reference

Custom edge list class. Returns const-iterators which only return Edge const *'s and non-const-iterators which can return either const or non-const Edge*'s. Manages its own memory using an unordered-object-pool for fast insertion and deletion of EdgeListElements. Implemented as a doubly linked list, though there's no practical way to start at the end of a list and work backward since decrementing the end iterator is not a valid operation. More...

#include <Graph.hh>

Collaboration diagram for core::graph::EdgeList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EdgeList (boost::unordered_object_pool< EdgeListElement > &edge_list_element_pool)
 ~EdgeList ()
void push_back (Edge *edgeptr)
 create a new edge-list element and insert it at the front of the list
void push_front (Edge *edgeptr)
 create a new edge-list element and insert it at the end of the list
EdgeListIterator insert (EdgeListIterator const &element_to_insert_before, Edge *edgeptr)
 insert a new edge-list element in the list infront of the input iterator and return an iterator to the position of the new element
EdgeListIterator begin ()
 returns a non-const iterator to the front of the list
EdgeListConstIterator begin () const
 returns a const iterator to the front of the list
EdgeListConstIterator const_begin () const
 returns a const iterator to the front of the list
EdgeListIterator last ()
 returns a non-const iterator to the last element in the list
EdgeListConstIterator last () const
 returns a const iterator to the last element in the list
EdgeListConstIterator const_last () const
 returns a const iterator to the last element in the list
EdgeListIterator end ()
 returns a non-const iterator to the end of the list
EdgeListConstIterator end () const
 returns a const iterator to the end of the list
EdgeListConstIterator const_end () const
 returns a const iterator to the end of the list
void erase (EdgeListIterator to_erase)
 removes an element from the list pointed to by the input iterator
bool is_end_element (EdgeListElement const *element) const
 method invoked by the EdgeListIterator class: is an iterator the special end iterator for a list?
platform::Size size () const
 O(N)

Detailed Description

Custom edge list class. Returns const-iterators which only return Edge const *'s and non-const-iterators which can return either const or non-const Edge*'s. Manages its own memory using an unordered-object-pool for fast insertion and deletion of EdgeListElements. Implemented as a doubly linked list, though there's no practical way to start at the end of a list and work backward since decrementing the end iterator is not a valid operation.


Constructor & Destructor Documentation

core::graph::EdgeList::EdgeList ( boost::unordered_object_pool< EdgeListElement > &  edge_list_element_pool)
core::graph::EdgeList::~EdgeList ( )

Member Function Documentation

EdgeListIterator core::graph::EdgeList::begin ( ) [inline]
EdgeListConstIterator core::graph::EdgeList::begin ( ) const [inline]

returns a const iterator to the front of the list

EdgeListConstIterator core::graph::EdgeList::const_begin ( ) const [inline]
EdgeListConstIterator core::graph::EdgeList::const_end ( ) const [inline]
EdgeListConstIterator core::graph::EdgeList::const_last ( ) const [inline]

returns a const iterator to the last element in the list

EdgeListIterator core::graph::EdgeList::end ( ) [inline]
EdgeListConstIterator core::graph::EdgeList::end ( ) const [inline]

returns a const iterator to the end of the list

void core::graph::EdgeList::erase ( EdgeListIterator  to_erase)
EdgeListIterator core::graph::EdgeList::insert ( EdgeListIterator const &  element_to_insert_before,
Edge edgeptr 
)

insert a new edge-list element in the list infront of the input iterator and return an iterator to the position of the new element

References boost::unordered_object_pool< T, UserAllocator >::construct().

Referenced by core::graph::Node::add_edge().

bool core::graph::EdgeList::is_end_element ( EdgeListElement const *  element) const [inline]

method invoked by the EdgeListIterator class: is an iterator the special end iterator for a list?

Referenced by core::graph::EdgeListIterator::valid(), and core::graph::EdgeListConstIterator::valid().

EdgeListConstIterator core::graph::EdgeList::last ( ) const [inline]

returns a const iterator to the last element in the list

EdgeListIterator core::graph::EdgeList::last ( ) [inline]

returns a non-const iterator to the last element in the list

Referenced by core::graph::Graph::add_edge().

void core::graph::EdgeList::push_back ( Edge edgeptr)
void core::graph::EdgeList::push_front ( Edge edgeptr)

create a new edge-list element and insert it at the end of the list

References boost::unordered_object_pool< T, UserAllocator >::construct().

Referenced by core::graph::Graph::add_edge().

platform::Size core::graph::EdgeList::size ( ) const

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines