Spatial
Simple Static Analysis in LLVM
Public Types | Public Member Functions | Friends | List of all members
spatial::Graph< Node > Class Template Reference

#include <Graph.h>

Public Types

using GraphType = std::map< Node *, std::set< Node * > >
 
using iterator = typename GraphType::iterator
 

Public Member Functions

bool hasEdgeBetween (Node *, Node *)
 hasEdgeBetween - Returns true if there is a edge between Src and Dest More...
 
void insert (Node *, Node *, int, int)
 
bool insert (Node *, Node *)
 
void insert (Node *, std::set< Node * >)
 insert - Directly inserts pointee set Pointee for node Node More...
 
std::set< Node * > getPointee (Node *)
 
Node * getUniquePointee (Node *)
 
void merge (std::vector< Graph< Node > > Graphs)
 merge - Merges the Graphs from Graphs More...
 
void erase (Node *)
 erase - Erases the node Node More...
 
iterator begin ()
 
iterator end ()
 
bool operator== (const Graph< Node > &TheGarph) const
 
bool operator< (const Graph< Node > &TheGarph) const
 

Friends

template<typename GraphNode >
std::ostream & operator<< (std::ostream &OS, const Graph< GraphNode > &G)
 

Member Typedef Documentation

◆ GraphType

template<typename Node >
using spatial::Graph< Node >::GraphType = std::map<Node *, std::set<Node *> >

◆ iterator

template<typename Node >
using spatial::Graph< Node >::iterator = typename GraphType::iterator

Member Function Documentation

◆ begin()

template<typename Node >
iterator spatial::Graph< Node >::begin ( )
inline

◆ end()

template<typename Node >
iterator spatial::Graph< Node >::end ( )
inline

◆ erase()

template<typename Node >
void spatial::Graph< Node >::erase ( Node *  N)

erase - Erases the node Node

◆ getPointee()

template<typename Node >
std::set< Node * > spatial::Graph< Node >::getPointee ( Node *  N)

getPointee - Returns a set of pointee for a given Node. Returns an empty set if Node does not point to anyone

◆ getUniquePointee()

template<typename Node >
Node * spatial::Graph< Node >::getUniquePointee ( Node *  N)

getUniquePointee - Returns the unique pointee for a given Node. Returns null set if Node does not point to anyone or points to more than one node

◆ hasEdgeBetween()

template<typename Node >
bool spatial::Graph< Node >::hasEdgeBetween ( Node *  Src,
Node *  Dest 
)

hasEdgeBetween - Returns true if there is a edge between Src and Dest

Implementation -—

◆ insert() [1/3]

template<typename Node >
bool spatial::Graph< Node >::insert ( Node *  Src,
Node *  Dest 
)

insert - Inserts an direct edge between Src andp Dest. Returns false if the edge already existed

◆ insert() [2/3]

template<typename Node >
void spatial::Graph< Node >::insert ( Node *  Src,
Node *  Dest,
int  Left,
int  Right 
)

insert - Inserts an edge between Src and Dest based on Left and Right. Left and Right denotes the level of redirection in LHS and RHS respectively example a = b is denoted by (1, 1) and a = &b by (1, 0). Only a = b, a = &b, a = *b and *a = b supported right now, TODO support more

◆ insert() [3/3]

template<typename Node >
void spatial::Graph< Node >::insert ( Node *  N,
std::set< Node * >  Pointee 
)

insert - Directly inserts pointee set Pointee for node Node

◆ merge()

template<typename Node >
void spatial::Graph< Node >::merge ( std::vector< Graph< Node > >  Graphs)

merge - Merges the Graphs from Graphs

◆ operator<()

template<typename Node >
bool spatial::Graph< Node >::operator< ( const Graph< Node > &  TheGarph) const

◆ operator==()

template<typename Node >
bool spatial::Graph< Node >::operator== ( const Graph< Node > &  TheGarph) const

Friends And Related Function Documentation

◆ operator<<

template<typename Node >
template<typename GraphNode >
std::ostream & operator<< ( std::ostream &  OS,
const Graph< GraphNode > &  G 
)
friend

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