Declaration of simple graph algorithms. More...
#include <ogdf/basic/Array.h>#include <ogdf/basic/ArrayBuffer.h>#include <ogdf/basic/Graph.h>#include <ogdf/basic/GraphList.h>#include <ogdf/basic/List.h>#include <ogdf/basic/SList.h>#include <ogdf/basic/basic.h>#include <ogdf/basic/internal/graph_iterators.h>#include <ogdf/basic/internal/list_templates.h>#include <ogdf/basic/tuples.h>#include <functional>Go to the source code of this file.
| Namespaces | |
| namespace | ogdf | 
| The namespace for all OGDF objects. | |
| Functions | |
| void | ogdf::degreeDistribution (const Graph &G, Array< int > °dist) | 
| Fills degdistwith the degree distribution of graphG. | |
| bool | ogdf::isBipartite (const Graph &G) | 
| Checks whether a graph is bipartite. | |
| bool | ogdf::isBipartite (const Graph &G, NodeArray< bool > &color) | 
| Checks whether a graph is bipartite. | |
| bool | ogdf::isRegular (const Graph &G) | 
| Checks if a graph is regular. | |
| bool | ogdf::isRegular (const Graph &G, int d) | 
| Checks if a graph is d-regular. | |
| void | ogdf::nodeDistribution (const Graph &G, Array< int > °dist, std::function< int(node)> func) | 
| Fills distwith the distribution given by a functionfuncin graphG. | |
| Methods for loops | |
| bool | ogdf::hasNonSelfLoopEdges (const Graph &G) | 
| Returns whether Ghas edges which are not self-loops. | |
| bool | ogdf::isLoopFree (const Graph &G) | 
| Returns true iff Gcontains no self-loop. | |
| void | ogdf::makeLoopFree (Graph &G) | 
| Removes all self-loops from G. | |
| template<class NODELIST > | |
| void | ogdf::makeLoopFree (Graph &G, NODELIST &L) | 
| Removes all self-loops from Gand returns all nodes with self-loops inL. | |
| void | ogdf::removeSelfLoops (Graph &graph, node v) | 
| Removes all self-loops for a given node vingraph. | |
| Methods for parallel edges | |
| template<class EDGELIST > | |
| void | ogdf::getParallelFreeUndirected (const Graph &G, EdgeArray< EDGELIST > ¶llelEdges) | 
| Computes the bundles of undirected parallel edges in G. | |
| bool | ogdf::isParallelFree (const Graph &G) | 
| Returns true iff Gcontains no parallel edges. | |
| bool | ogdf::isParallelFreeUndirected (const Graph &G) | 
| Returns true iff Gcontains no undirected parallel edges. | |
| void | ogdf::makeParallelFree (Graph &G) | 
| Removes all but one edge of each bundle of parallel edges in G. | |
| template<class EDGELIST > | |
| void | ogdf::makeParallelFree (Graph &G, EDGELIST ¶llelEdges) | 
| Removes all but one of each bundle of parallel edges. | |
| template<class EDGELIST > | |
| void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST ¶llelEdges) | 
| template<class EDGELIST > | |
| void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST ¶llelEdges, EdgeArray< int > &cardPositive, EdgeArray< int > &cardNegative) | 
| template<class EDGELIST = SListPure<edge>> | |
| void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST *parallelEdges=nullptr, EdgeArray< int > *cardPositive=nullptr, EdgeArray< int > *cardNegative=nullptr) | 
| Removes all but one edge of each bundle of undirected parallel edges. | |
| template<bool ONLY_ONCE = false> | |
| int | ogdf::numParallelEdges (const Graph &G) | 
| Returns the number of parallel edges in G. | |
| template<bool ONLY_ONCE = false> | |
| int | ogdf::numParallelEdgesUndirected (const Graph &G) | 
| Returns the number of undirected parallel edges in G. | |
| void | ogdf::parallelFreeSort (const Graph &G, SListPure< edge > &edges) | 
| Sorts the edges of Gsuch that parallel edges come after each other in the list. | |
| void | ogdf::parallelFreeSortUndirected (const Graph &G, SListPure< edge > &edges, EdgeArray< int > &minIndex, EdgeArray< int > &maxIndex) | 
| Sorts the edges of Gsuch that undirected parallel edges come after each other in the list. | |
| Methods for simple graphs | |
| bool | ogdf::isSimple (const Graph &G) | 
| Returns true iff Gcontains neither self-loops nor parallel edges. | |
| bool | ogdf::isSimpleUndirected (const Graph &G) | 
| Returns true iff Gcontains neither self-loops nor undirected parallel edges. | |
| void | ogdf::makeSimple (Graph &G) | 
| Removes all self-loops and all but one edge of each bundle of parallel edges. | |
| void | ogdf::makeSimpleUndirected (Graph &G) | 
| Removes all self-loops and all but one edge of each bundle of undirected parallel edges. | |
| Methods for connectivity | |
| int | ogdf::biconnectedComponents (const Graph &G, EdgeArray< int > &component) | 
| Computes the biconnected components of G. | |
| int | ogdf::biconnectedComponents (const Graph &G, EdgeArray< int > &component, int &nonEmptyComponents) | 
| Computes the biconnected components of G. | |
| int | ogdf::connectedComponents (const Graph &G) | 
| Computes the amount of connected components of G. | |
| int | ogdf::connectedComponents (const Graph &G, NodeArray< int > &component, List< node > *isolated=nullptr, ArrayBuffer< node > *reprs=nullptr) | 
| Computes the connected components of Gand optionally generates a list of isolated nodes. | |
| int | ogdf::connectedIsolatedComponents (const Graph &G, List< node > &isolated, NodeArray< int > &component) | 
| bool | ogdf::findCutVertices (const Graph &G, ArrayBuffer< node > &cutVertices, ArrayBuffer< Tuple2< node, node > > &addEdges, bool onlyOne=false) | 
| Finds cut vertices and potential edges that could be added to turn the cut vertices into non-cut vertices. | |
| bool | ogdf::findCutVertices (const Graph &G, ArrayBuffer< node > &cutVertices, bool onlyOne=false) | 
| Finds cut vertices and potential edges that could be added to turn the cut vertices into non-cut vertices. | |
| bool | ogdf::isBiconnected (const Graph &G) | 
| Returns true iff Gis biconnected. | |
| bool | ogdf::isBiconnected (const Graph &G, node &cutVertex) | 
| Returns true iff Gis biconnected. | |
| bool | ogdf::isConnected (const Graph &G) | 
| Returns true iff Gis connected. | |
| bool | ogdf::isTriconnected (const Graph &G) | 
| Returns true iff Gis triconnected. | |
| bool | ogdf::isTriconnected (const Graph &G, node &s1, node &s2) | 
| Returns true iff Gis triconnected. | |
| bool | ogdf::isTriconnectedPrimitive (const Graph &G) | 
| Returns true iff Gis triconnected (using a quadratic time algorithm!). | |
| bool | ogdf::isTriconnectedPrimitive (const Graph &G, node &s1, node &s2) | 
| Returns true iff Gis triconnected (using a quadratic time algorithm!). | |
| bool | ogdf::isTwoEdgeConnected (const Graph &graph) | 
| Returns true iff graphis 2-edge-connected. | |
| bool | ogdf::isTwoEdgeConnected (const Graph &graph, edge &bridge) | 
| Returns true iff graphis 2-edge-connected. | |
| void | ogdf::makeBiconnected (Graph &G) | 
| Makes Gbiconnected by adding edges. | |
| void | ogdf::makeBiconnected (Graph &G, List< edge > &added) | 
| Makes Gbiconnected by adding edges. | |
| void | ogdf::makeConnected (Graph &G) | 
| makes Gconnected by adding a minimum number of edges. | |
| void | ogdf::makeConnected (Graph &G, List< edge > &added) | 
| Makes Gconnected by adding a minimum number of edges. | |
| void | ogdf::triangulate (Graph &G) | 
| Triangulates a planarly embedded graph Gby adding edges. | |
| Methods for directed graphs | |
| bool | ogdf::hasSingleSink (const Graph &G) | 
| Returns true iff the digraph Gcontains exactly one sink node (or is empty). | |
| bool | ogdf::hasSingleSink (const Graph &G, node &sink) | 
| Returns true iff the digraph Gcontains exactly one sink node (or is empty). | |
| bool | ogdf::hasSingleSource (const Graph &G) | 
| Returns true iff the digraph Gcontains exactly one source node (or is empty). | |
| bool | ogdf::hasSingleSource (const Graph &G, node &source) | 
| Returns true iff the digraph Gcontains exactly one source node (or is empty). | |
| bool | ogdf::isAcyclic (const Graph &G) | 
| Returns true iff the digraph Gis acyclic. | |
| bool | ogdf::isAcyclic (const Graph &G, List< edge > &backedges) | 
| Returns true iff the digraph Gis acyclic. | |
| bool | ogdf::isAcyclicUndirected (const Graph &G) | 
| Returns true iff the undirected graph Gis acyclic. | |
| bool | ogdf::isAcyclicUndirected (const Graph &G, List< edge > &backedges) | 
| Returns true iff the undirected graph Gis acyclic. | |
| bool | ogdf::isStGraph (const Graph &G) | 
| Returns true if Gis an st-digraph. | |
| bool | ogdf::isStGraph (const Graph &G, node &s, node &t, edge &st) | 
| Returns true iff Gis an st-digraph. | |
| void | ogdf::makeAcyclic (Graph &G) | 
| Makes the digraph Gacyclic by removing edges. | |
| void | ogdf::makeAcyclicByReverse (Graph &G) | 
| Makes the digraph G acyclic by reversing edges. | |
| void | ogdf::makeBimodal (Graph &G) | 
| Makes the digraph Gbimodal. | |
| void | ogdf::makeBimodal (Graph &G, List< edge > &newEdges) | 
| Makes the digraph Gbimodal. | |
| int | ogdf::strongComponents (const Graph &G, NodeArray< int > &component) | 
| Computes the strongly connected components of the digraph G. | |
| void | ogdf::topologicalNumbering (const Graph &G, NodeArray< int > &num) | 
| Computes a topological numbering of an acyclic digraph G. | |
| Methods for trees and forests | |
| bool | ogdf::isArborescence (const Graph &G) | 
| Returns true iff Grepresents an arborescence. | |
| bool | ogdf::isArborescence (const Graph &G, node &root) | 
| Returns true iff Grepresents an arborescence. | |
| bool | ogdf::isArborescenceForest (const Graph &G) | 
| Returns true iff Gis a forest consisting only of arborescences. | |
| bool | ogdf::isArborescenceForest (const Graph &G, List< node > &roots) | 
| Returns true iff Gis a forest consisting only of arborescences. | |
| bool | ogdf::isForest (const Graph &G) | 
| bool | ogdf::isForest (const Graph &G, List< node > &roots) | 
| bool | ogdf::isFreeForest (const Graph &G) | 
| bool | ogdf::isTree (const Graph &G) | 
| Returns true iff Gis a tree, i.e. contains no undirected cycle and is connected. | |
Declaration of simple graph algorithms.
Definition in file simple_graph_alg.h.