111 const std::vector<unsigned int>&
perm)
const;
124 unsigned int p1,
unsigned int p2)
const;
154 std::vector<edge>& tree)
const;
Declaration and implementation of EdgeArray class.
Declaration of doubly linked lists and iterators.
Dynamic arrays indexed with edges.
Class for the representation of edges.
Calculates k edge-independent spanning trees of a graph.
bool insertNewTree(Solution &f, unsigned int t, unsigned int j, std::vector< edge > &tree) const
bool checkTwoPathIndependence(const std::vector< NodeArray< adjEntry > > &parents, node v, unsigned int p1, unsigned int p2) const
Checks two paths for independence.
node getRoot() const
Returns the associated root node.
bool findAndInsertNextTree(Solution &f, unsigned int &t, unsigned int j, std::vector< edge > &tree) const
Iterates using nextSpanningTree until insertNewTree succeeds.
bool nextSpanningTree(unsigned int &t, std::vector< edge > &tree) const
Calculates the next spanning tree after tree using backtracking.
bool findOne(unsigned int k, Solution &f) const
Finds k edge-independent spanning trees in graph m_G rooted at m_root.
bool isInSubGraph(const std::vector< edge > &sub, const edge &e, unsigned int t) const
Checks whether e is in the subgraph.
EdgeIndependentSpanningTrees()
Creates an instance of edge-independent spanning tree withou associated graph and root.
const Graph * getGraph() const
Returns a pointer to the associated graph.
bool checkIndependence(const std::vector< NodeArray< adjEntry > > &parents, unsigned int k) const
Checks k spanning trees for independence.
EdgeIndependentSpanningTrees(const Graph &G)
Creates an instance of edge-independent spanning tree and sets the graph.
bool isFinished(const Solution &f, unsigned int k) const
Checks whether iteration is finished.
void findDo(unsigned int k, std::function< bool(Solution &)> func) const
Finds k edge-independent spanning trees and invokes func for each one, The search is stopped if func ...
void setGraph(const Graph &G)
Sets the associated graph.
bool createInitialSpanningTrees(Solution &f, unsigned int k) const
Creates first k spanning trees.
const Graph * m_G
The associated graph.
List< Solution > findAllPerm(unsigned int k) const
Finds all k edge-independent spanning trees in graph m_G rooted at m_root, including permutations.
List< Solution > findAll(unsigned int k) const
Finds all k edge-independent spanning trees in graph m_G rooted at m_root.
bool createParentRel(const Solution &f, unsigned int j, NodeArray< adjEntry > &parent) const
Creates a parent relation, which for each node in the associated graph contains the adjEntry pointing...
void clearTree(Solution &f, unsigned int j) const
Clears the j-th Tree from f.
bool checkNewTree(const Solution &f1, const Solution &f2, unsigned int k) const
Takes two edge-independent spanning trees and checks for them being unequal under all permutations.
~EdgeIndependentSpanningTrees()=default
Destructor.
unsigned int createVals(const Solution &f, unsigned int k, std::vector< edge > &tree) const
Creates the values needed for nextSpanningTree from f.
bool checkOnePermUnequal(const Solution &f1, const Solution &f2, const std::vector< unsigned int > &perm) const
Takes two edge-independent spanning trees, permutes one and checks for them being unequal.
bool iterate(Solution &f, unsigned int j, unsigned int k) const
Iterates over all subgraphs.
void setRoot(node root)
Sets the associated root node.
EdgeIndependentSpanningTrees(const Graph &G, node root)
Creates an instance of edge-independent spanning tree and sets the graph and root node.
bool pathExists(const std::vector< edge > &tree, node v1, node v2, unsigned int t) const
Checks whether v1 and v2 are connected in the subgraph.
node m_root
The associated root node.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.