|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
58 template<
typename TCost>
67 edge e_st =
nullptr)
override {
68 return call(graph,
nullptr, s, t, edgeList, e_st);
76 return call(graph, &weight, s, t, edgeList, e_st);
91 template<
typename TCost>
94 bool weighted = (weight !=
nullptr);
101 std::function<
edge(
edge)> orig = [&](
edge e) ->
edge {
return m_gc->original(e); };
104 m_weightedGc.
init(graph);
105 if (e_st !=
nullptr) {
106 e_st = m_weightedGc.
copy(e_st);
108 s = m_weightedGc.
copy(s);
109 t = m_weightedGc.
copy(t);
112 for (
edge e : edges) {
113 mapE[m_weightedGc.
copy(e)] = e;
114 if (m_weightedGc.
copy(e) == e_st) {
119 for (; i < (*weight)[e]; i++) {
120 edge copyEdge = m_weightedGc.
copy(e);
132 m_gc->init(m_weightedGc);
133 orig = [&](
edge e) ->
edge {
return mapE[m_gc->original(e)]; };
142 if (e_st !=
nullptr) {
143 e_st = m_gc->copy(e_st);
145 e_st = m_gc->searchEdge(m_gc->copy(s), m_gc->copy(t));
166 bool dir = (eCand->
source() == prev[eCand]);
170 if (spPred[v] ==
nullptr) {
173 direction[eCand] = dir;
183 edge eDual = spPred[v];
191 }
while (v != source);
199 if (prev[adj->
theEdge()] ==
nullptr) {
207 auto prevIt = edgeList.begin();
208 for (
auto it = prevIt.succ(); it != edgeList.end(); prevIt = it++) {
209 if (*prevIt == *it) {
210 edgeList.
del(prevIt);
The namespace for all OGDF objects.
Includes declaration of graph class.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
A dual graph including its combinatorial embedding of an embedded graph.
bool preprocessingDual(const Graph &graph, GraphCopy &gc, CombinatorialEmbedding &CE, node source, node target, edge e_st)
This method preprocesses gc for minstcut calculations, by adding an st-edge if needed and embedding g...
face leftFace(adjEntry adj) const
Returns the face to the left of adj, i.e., the face containing the twin of adj.
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
Min-st-cut algorithm, that calculates the cut by doing a depth first search over the dual graph of of...
Copies of graphs supporting edge splitting.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
void allEdges(CONTAINER &edgeContainer) const
Returns a container with all edges of the graph.
edge newEdge(edge eOrig)
Creates a new edge (v,w) with original edge eOrig.
Class for adjacency list elements.
EdgeElement * edge
The type of edges.
void init(const Graph &G)
Re-initializes the copy using G, creating copies for all nodes and edges in G.
edge theEdge() const
Returns the edge associated with this adjacency entry.
iterator append(const E &x)
Adds x at the end of queue.
void move(edge e, adjEntry adjSrc, Direction dirSrc, adjEntry adjTgt, Direction dirTgt)
Moves edge e to a different adjacency list.
Decralation of GraphElement and GraphList classes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
virtual bool call(const Graph &graph, node s, node t, List< edge > &edgeList, edge e_st=nullptr) override
The actual algorithm call.
Includes declaration of dual graph class.
node source() const
Returns the source node of the edge.
Declaration of graph copy classes.
RegisteredArray for nodes, edges and adjEntries of a graph.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
Data type for general directed graphs (adjacency list representation).
virtual bool call(const Graph &graph, const EdgeArray< TCost > &weight, node s, node t, List< edge > &edgeList, edge e_st=nullptr) override
The actual algorithm call.
edge copy(edge e) const override
Returns the first edge in the list of edges corresponding to edge e.
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
Implementation of list-based queues.
void del(iterator it)
Removes it from the list.
Basic declarations, included by all source files.
Declaration of CombinatorialEmbedding and face.
const edge & primalEdge(edge e) const
Returns the edge in the primal graph corresponding to e.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
Declaration of doubly linked lists and iterators.
node target() const
Returns the target node of the edge.
E pop()
Removes front element and returns it.
const node & dualNode(face f) const
Returns the node in the dual graph corresponding to f.
Template of base class of min-st-cut algorithms.
Class for the representation of nodes.
iterator pushBack(const E &x)
Adds element x at the end of the list.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
void clear()
Removes all elements from the list.