A data structure to store full components. More...
#include <ogdf/graphalg/steiner_tree/FullComponentStore.h>
Classes | |
struct | Metadata |
struct | Metadata< Y, typename std::enable_if<!std::is_void< Y >::value >::type > |
Public Member Functions | |
FullComponentStore (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal) | |
T | cost (int i) const |
Returns the sum of edge costs of this full component. More... | |
template<typename Fun > | |
void | foreachAdjEntry (int i, Fun f) const |
template<typename Fun > | |
void | foreachEdge (int id, const NodeArray< NodeArray< edge >> &pred, Fun f) const |
template<typename Fun > | |
void | foreachNode (int id, const NodeArray< NodeArray< edge >> &pred, Fun f) const |
template<typename Fun > | |
void | foreachNode (int id, Fun f) const |
const EdgeWeightedGraph< T > & | graph () const |
void | insert (const EdgeWeightedGraphCopy< T > &comp) |
Inserts a component. Note that comp is copied and degree-2 nodes are removed. More... | |
bool | isEmpty () const |
Checks if the store does not contain any full components. More... | |
bool | isTerminal (int id, node t) const |
checks if a given node t is a terminal in the full component with given id More... | |
bool | isTerminal (node v) const |
node | original (node v) const |
void | remove (int id) |
Removes a component by its id . More... | |
int | size () const |
Returns the number of full components in the store. More... | |
adjEntry | start (int i) const |
const Array< node > & | terminals (int id) const |
Returns the list of terminals in the full component with given id. More... | |
Protected Member Functions | |
void | copyEdges (Metadata< ExtraDataType > &data, const EdgeWeightedGraphCopy< T > &comp) |
Copy edges from comp into our representation. More... | |
void | copyEdgesWithSimplifiedPaths (Metadata< ExtraDataType > &data, const EdgeWeightedGraphCopy< T > &comp, const ArrayBuffer< node > &nonterminals) |
Copy edges from comp into our representation, traversing variant to ignore degree-2 nodes. More... | |
void | traverseOverDegree2Nonterminals (node &uO, T &weight, EdgeArray< bool > &marked, adjEntry adj, const EdgeWeightedGraphCopy< T > &comp) const |
Traverse over degree-2 nonterminals. More... | |
Protected Attributes | |
ArrayBuffer< Metadata< ExtraDataType > > | m_components |
List of full components (based on metadata) More... | |
EdgeWeightedGraph< T > | m_graph |
Our graph representation for the full component store. More... | |
const NodeArray< bool > & | m_isTerminal |
Incidence vector for terminal nodes. More... | |
NodeArray< node > | m_nodeCopy |
Mapping of original terminals to m_graph nodes. More... | |
NodeArray< node > | m_nodeOrig |
Mapping of m_graph nodes to original nodes. More... | |
const EdgeWeightedGraph< T > & | m_originalGraph |
The original Steiner instance. More... | |
const List< node > & | m_terminals |
The terminal list of the original Steiner instance. More... | |
A data structure to store full components.
Definition at line 55 of file FullComponentStore.h.
|
inline |
Definition at line 147 of file FullComponentStore.h.
|
inlineprotected |
Copy edges from comp
into our representation.
Definition at line 131 of file FullComponentStore.h.
|
inlineprotected |
Copy edges from comp
into our representation, traversing variant to ignore degree-2 nodes.
Definition at line 100 of file FullComponentStore.h.
|
inline |
Returns the sum of edge costs of this full component.
Definition at line 270 of file FullComponentStore.h.
|
inline |
Definition at line 290 of file FullComponentStore.h.
|
inline |
Definition at line 320 of file FullComponentStore.h.
|
inline |
Definition at line 331 of file FullComponentStore.h.
|
inline |
Definition at line 313 of file FullComponentStore.h.
|
inline |
Definition at line 282 of file FullComponentStore.h.
|
inline |
Inserts a component. Note that comp
is copied and degree-2 nodes are removed.
Definition at line 162 of file FullComponentStore.h.
|
inline |
Checks if the store does not contain any full components.
Definition at line 251 of file FullComponentStore.h.
|
inline |
checks if a given node t is a terminal in the full component with given id
Definition at line 261 of file FullComponentStore.h.
|
inline |
Definition at line 267 of file FullComponentStore.h.
|
inline |
Definition at line 284 of file FullComponentStore.h.
|
inline |
Removes a component by its id
.
Definition at line 220 of file FullComponentStore.h.
|
inline |
Returns the number of full components in the store.
Definition at line 248 of file FullComponentStore.h.
|
inline |
Definition at line 276 of file FullComponentStore.h.
|
inline |
Returns the list of terminals in the full component with given id.
Definition at line 254 of file FullComponentStore.h.
|
inlineprotected |
Traverse over degree-2 nonterminals.
Definition at line 86 of file FullComponentStore.h.
|
protected |
List of full components (based on metadata)
Definition at line 83 of file FullComponentStore.h.
|
protected |
Our graph representation for the full component store.
Definition at line 60 of file FullComponentStore.h.
|
protected |
Incidence vector for terminal nodes.
Definition at line 59 of file FullComponentStore.h.
|
protected |
Mapping of original terminals to m_graph nodes.
Definition at line 61 of file FullComponentStore.h.
|
protected |
Mapping of m_graph nodes to original nodes.
Definition at line 62 of file FullComponentStore.h.
|
protected |
The original Steiner instance.
Definition at line 57 of file FullComponentStore.h.
|
protected |
The terminal list of the original Steiner instance.
Definition at line 58 of file FullComponentStore.h.