44template<
class E1,
class E2>
67 OGDF_ASSERT(rrOption != RemoveReinsertType::IncInserted);
68 m_rrOption = rrOption;
261 if (forbiddenEdgeOrig ==
nullptr) {
269 if (m_primalNode[e->
source()] !=
nullptr) {
272 if (m_primalNode[e->
target()] !=
nullptr) {
277 if (adj ==
nullptr) {
282 if (eOrig !=
nullptr) {
284 if((*forbiddenEdgeOrig)[eOrig]) {
285 std::cout <<
"forbidden: " << eOrig <<
", dual: " << e << std::endl;
288 return (*forbiddenEdgeOrig)[eOrig];
Declaration of CombinatorialEmbedding and face.
Includes declaration of graph class.
Declaration of interface for minor-monotone edge insertion algorithms.
Declaration of class PlanRepExpansion representing a planarized representation of the expansion of a ...
Definition of RemoveReinsertType (used for postprocessing in edge insertion algorithms).
Basic declarations, included by all source files.
Class for adjacency list elements.
edge theEdge() const
Returns the edge associated with this adjacency entry.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
node target() const
Returns the target node of the edge.
node source() const
Returns the source node of the edge.
RegisteredArray for labeling the faces of a CombinatorialEmbedding.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
Interface for minor-monotone edge insertion algorithms.
Minor-monotone edge insertion with fixed embedding.
EdgeArray< adjEntry > m_primalAdj
The adjacency entry in primal graph corresponding to edge in dual.
AdjEntryArray< edge > m_dualEdge
The dual edge corresponding to crossing the adjacency entry.
double m_percentMostCrossed
The percentMostCrossed option.
void collectAnchorNodes(node v, NodeSet &nodes, const PlanRepExpansion::NodeSplit *nsParent, const PlanRepExpansion &PG) const
Collects all anchor nodes (including dummies) of a node.
void findShortestPath(const PlanRepExpansion &PG, const CombinatorialEmbedding &E, const List< node > &sources, const List< node > &targets, List< Tuple2< adjEntry, adjEntry > > &crossed, const EdgeArray< bool > *forbiddenEdgeOrig)
Finds a shortest insertion path for an edge.
void insertEdge(PlanRepExpansion &PG, CombinatorialEmbedding &E, edge eOrig, node srcOrig, node tgtOrig, PlanRepExpansion::NodeSplit *nodeSplit, List< Tuple2< adjEntry, adjEntry > > &crossed)
Inserts an edge according to a given insertion path and updates the search network.
bool checkDualGraph(PlanRepExpansion &PG, const CombinatorialEmbedding &E) const
Performs several consistency checks on the seach network.
void removeReinsert(RemoveReinsertType rrOption)
Sets the remove-reinsert option for postprocessing.
void preprocessInsertionPath(PlanRepExpansion &PG, CombinatorialEmbedding &E, node srcOrig, node tgtOrig, List< Tuple2< adjEntry, adjEntry > > &crossed)
NodeArray< node > m_dualOfNode
The node in dual corresponding to node in primal.
void contractSplitIfReq(PlanRepExpansion &PG, CombinatorialEmbedding &E, node u, const PlanRepExpansion::nodeSplit nsCurrent=nullptr)
Reduces the insertion path of a node split at node u if required.
void convertDummy(PlanRepExpansion &PG, CombinatorialEmbedding &E, node u, node vOrig, PlanRepExpansion::nodeSplit ns)
Converts a dummy node to a copy of an original node.
void insertDualEdge(node vDual, adjEntry adj, const CombinatorialEmbedding &E)
Inserts dual edges between vertex node vDual and left face of adj.
virtual ReturnType doCall(PlanRepExpansion &PG, const List< edge > &origEdges, const EdgeArray< bool > *forbiddenEdgeOrig) override
Implementation of algorithm call.
void constructDual(const PlanRepExpansion &PG, const CombinatorialEmbedding &E)
Constructs the search network (extended dual graph).
void drawDual(const PlanRepExpansion &PG, const EdgeArray< bool > *forbiddenEdgeOrig)
MMFixedEmbeddingInserter()
Creates a minor-monotone fixed embedding inserter.
FaceArray< node > m_dualOfFace
The node in dual corresponding to face in primal.
void anchorNodes(node vOrig, NodeSet &nodes, const PlanRepExpansion &PG) const
Returns all anchor nodes of vOrig in n nodes.
int m_maxCost
The maximal cost of an edge in the search network + 1.
void removeEdge(PlanRepExpansion &PG, CombinatorialEmbedding &E, edge eOrig, PlanRepExpansion::NodeSplit *nodeSplit, node &oldSrc, node &oldTgt)
Removes the insertion path of an original edge or a node split and updates the search network.
void contractSplit(PlanRepExpansion &PG, CombinatorialEmbedding &E, PlanRepExpansion::NodeSplit *nodeSplit)
Removes a (redundant) node split consisting of a single edge.
void prepareAnchorNode(PlanRepExpansion &PG, CombinatorialEmbedding &E, adjEntry &adjStart, node srcOrig)
RemoveReinsertType m_rrOption
The remove-reinsert option.
void percentMostCrossed(double percent)
Sets the portion of most crossed edges used during postprocessing.
EdgeArray< int > m_dualCost
The cost of an edge in the seach network.
bool checkSplitDeg(PlanRepExpansion &PG) const
double percentMostCrossed() const
Returns the current setting of the option percentMostCrossed.
void insertDualEdges(node v, const CombinatorialEmbedding &E)
Inserts all dual edges incident to v's dual node.
bool origOfDualForbidden(edge e, const PlanRepExpansion &PG, const EdgeArray< bool > *forbiddenEdgeOrig) const
void findSourcesAndTargets(node src, node tgt, NodeSet &sources, NodeSet &targets, const PlanRepExpansion &PG) const
Finds the set of anchor nodes of src and tgt.
node m_vS
Represents the start node for the path search.
NodeArray< node > m_primalNode
The node in PG corresponding to dual node (0 if face).
node m_vT
Represents the end node for the path search.
Graph m_dual
The search network (extended dual graph).
virtual ~MMFixedEmbeddingInserter()
RemoveReinsertType removeReinsert() const
Returns the current setting of the remove-reinsert option.
node commonDummy(NodeSet &sources, NodeSet &targets)
Returns a common dummy node in sources and targets, or 0 of no such node exists.
ReturnType
The return type of a module.
Class for the representation of nodes.
Representation of a node split in a planarized expansion.
Planarized representations (of a connected component) of a graph.
edge originalEdge(edge e) const
Returns the original edge of e, or 0 if e has none (e.g., e belongs to a node split).
Tuples of two elements (2-tuples).
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
RemoveReinsertType
The postprocessing method for edge insertion algorithms.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
The namespace for all OGDF objects.