|
Rosetta 3.5
|
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>

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 More... | |
| void | push_front (Edge *edgeptr) |
| create a new edge-list element and insert it at the end of the list More... | |
| 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 More... | |
| EdgeListIterator | begin () |
| returns a non-const iterator to the front of the list More... | |
| EdgeListConstIterator | begin () const |
| returns a const iterator to the front of the list More... | |
| EdgeListConstIterator | const_begin () const |
| returns a const iterator to the front of the list More... | |
| EdgeListIterator | last () |
| returns a non-const iterator to the last element in the list More... | |
| EdgeListConstIterator | last () const |
| returns a const iterator to the last element in the list More... | |
| EdgeListConstIterator | const_last () const |
| returns a const iterator to the last element in the list More... | |
| EdgeListIterator | end () |
| returns a non-const iterator to the end of the list More... | |
| EdgeListConstIterator | end () const |
| returns a const iterator to the end of the list More... | |
| EdgeListConstIterator | const_end () const |
| returns a const iterator to the end of the list More... | |
| void | erase (EdgeListIterator to_erase) |
| removes an element from the list pointed to by the input iterator More... | |
| bool | is_end_element (EdgeListElement const *element) const |
| method invoked by the EdgeListIterator class: is an iterator the special end iterator for a list? More... | |
| platform::Size | size () const |
| O(N) More... | |
Private Member Functions | |
| EdgeList (EdgeList const &) | |
| Uncopyable – private and unimplemented copy ctor. More... | |
| EdgeList const & | operator= (EdgeList const &) |
| Uncopyable – private and unimplemented assignment operator. More... | |
Private Attributes | |
| boost::unordered_object_pool < EdgeListElement > & | edge_list_element_pool_ |
| this edge-list-element-pool reference is handed to the list to draw from. This pool must outlive the edge-list itself. To guarantee this, for the case of class Graph, the graph deletes its nodes (and their edge lists) before it deletes itself. More... | |
| EdgeListElement * | end_ |
| The special "end" position in the list. More... | |
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.
| core::graph::EdgeList::EdgeList | ( | boost::unordered_object_pool< EdgeListElement > & | edge_list_element_pool) |
Definition at line 82 of file Graph.cc.
References end_, core::graph::EdgeListElement::next_, and core::graph::EdgeListElement::previous_.
| core::graph::EdgeList::~EdgeList | ( | ) |
|
private |
Uncopyable – private and unimplemented copy ctor.
|
inline |
returns a non-const iterator to the front of the list
Definition at line 351 of file Graph.hh.
References end_, and core::graph::EdgeListElement::next_.
Referenced by core::graph::Node::add_edge(), core::graph::Graph::add_edge(), protocols::forge::methods::add_vertex(), core::graph::Graph::all_pairs_shortest_paths(), core::graph::Graph::delete_everything(), core::graph::Node::drop_all_edges(), core::graph::Graph::drop_all_edges(), core::graph::Node::edge_list_begin(), core::graph::Graph::edge_list_begin(), core::graph::Node::find_edge(), core::graph::Node::lower_edge_list_begin(), core::graph::Graph::output_connectivity(), core::graph::Graph::output_dimacs(), protocols::forge::methods::shift_jumps(), size(), and ~EdgeList().
|
inline |
returns a const iterator to the front of the list
Definition at line 354 of file Graph.hh.
References end_, and core::graph::EdgeListElement::next_.
|
inline |
returns a const iterator to the front of the list
Definition at line 357 of file Graph.hh.
References end_, and core::graph::EdgeListElement::next_.
Referenced by core::graph::Node::const_edge_list_begin(), core::graph::Graph::const_edge_list_begin(), core::graph::Node::const_lower_edge_list_begin(), core::graph::Graph::getTotalMemoryUsage(), and core::graph::Node::print().
|
inline |
returns a const iterator to the end of the list
Definition at line 375 of file Graph.hh.
References end_.
Referenced by core::graph::Node::const_edge_list_end(), core::graph::Graph::const_edge_list_end(), core::graph::Node::const_upper_edge_list_end(), core::graph::Graph::getTotalMemoryUsage(), and core::graph::Node::print().
|
inline |
returns a const iterator to the last element in the list
Definition at line 366 of file Graph.hh.
References end_, and core::graph::EdgeListElement::previous_.
|
inline |
returns a non-const iterator to the end of the list
Definition at line 369 of file Graph.hh.
References end_.
Referenced by core::graph::Node::add_edge(), protocols::forge::methods::add_vertex(), core::graph::Graph::all_pairs_shortest_paths(), core::graph::Graph::delete_everything(), core::graph::Node::drop_all_edges(), core::graph::Graph::drop_all_edges(), core::graph::Node::edge_list_end(), core::graph::Graph::edge_list_end(), core::graph::Node::find_edge(), core::graph::Graph::output_connectivity(), core::graph::Graph::output_dimacs(), protocols::forge::methods::shift_jumps(), size(), core::graph::Node::upper_edge_list_end(), and ~EdgeList().
|
inline |
| void core::graph::EdgeList::erase | ( | EdgeListIterator | to_erase) |
removes an element from the list pointed to by the input iterator
Definition at line 155 of file Graph.cc.
References edge_list_element_pool_, core::graph::EdgeListIterator::element_, core::graph::EdgeListElement::next_, core::graph::EdgeListIterator::owner_, and core::graph::EdgeListElement::previous_.
Referenced by protocols::forge::methods::add_vertex(), core::graph::Node::drop_edge(), and core::graph::Graph::drop_edge().
| 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
Definition at line 136 of file Graph.cc.
References edge_list_element_pool_, core::graph::EdgeListIterator::element_, core::graph::EdgeListElement::next_, core::graph::EdgeListIterator::owner_, and core::graph::EdgeListElement::previous_.
Referenced by core::graph::Node::add_edge().
|
inline |
method invoked by the EdgeListIterator class: is an iterator the special end iterator for a list?
Definition at line 382 of file Graph.hh.
References end_.
Referenced by core::graph::EdgeListIterator::valid(), and core::graph::EdgeListConstIterator::valid().
|
inline |
returns a non-const iterator to the last element in the list
Definition at line 360 of file Graph.hh.
References end_, and core::graph::EdgeListElement::previous_.
Referenced by core::graph::Graph::add_edge().
|
inline |
returns a const iterator to the last element in the list
Definition at line 363 of file Graph.hh.
References end_, and core::graph::EdgeListElement::previous_.
Uncopyable – private and unimplemented assignment operator.
| void core::graph::EdgeList::push_back | ( | Edge * | edgeptr) |
create a new edge-list element and insert it at the front of the list
Definition at line 110 of file Graph.cc.
References edge_list_element_pool_, end_, core::graph::EdgeListElement::next_, and core::graph::EdgeListElement::previous_.
Referenced by core::graph::Graph::add_edge(), protocols::forge::methods::add_vertex(), and protocols::forge::methods::shift_jumps().
| void core::graph::EdgeList::push_front | ( | Edge * | edgeptr) |
create a new edge-list element and insert it at the end of the list
Definition at line 122 of file Graph.cc.
References edge_list_element_pool_, end_, core::graph::EdgeListElement::next_, and core::graph::EdgeListElement::previous_.
Referenced by core::graph::Graph::add_edge().
| platform::Size core::graph::EdgeList::size | ( | ) | const |
O(N)
Definition at line 176 of file Graph.cc.
References begin(), and end().
Referenced by core::graph::Graph::output_dimacs().
|
private |
this edge-list-element-pool reference is handed to the list to draw from. This pool must outlive the edge-list itself. To guarantee this, for the case of class Graph, the graph deletes its nodes (and their edge lists) before it deletes itself.
Definition at line 398 of file Graph.hh.
Referenced by erase(), insert(), push_back(), push_front(), and ~EdgeList().
|
private |
The special "end" position in the list.
Definition at line 401 of file Graph.hh.
Referenced by begin(), const_begin(), const_end(), const_last(), EdgeList(), end(), is_end_element(), last(), push_back(), push_front(), and ~EdgeList().
1.8.4