Greedy algorithm for computing a maximal acyclic subgraph. More...
#include <ogdf/layered/GreedyCycleRemoval.h>
Inheritance diagram for ogdf::GreedyCycleRemoval:Public Member Functions | |
| GreedyCycleRemoval () | |
| virtual void | call (const Graph &G, List< edge > &arcSet) override |
Computes the set of edges arcSet, which have to be deleted in the acyclic subgraph. | |
Public Member Functions inherited from ogdf::AcyclicSubgraphModule | |
| AcyclicSubgraphModule () | |
| Initializes an acyclic subgraph module. | |
| virtual | ~AcyclicSubgraphModule () |
| Destruction. | |
| void | callAndDelete (Graph &G) |
Makes G acyclic by removing edges. | |
| void | callAndReverse (Graph &G) |
Makes G acyclic by reversing edges. | |
| void | callAndReverse (Graph &G, List< edge > &reversed) |
Makes G acyclic by reversing edges. | |
| void | operator() (const Graph &G, List< edge > &arcSet) |
Computes the set of edges arcSet which have to be removed for obtaining an acyclic subgraph of G. | |
Private Member Functions | |
| void | dfs (node v, const Graph &G) |
Private Attributes | |
| Array< ListPure< node > > | m_B |
| int | m_counter |
| NodeArray< int > | m_in |
| NodeArray< int > | m_index |
| NodeArray< ListIterator< node > > | m_item |
| int | m_max |
| int | m_min |
| NodeArray< int > | m_out |
| NodeArray< bool > | m_visited |
Greedy algorithm for computing a maximal acyclic subgraph.
The algorithm applies a greedy heuristic to compute a maximal acyclic subgraph and works in linear-time.
Definition at line 47 of file GreedyCycleRemoval.h.
|
inline |
Definition at line 49 of file GreedyCycleRemoval.h.
|
overridevirtual |
Computes the set of edges arcSet, which have to be deleted in the acyclic subgraph.
Implements ogdf::AcyclicSubgraphModule.
Definition at line 60 of file GreedyCycleRemoval.h.
|
private |
Definition at line 57 of file GreedyCycleRemoval.h.
|
private |
Definition at line 59 of file GreedyCycleRemoval.h.
|
private |
Definition at line 59 of file GreedyCycleRemoval.h.
|
private |
Definition at line 61 of file GreedyCycleRemoval.h.
|
private |
Definition at line 57 of file GreedyCycleRemoval.h.
|
private |
Definition at line 57 of file GreedyCycleRemoval.h.
|
private |
Definition at line 59 of file GreedyCycleRemoval.h.
|
private |
Definition at line 62 of file GreedyCycleRemoval.h.