Computes planar separators by applying the Fundamental Cycle Lemma directly, without trying tree levels first. More...
#include <ogdf/graphalg/SeparatorDualFC.h>
Public Member Functions | |
SeparatorDualFC (bool useTriBFS=false) | |
Constructor. | |
virtual double | getMaxSeparatorSize (int n) const override |
Maximum separator size depends on diameter of graph, so returns -1. | |
Public Member Functions inherited from ogdf::SeparatorLiptonTarjanFC | |
SeparatorLiptonTarjanFC (bool useTriBFS=false) | |
Constructor. | |
Public Member Functions inherited from ogdf::PlanarSeparatorModule | |
PlanarSeparatorModule () | |
virtual | ~PlanarSeparatorModule () |
void | addPostProcessor (Postprocessor &post) |
Adds a postprocessor to this separator, which will always be applied. | |
void | clearPostProcessors () |
Deletes all appended postprocessors from this separator. | |
std::string | getExitPoint () const |
Returns the exitPoint, i.e. | |
virtual std::string | getName () const |
Returns the full name of this algorithm. | |
virtual bool | separate (const Graph &G, List< node > &separator, List< node > &first, List< node > &second, bool checkPreconditions=true) final |
Separates a planar graph. | |
virtual bool | separate (const Graph &G, NodeArray< short > &assignments, bool checkPreconditions=true) final |
Separates a planar graph. | |
void | setStartIndex (int index) |
Protected Member Functions | |
virtual bool | doSeparate (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) override |
Core of the specific separation algorithm - override this in inheriting classes. | |
virtual bool | findCycle (List< node > &separator, List< node > &first, List< node > &second) override |
Finds a suitable cycle by performing a DFS over the faces of the dual of the graph. | |
virtual std::string | getSpecificName () const override |
Returns the unique name of the core algorithm, to be combined with postprocessors later. | |
void | makeTree () |
Builds the BFS tree. | |
Protected Member Functions inherited from ogdf::SeparatorLiptonTarjanFC | |
edge | chooseEdge () const |
Randomly selects the initial edge for the first cycle. | |
Protected Member Functions inherited from ogdf::PlanarSeparatorModule | |
bool | cleanup (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) |
Performs built-in post-processing: For small instances, it can happen that all nodes are assigned to the separator, while both components are empty, which can be fixed by moving half of the nodes to the first list. | |
node | getStartNode (const Graph &G) const |
Selects the starting node for the BFS. | |
bool | postProcess (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) |
Apply all postprocessors. | |
virtual void | reset () |
Reset everything to enable reuse of the module. | |
bool | separateComponents (GraphCopy &G, List< node > &separator, List< node > &first, List< node > &second, bool skip=false) const |
Checks if the graph consists of multiple connected components, takes necessary steps for fixing that, returns true if this already solved the graph, false if the core algorithm still needs to run. | |
bool | setup (const Graph &G, List< node > &separator, List< node > &first, List< node > &second, bool checkPreconditions=true) |
Performs some initial setup to ensure that all preconditions hold and takes trivial steps to separate the graph. | |
Protected Attributes | |
std::shared_ptr< ArrayBFSTree > | tree |
bool | useTriangulatingBFS |
Protected Attributes inherited from ogdf::SeparatorLiptonTarjanFC | |
std::shared_ptr< ArrayBFSTree > | tree |
bool | useTriangulatingBFS |
Protected Attributes inherited from ogdf::PlanarSeparatorModule | |
std::string | exitPoint |
std::shared_ptr< GraphCopy > | graph |
std::vector< Postprocessor * > | postProcessors |
int | startNodeIndex = -1 |
Computes planar separators by applying the Fundamental Cycle Lemma directly, without trying tree levels first.
Definition at line 46 of file SeparatorDualFC.h.
Constructor.
useTriBFS | whether to use triangulating BFS or not |
Definition at line 53 of file SeparatorDualFC.h.
|
overrideprotectedvirtual |
Core of the specific separation algorithm - override this in inheriting classes.
G | the graph to be separated |
separator | the separator nodes |
first | the first component |
second | the second component |
Reimplemented from ogdf::SeparatorLiptonTarjanFC.
|
overrideprotectedvirtual |
Finds a suitable cycle by performing a DFS over the faces of the dual of the graph.
separator | the separator nodes |
first | the first component |
second | the second component |
Reimplemented from ogdf::SeparatorLiptonTarjanFC.
Maximum separator size depends on diameter of graph, so returns -1.
Reimplemented from ogdf::SeparatorLiptonTarjanFC.
Definition at line 56 of file SeparatorDualFC.h.
|
inlineoverrideprotectedvirtual |
Returns the unique name of the core algorithm, to be combined with postprocessors later.
Override this in inheriting methods.
Reimplemented from ogdf::SeparatorLiptonTarjanFC.
Definition at line 80 of file SeparatorDualFC.h.
|
protected |
Builds the BFS tree.
|
protected |
Definition at line 60 of file SeparatorDualFC.h.
|
protected |
Definition at line 59 of file SeparatorDualFC.h.