Minor-monotone edge insertion with variable embedding. More...
#include <ogdf/planarity/MMVariableEmbeddingInserter.h>
Classes | |
struct | AnchorNodeInfo |
struct | Paths |
Public Member Functions | |
MMVariableEmbeddingInserter () | |
Creates a minor-monotone fixed embedding inserter. More... | |
virtual | ~MMVariableEmbeddingInserter () |
double | percentMostCrossed () const |
Returns the current setting of the option percentMostCrossed. More... | |
void | percentMostCrossed (double percent) |
Sets the portion of most crossed edges used during postprocessing. More... | |
RemoveReinsertType | removeReinsert () const |
Returns the current setting of the remove-reinsert option. More... | |
void | removeReinsert (RemoveReinsertType rrOption) |
Sets the remove-reinsert option for postprocessing. More... | |
Public Member Functions inherited from ogdf::MMEdgeInsertionModule | |
MMEdgeInsertionModule () | |
Initializes a minor-monotone edge insertion module. More... | |
virtual | ~MMEdgeInsertionModule () |
ReturnType | call (PlanRepExpansion &PG, const List< edge > &origEdges) |
Inserts all edges in origEdges into PG . More... | |
ReturnType | call (PlanRepExpansion &PG, const List< edge > &origEdges, const EdgeArray< bool > &forbiddenEdgeOrig) |
Inserts all edges in origEdges into PG and forbids crossing forbiddenEdges . More... | |
Public Member Functions inherited from ogdf::Module | |
Module () | |
Initializes a module. More... | |
virtual | ~Module () |
Private Types | |
using | Crossing = PlanRepExpansion::Crossing |
enum | PathType { PathType::pathToEdge = 0, PathType::pathToSource = 1, PathType::pathToTarget = 2 } |
Private Member Functions | |
void | anchorNodes (node vOrig, NodeSet<> &nodes) const |
Returns all anchor nodes of vOrig in nnodes . More... | |
void | blockInsert (Block &BC, List< Crossing > &L, AnchorNodeInfo &srcInfo, AnchorNodeInfo &tgtInfo) |
Computes optimal insertion path in block BC . More... | |
void | buildSubpath (node v, edge eIn, edge eOut, Paths &paths, bool &bPathToEdge, bool &bPathToSrc, bool &bPathToTgt, ExpandedSkeleton &Exp) |
void | collectAnchorNodes (node v, NodeSet<> &nodes, const PlanRepExpansion::NodeSplit *nsParent) const |
Collects all anchor nodes (including dummies) of a node. More... | |
void | contractSplitIfReq (node u) |
void | convertDummy (node u, node vOrig, PlanRepExpansion::nodeSplit ns_0) |
bool | dfsBlock (int i, node parent, node &repS, List< Crossing > &eip, AnchorNodeInfo &vStart, AnchorNodeInfo &vEnd) |
Implements block case of recursive path search in BC-tree. More... | |
bool | dfsVertex (node v, int parent, List< Crossing > &eip, AnchorNodeInfo &vStart, AnchorNodeInfo &vEnd) |
Implements vertex case of recursive path search in BC-tree. More... | |
virtual ReturnType | doCall (PlanRepExpansion &PG, const List< edge > &origEdges, const EdgeArray< bool > *forbiddenEdgeOrig) override |
Implementation of algorithm call. More... | |
void | findPseudos (node vDummy, adjEntry adjSrc, AnchorNodeInfo &infoSrc, SListPure< node > &pseudos) |
void | findSourcesAndTargets (node src, node tgt, NodeSet<> &sources, NodeSet<> &targets) const |
Finds the set of anchor nodes of src and tgt . More... | |
void | insert (List< Crossing > &eip, AnchorNodeInfo &vStart, AnchorNodeInfo &vEnd) |
Computes insertion path eip . More... | |
void | insertWithCommonDummy (edge eOrig, node vDummy, node &src, node &tgt) |
bool | pathSearch (node v, edge parent, const Block &BC, List< edge > &path) |
node | prepareAnchorNode (const AnchorNodeInfo &anchor, node vOrig, bool isSrc, edge &eExtra) |
node | preparePath (node vAnchor, adjEntry adjPath, bool bOrigEdge, node vOrig) |
void | preprocessInsertionPath (const AnchorNodeInfo &srcInfo, const AnchorNodeInfo &tgtInfo, node srcOrig, node tgtOrig, node &src, node &tgt, edge &eSrc, edge &eTgt) |
void | writeEip (const List< Crossing > &eip) |
Static Private Member Functions | |
static node | commonDummy (NodeSet<> &sources, NodeSet<> &targets) |
Private Attributes | |
NodeArray< SList< int > > | m_compV |
The list of blocks containing a node v. More... | |
bool | m_conFinished |
Stores if a possible target node in a block has already been found. More... | |
Array< SList< edge > > | m_edgeB |
The list of edges in block i. More... | |
const EdgeArray< bool > * | m_forbiddenEdgeOrig |
NodeArray< node > | m_GtoBC |
Maps a node in the planarized expansion to the corresponding node in block. More... | |
Array< SList< node > > | m_nodeB |
The list of nodes in block i. More... | |
double | m_percentMostCrossed |
The percentMostCrossed option. More... | |
PlanRepExpansion * | m_pPG |
Pointer to the planarized expansion. More... | |
NodeSet * | m_pSources |
The set of possible start nodes of an insertion path. More... | |
NodeSet * | m_pTargets |
The set of possible end nodes of an insertion path. More... | |
RemoveReinsertType | m_rrOption |
The remove-reinsert option. More... | |
Additional Inherited Members | |
Public Types inherited from ogdf::Module | |
enum | ReturnType { ReturnType::Feasible, ReturnType::Optimal, ReturnType::NoFeasibleSolution, ReturnType::TimeoutFeasible, ReturnType::TimeoutInfeasible, ReturnType::Error } |
The return type of a module. More... | |
Static Public Member Functions inherited from ogdf::Module | |
static bool | isSolution (ReturnType ret) |
Returns true iff ret indicates that the module returned a feasible solution. More... | |
Minor-monotone edge insertion with variable embedding.
Definition at line 50 of file MMVariableEmbeddingInserter.h.
Definition at line 87 of file MMVariableEmbeddingInserter.h.
|
strongprivate |
Enumerator | |
---|---|
pathToEdge | |
pathToSource | |
pathToTarget |
Definition at line 106 of file MMVariableEmbeddingInserter.h.
ogdf::MMVariableEmbeddingInserter::MMVariableEmbeddingInserter | ( | ) |
Creates a minor-monotone fixed embedding inserter.
|
inlinevirtual |
Definition at line 56 of file MMVariableEmbeddingInserter.h.
Returns all anchor nodes of vOrig
in nnodes
.
vOrig | is a node in the original graph. |
nodes | ia assigned the set of anchor nodes. |
|
private |
Computes optimal insertion path in block BC
.
BC | is the block. |
L | is assigned the insertion path (the crossed edges). |
srcInfo | is assigned the start point of the insertion path. |
tgtInfo | is assigned the end point of the insertion path. |
|
private |
|
private |
Collects all anchor nodes (including dummies) of a node.
v | is the current node when traversing all copy nodes of an original node that are connected in a tree-wise manner. |
nodes | is assigned the set of anchor nodes. |
nsParent | is the parent node split. |
|
staticprivate |
|
private |
|
private |
|
private |
Implements block case of recursive path search in BC-tree.
i | is the block in the graph currently visited during BC-tree traversal. |
parent | is the parent node in DFS-traversal. |
repS | is assigned the representative (nodein the graph) of a source node. |
eip | is (step-by-step) assigned the insertion path (crossed edges). |
vStart | is assigned the start point of eip . |
vEnd | is assigned the end point of eip . |
|
private |
Implements vertex case of recursive path search in BC-tree.
v | is the node in the graph currently visited during BC-tree traversal. |
parent | is the parent block in DFS-traversal. |
eip | is (step-by-step) assigned the insertion path (crossed edges). |
vStart | is assigned the start point of eip . |
vEnd | is assigned the end point of eip . |
|
overrideprivatevirtual |
Implementation of algorithm call.
PG | is the input planarized expansion and will also receive the result. |
origEdges | is the list of original edges (edges in the original graph of PG ) that have to be inserted. |
forbiddenEdgeOrig | points to an edge array indicating if an original edge is forbidden to be crossed. |
Implements ogdf::MMEdgeInsertionModule.
|
private |
|
private |
Finds the set of anchor nodes of src
and tgt
.
src | is a node in PG representing an original node. |
tgt | is a node in PG representing an original node. |
sources | ia assigned the set of anchor nodes of src's original node. |
targets | ia assigned the set of anchor nodes of tgt's original node. |
|
private |
Computes insertion path eip
.
The possible start and end nodes of the insertion path have to be stored in m_pSources and m_pTargets.
eip | is assigned the insertion path (the crossed edges). |
vStart | is assigned the start point of the insertion path. |
vEnd | is assigned the end point of the insertion path. |
|
private |
|
private |
|
inline |
Returns the current setting of the option percentMostCrossed.
Definition at line 80 of file MMVariableEmbeddingInserter.h.
|
inline |
Sets the portion of most crossed edges used during postprocessing.
The value is only used if the remove-reinsert option is set to rrMostCrossed. The number of edges used in postprocessing is then number of edges * percentMostCrossed() / 100.
Definition at line 77 of file MMVariableEmbeddingInserter.h.
|
private |
|
private |
|
private |
|
inline |
Returns the current setting of the remove-reinsert option.
Definition at line 69 of file MMVariableEmbeddingInserter.h.
|
inline |
Sets the remove-reinsert option for postprocessing.
Note that RemoveReinsertType::IncInserted is not implemented.
Definition at line 63 of file MMVariableEmbeddingInserter.h.
The list of blocks containing a node v.
Definition at line 243 of file MMVariableEmbeddingInserter.h.
|
private |
Stores if a possible target node in a block has already been found.
Definition at line 248 of file MMVariableEmbeddingInserter.h.
The list of edges in block i.
Definition at line 245 of file MMVariableEmbeddingInserter.h.
|
private |
Definition at line 249 of file MMVariableEmbeddingInserter.h.
Maps a node in the planarized expansion to the corresponding node in block.
Definition at line 246 of file MMVariableEmbeddingInserter.h.
The list of nodes in block i.
Definition at line 244 of file MMVariableEmbeddingInserter.h.
|
private |
The percentMostCrossed option.
Definition at line 236 of file MMVariableEmbeddingInserter.h.
|
private |
Pointer to the planarized expansion.
Definition at line 238 of file MMVariableEmbeddingInserter.h.
|
private |
The set of possible start nodes of an insertion path.
Definition at line 240 of file MMVariableEmbeddingInserter.h.
|
private |
The set of possible end nodes of an insertion path.
Definition at line 241 of file MMVariableEmbeddingInserter.h.
|
private |
The remove-reinsert option.
Definition at line 235 of file MMVariableEmbeddingInserter.h.