41class EdgeWeightedGraph;
85 m_vOrig.init(*
this, 0);
86 m_eOrig.init(*
this, 0);
87 m_vCopy.init(*m_pGraph, 0);
88 m_eCopy.init(*m_pGraph);
89 m_eIterator.init(*
this, 0);
99 for (
node v : nodes) {
106 for (
edge e : m_pGraph->edges) {
109 m_eIterator[eCopy[*it]] = m_eCopy[e].pushBack(eCopy[*it]);
113 m_edgeWeight.init(*
this);
116 m_edgeWeight[eCopy[e]] = wGC.
weight(e);
124 m_edgeWeight.init(*
this);
128 m_edgeWeight[copy(f)] = wGC.
weight(e);
155 m_edgeWeight.init(*
this);
156 for (
edge e : edges) {
157 m_edgeWeight[e] = wG.
weight(original(e));
165 m_edgeWeight.init(*
this);
171 m_edgeWeight[e] = weight;
178 m_edgeWeight[e] = weight;
Includes declaration of graph class.
Declaration of graph copy classes.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Class for the representation of edges.
edge newEdge(node u, node v, T weight)
virtual ~EdgeWeightedGraphCopy()
void setOriginalGraph(const Graph *wG) override
Re-initializes the copy using G (which might be null), but does not create any nodes or edges.
const EdgeArray< T > & edgeWeights() const
void initWGC(const EdgeWeightedGraphCopy &wGC, NodeArray< node > &vCopy, EdgeArray< edge > &eCopy)
T weight(const edge e) const
EdgeArray< T > m_edgeWeight
void init(const EdgeWeightedGraph< T > &wG)
void setWeight(const edge e, T v)
EdgeWeightedGraphCopy & operator=(const EdgeWeightedGraphCopy &wGC)
T weight(const edge e) const
void init(const Graph &G)
Re-initializes the copy using G, creating copies for all nodes and edges in G.
const Graph * m_pGraph
The original graph.
const Graph & original() const
Returns a reference to the original graph.
Copies of graphs supporting edge splitting.
void setOriginalGraph(const Graph *G) override
Associates the graph copy with G, but does not create any nodes or edges.
edge copy(edge e) const override
Returns the first edge in the list of edges corresponding to edge e.
EdgeArray< List< edge > > m_eCopy
The corresponding list of edges in the graph copy.
GraphCopy & operator=(const GraphCopy &other)
edge newEdge(edge eOrig)
Creates a new edge (v,w) with original edge eOrig.
Data type for general directed graphs (adjacency list representation).
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Encapsulates a pointer to a list element.
bool valid() const
Returns true iff the iterator points to an element.
Class for the representation of nodes.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
The namespace for all OGDF objects.