78 inline std::set <DepNode *, compNode> *
DepList ()
const
83 std::set <DepNode *, compNode> *already_visited = NULL)
const;
89 void print (
int = 0,
bool descend =
false)
const;
132 for (std::set <DepNode *, compNode>::iterator i =
vertices_.begin ();
void insert(exprAux *)
insert new auxiliary if new
int counter_
counter to assign numbering to all nodes
void createOrder()
assign numbering to all nodes of graph
void print(bool descend=false)
debugging procedure
bool depends(int, int, bool=false)
does w depend on x?
void insert(exprVar *)
insert new variable if new
std::set< DepNode *, compNode > & Vertices()
return vertex set
void replaceIndex(int oldVar, int newVar)
replace, throughout the whole graph, the index of a variable with another in the entire graph.
int & Counter()
node index counter
DepNode * lookup(int index)
search for node in vertex set
std::set< DepNode *, compNode > vertices_
set of variable nodes
void erase(exprVar *)
delete element
bool checkCycles()
check for dependence cycles in graph
vertex of a dependence graph.
void createOrder(DepGraph *)
assign numbering to all nodes of graph
bool depends(int xi, bool=false, std::set< DepNode *, compNode > *already_visited=NULL) const
does this variable depend on variable with index xi?
enum dep_color & color()
return or set color of a node
DepNode(int ind)
fictitious constructor: only fill in index (such object is used in find() and then discarded)
dep_color
color used in DFS for checking cycles
std::set< DepNode *, compNode > * depList_
index nodes on which this one depends (forward star in dependence graph)
std::set< DepNode *, compNode > * depList()
index nodes on which this one depends (forward star in dependence graph)
int index_
index of variable associated with node
int Order() const
return index of this variable
int order_
order in which this variable should be updated, evaluated, etc.
enum dep_color color_
color used in DFS for checking cycles
void print(int=0, bool descend=false) const
debugging procedure
void replaceIndex(DepNode *oldVarNode, DepNode *newVarNode)
replace the index of a variable with another in the entire graph.
std::set< DepNode *, compNode > * DepList() const
return all variables it depends on
int Index() const
return index of this variable
general include file for different compilers
structure for comparing nodes in the dependence graph
bool operator()(const DepNode *n0, const DepNode *n1) const
structure for comparing nodes