class Graph

Declaration

template <unsigned int N>
class Graph { /* full declaration omitted */ };

Description

Graph <N > - A graph with N nodes. Note that N can be at most 8.

Declared at: llvm/unittests/ADT/TestGraph.h:25

Templates

unsigned int N

Method Overview

  • public llvm::Graph::NodeType * AccessNode(unsigned int Idx) const
  • public void AddEdge(unsigned int FromIdx, unsigned int ToIdx)
  • public void DeleteEdge(unsigned int FromIdx, unsigned int ToIdx)
  • public Graph<N>()
  • public llvm::Graph::NodeSubset NodesReachableFrom(unsigned int Idx) const
  • public static llvm::Graph::ChildIterator child_begin(llvm::Graph::NodeType * Parent)
  • public static llvm::Graph::ChildIterator child_end(llvm::Graph::NodeType * Parent)

Methods

llvm::Graph::NodeType* AccessNode(
    unsigned int Idx) const

Description

AccessNode - Get a pointer to the node with the given index.

Declared at: llvm/unittests/ADT/TestGraph.h:130

Parameters

unsigned int Idx

void AddEdge(unsigned int FromIdx,
             unsigned int ToIdx)

Description

AddEdge - Add an edge from the node with index FromIdx to the node with index ToIdx.

Declared at: llvm/unittests/ADT/TestGraph.h:117

Parameters

unsigned int FromIdx
unsigned int ToIdx

void DeleteEdge(unsigned int FromIdx,
                unsigned int ToIdx)

Description

DeleteEdge - Remove the edge (if any) from the node with index FromIdx to the node with index ToIdx.

Declared at: llvm/unittests/ADT/TestGraph.h:124

Parameters

unsigned int FromIdx
unsigned int ToIdx

Graph<N>()

Description

Graph - Default constructor. Creates an empty graph.

Declared at: llvm/unittests/ADT/TestGraph.h:108

llvm::Graph::NodeSubset NodesReachableFrom(
    unsigned int Idx) const

Description

NodesReachableFrom - Return the set of all nodes reachable from the given node.

Declared at: llvm/unittests/ADT/TestGraph.h:139

Parameters

unsigned int Idx

static llvm::Graph::ChildIterator child_begin(
    llvm::Graph::NodeType* Parent)

Description

child_begin - Return an iterator pointing to the first child of the given node.

Declared at: llvm/unittests/ADT/TestGraph.h:224

Parameters

llvm::Graph::NodeType* Parent

static llvm::Graph::ChildIterator child_end(
    llvm::Graph::NodeType* Parent)

Description

child_end - Return the end iterator for children of the given node.

Declared at: llvm/unittests/ADT/TestGraph.h:229

Parameters

llvm::Graph::NodeType* Parent