A partial solution for a 1-Planarity instance, representing a node in the backtracking tree. More...
#include <ogdf/k-planarity/1-planarity_backtracking/EdgePairPartition.h>
Classes | |
| struct | UndoInformation |
Public Member Functions | |
| EdgePairPartition (const EdgePairPartition &other) | |
Creates a new EdgePairPartition as a copy of other, but does not copy its transaction stack. | |
| EdgePairPartition (const Graph &g, OneplanMode m=OneplanMode::Normal) | |
| Creates a new EdgePairPartition, where all pairs of independent edges are crossable. | |
| void | crossEdgePair (const EdgePair &pair) |
Crosses pair and computes the corresponding kite edges. | |
| const std::set< EdgePair > & | crossingEdgePairs () const |
| Returns the set of all crossed edge pairs. | |
| EdgePair | getNextTodoCrossing () |
| Removes and returns the next stored crossing that should be considered. | |
| const Graph & | graph () const |
| Returns the associated graph. | |
| bool | hasTodoCrossing () |
| Returns whether there are crossings that should be branched over. | |
| bool | isCrossed (edge e) const |
Returns whether e is part of a crossing. | |
| bool | isFree (const EdgePair &pair) const |
Returns whether pair is still allowed to cross. | |
| bool | isFree (edge e) const |
Returns whether there exists an edge that e may cross. | |
| const std::set< VertexPair > & | kiteEdges () const |
| Returns the set of kite edges. | |
| void | setNonCrossing (const EdgePair &pair) |
Marks pair as non-crossing. | |
| void | startTransaction () |
| Starts a new transaction that can later be undone. | |
| void | startTransaction (std::vector< EdgePair > &todoCrossings) |
| Starts a new transaction and associates an exhaustive set of crossings that will be branched over. | |
| void | undoTransaction () |
| Reverts the previous transaction. | |
Static Public Member Functions | |
| static edge | getEdgeBetween (node a, node b) |
Returns an edge between a and b, or null. | |
Private Member Functions | |
| void | addKiteEdge (const VertexPair &vp) |
| void | addKiteEdge (edge e) |
| void | computeKiteEdges (const EdgePair &crossedPair) |
Private Attributes | |
| EdgeSet | m_crossedEdges |
| std::set< EdgePair > | m_crossingEdgePairs |
| std::set< EdgePair > | m_freeEdgePairs |
| const Graph & | m_graph |
| std::set< VertexPair > | m_kiteEdges |
| OneplanMode | m_mode = OneplanMode::Normal |
| std::stack< UndoInformation > | m_undoInformation |
A partial solution for a 1-Planarity instance, representing a node in the backtracking tree.
All independent pairs of the input graph are partitioned into crossing, uncrossable, and free (i.e., still allowed to cross). Maintains a stack of transactions that can be later undone.
Definition at line 117 of file EdgePairPartition.h.
|
inlineexplicit |
Creates a new EdgePairPartition, where all pairs of independent edges are crossable.
| g | The input graph. |
| m | The kind of 1-Planarity represented |
Definition at line 142 of file EdgePairPartition.h.
|
inline |
Creates a new EdgePairPartition as a copy of other, but does not copy its transaction stack.
Definition at line 154 of file EdgePairPartition.h.
|
inlineprivate |
Definition at line 267 of file EdgePairPartition.h.
|
inlineprivate |
Definition at line 260 of file EdgePairPartition.h.
|
private |
| void ogdf::oneplan_backtracking::EdgePairPartition::crossEdgePair | ( | const EdgePair & | pair | ) |
Crosses pair and computes the corresponding kite edges.
|
inline |
Returns the set of all crossed edge pairs.
Definition at line 169 of file EdgePairPartition.h.
|
inlinestatic |
Returns an edge between a and b, or null.
Definition at line 248 of file EdgePairPartition.h.
|
inline |
Removes and returns the next stored crossing that should be considered.
Definition at line 192 of file EdgePairPartition.h.
|
inline |
Returns the associated graph.
Definition at line 163 of file EdgePairPartition.h.
|
inline |
Returns whether there are crossings that should be branched over.
Definition at line 184 of file EdgePairPartition.h.
|
inline |
Returns whether e is part of a crossing.
Definition at line 238 of file EdgePairPartition.h.
|
inline |
Returns whether pair is still allowed to cross.
Definition at line 212 of file EdgePairPartition.h.
|
inline |
Returns whether there exists an edge that e may cross.
Definition at line 225 of file EdgePairPartition.h.
|
inline |
Returns the set of kite edges.
Definition at line 166 of file EdgePairPartition.h.
|
inline |
Marks pair as non-crossing.
Definition at line 204 of file EdgePairPartition.h.
|
inline |
Starts a new transaction that can later be undone.
Definition at line 172 of file EdgePairPartition.h.
|
inline |
Starts a new transaction and associates an exhaustive set of crossings that will be branched over.
Definition at line 175 of file EdgePairPartition.h.
| void ogdf::oneplan_backtracking::EdgePairPartition::undoTransaction | ( | ) |
Reverts the previous transaction.
|
private |
Definition at line 129 of file EdgePairPartition.h.
|
private |
Definition at line 131 of file EdgePairPartition.h.
|
private |
Definition at line 132 of file EdgePairPartition.h.
|
private |
Definition at line 128 of file EdgePairPartition.h.
|
private |
Definition at line 130 of file EdgePairPartition.h.
|
private |
Definition at line 127 of file EdgePairPartition.h.
|
private |
Definition at line 134 of file EdgePairPartition.h.