Dulmage-Mendelsohn-Decomposition. More...
#include <ogdf/graphalg/PlanarSeparatorModule.h>
Public Member Functions | |
bool | apply (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) override |
Applies the postprocessor to a given separation. | |
std::string | getName () const override |
Returns the human-readable identifier of this postprocessor. | |
Public Member Functions inherited from ogdf::planar_separators::Postprocessor | |
Postprocessor () | |
virtual | ~Postprocessor () |
Private Member Functions | |
bool | alternatingBFS (const Graph &G, const List< node > &startNodes, List< node > &reachableSep, List< node > &reachableB) |
Performs an alternating breadth first search to find all nodes in the separator that are reachable, and all those in the larger component B that are reachable. | |
void | bipartiteGraph (Graph &graph, const List< node > &separator) |
Creates a bipartite graph from the nodes in the separator and those in the bigger component. | |
void | calculateRemainders (const Graph &graph) |
Calculates the subset SR and BR once SI / SX and BI / BX have been found. | |
void | chooseBalancedDecomposition (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) |
Given the subsets SI / SX / SR and BI / BX / BR, creates a separator with minimal size so that the two components are as balanced as possible. | |
void | decompose (const Graph &graph, const List< node > &bipart, List< node > &reachableSep, List< node > &reachableB) |
Given all nodes in the bipartite graph, selects starting points for the BFS and finds the reachable nodes in the separator and in B. | |
void | reset () |
Resets the component so it can be reused. | |
void | setupAssignments (const Graph &G, const List< node > &separator, const List< node > &first, const List< node > &second) |
Fills a the NodeArray assignments with the values 0, 1 and 2 to represent the assignments of nodes to the separator / first / second component, respectively. | |
void | translateAssignments (const Graph &G, List< node > &separator, List< node > &first, List< node > &second) const |
Translates the assignments stored in the NodeArray assignments back to the lists, which can then be returned. | |
Private Attributes | |
NodeArray< short > | assignments |
List< node > | BI |
List< node > | bipartB |
List< node > | bipartSep |
List< node > | BR |
List< node > | BX |
NodeArray< node > | clone |
EdgeArray< bool > | flow |
NodeArray< bool > | isInS |
List< node > | SI |
List< node > | SR |
List< node > | SX |
NodeArray< node > | unclone |
Dulmage-Mendelsohn-Decomposition.
Improves a separation by creating a bipartite graph out of the separator and the larger of the two components, finding a maximal matching in this graph, and combining certain subsets of the two components to form a new separator in a way that is provably optimal.
Definition at line 413 of file PlanarSeparatorModule.h.
|
private |
Performs an alternating breadth first search to find all nodes in the separator that are reachable, and all those in the larger component B that are reachable.
G | the graph |
startNodes | starting points for the BFS |
reachableSep | nodes in the separator that could be reached |
reachableB | nodes in component B that could be reached |
|
overridevirtual |
Applies the postprocessor to a given separation.
G | the graph |
separator | list of separator nodes |
first | first half of nodes |
second | second half of nodes |
Implements ogdf::planar_separators::Postprocessor.
|
private |
Creates a bipartite graph from the nodes in the separator and those in the bigger component.
graph | the graph |
separator | the nodes in the separator |
Calculates the subset SR and BR once SI / SX and BI / BX have been found.
graph | the graph |
|
private |
Given the subsets SI / SX / SR and BI / BX / BR, creates a separator with minimal size so that the two components are as balanced as possible.
G | the graph |
separator | the separator nodes |
first | the first component |
second | the second component |
|
private |
Given all nodes in the bipartite graph, selects starting points for the BFS and finds the reachable nodes in the separator and in B.
graph | the graph |
bipart | the bipartite graph |
reachableSep | the reachable nodes from the separator |
reachableB | the reachable nodes in the bigger component B |
|
inlineoverridevirtual |
Returns the human-readable identifier of this postprocessor.
Implements ogdf::planar_separators::Postprocessor.
Definition at line 417 of file PlanarSeparatorModule.h.
|
private |
Resets the component so it can be reused.
|
private |
Fills a the NodeArray assignments
with the values 0, 1 and 2 to represent the assignments of nodes to the separator / first / second component, respectively.
G | the graph |
separator | the separator nodes |
first | the first component |
second | the second component |
|
private |
Translates the assignments stored in the NodeArray assignments back to the lists, which can then be returned.
G | the graph |
separator | the separator nodes |
first | the first component |
second | the second component |
Definition at line 420 of file PlanarSeparatorModule.h.
Definition at line 438 of file PlanarSeparatorModule.h.
Definition at line 423 of file PlanarSeparatorModule.h.
Definition at line 422 of file PlanarSeparatorModule.h.
Definition at line 440 of file PlanarSeparatorModule.h.
Definition at line 439 of file PlanarSeparatorModule.h.
Definition at line 427 of file PlanarSeparatorModule.h.
Definition at line 431 of file PlanarSeparatorModule.h.
Definition at line 426 of file PlanarSeparatorModule.h.
Definition at line 434 of file PlanarSeparatorModule.h.
Definition at line 436 of file PlanarSeparatorModule.h.
Definition at line 435 of file PlanarSeparatorModule.h.
Definition at line 430 of file PlanarSeparatorModule.h.