LLVM: llvm::DirectedGraph< NodeType, EdgeType > Class Template Reference (original) (raw)

Directed graph. More...

#include "[llvm/ADT/DirectedGraph.h](DirectedGraph%5F8h%5Fsource.html)"

Public Member Functions
DirectedGraph ()=default
DirectedGraph (NodeType &N)
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
const NodeType & front () const
NodeType & front ()
const NodeType & back () const
NodeType & back ()
size_t size () const
const_iterator findNode (const NodeType &N) const
Find the given node N in the table.
iterator findNode (const NodeType &N)
bool addNode (NodeType &N)
Add the given node N to the graph if it is not already present.
bool findIncomingEdgesToNode (const NodeType &N, SmallVectorImpl< EdgeType * > &EL) const
Collect in EL all edges that are coming into node N.
bool removeNode (NodeType &N)
Remove the given node N from the graph.
bool connect (NodeType &Src, NodeType &Dst, EdgeType &E)
Assuming nodes Src and Dst are already in the graph, connect node Src to node Dst using the provided edge E.
Protected Attributes
NodeListTy Nodes

template<class NodeType, class EdgeType>
class llvm::DirectedGraph< NodeType, EdgeType >

Directed graph.

The graph is represented by a table of nodes. Each node contains a (possibly empty) list of outgoing edges. Each edge contains the target node it connects to.

Definition at line 161 of file DirectedGraph.h.

const_iterator

template<class NodeType, class EdgeType>

DGraphType

template<class NodeType, class EdgeType>

EdgeListTy

template<class NodeType, class EdgeType>

iterator

template<class NodeType, class EdgeType>

NodeListTy

template<class NodeType, class EdgeType>

template<class NodeType, class EdgeType>

DirectedGraph() [2/2]

template<class NodeType, class EdgeType>

addNode()

template<class NodeType, class EdgeType>

back() [1/2]

template<class NodeType, class EdgeType>

back() [2/2]

template<class NodeType, class EdgeType>

begin() [1/2]

template<class NodeType, class EdgeType>

begin() [2/2]

template<class NodeType, class EdgeType>

connect()

template<class NodeType, class EdgeType>

Assuming nodes Src and Dst are already in the graph, connect node Src to node Dst using the provided edge E.

Return true if Src is not already connected to Dst via E, and false otherwise.

Definition at line 243 of file DirectedGraph.h.

end() [1/2]

template<class NodeType, class EdgeType>

end() [2/2]

template<class NodeType, class EdgeType>

findIncomingEdgesToNode()

template<class NodeType, class EdgeType>

Collect in EL all edges that are coming into node N.

Return true if at least one edge was found, and false otherwise.

Definition at line 204 of file DirectedGraph.h.

findNode() [1/2]

template<class NodeType, class EdgeType>

findNode() [2/2]

template<class NodeType, class EdgeType>

front() [1/2]

template<class NodeType, class EdgeType>

front() [2/2]

template<class NodeType, class EdgeType>

removeNode()

template<class NodeType, class EdgeType>

Remove the given node N from the graph.

If the node has incoming or outgoing edges, they are also removed. Return true if the node was found and then removed, and false if the node was not found in the graph to begin with.

Definition at line 221 of file DirectedGraph.h.

size()

template<class NodeType, class EdgeType>

Nodes

template<class NodeType, class EdgeType>


The documentation for this class was generated from the following file: