20#ifndef TULIP_ACYCLICITY_TEST_H
21#define TULIP_ACYCLICITY_TEST_H
24#include <tulip/tulipconf.h>
25#include <tulip/Node.h>
26#include <tulip/Edge.h>
46 : n1(n1), n2(n2), e1(e1), e2(e2), e3(e3), old(old) {}
80 std::vector<tlp::SelfLoops> &selfLoops);
92 static bool acyclicTest(
const Graph *graph, std::vector<edge> *obstructionEdges =
nullptr);
This class provides tests for acyclicity on a graph. Results are cached in a map of graphs and result...
static void makeAcyclic(Graph *graph, std::vector< edge > &reversed, std::vector< tlp::SelfLoops > &selfLoops)
Makes the graph acyclic by removing edges.
static bool acyclicTest(const Graph *graph, std::vector< edge > *obstructionEdges=nullptr)
Returns whether the graph is acyclic. Collection of obstruction edges takes a bit of time,...
static bool isAcyclic(const Graph *graph)
Checks whether the graph is acyclic or not. The result is cached so subsequent calls are in O(1).
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.