Go to the documentation of this file.
18 #ifndef GRAPHABSTRACTION_H
19 #define GRAPHABSTRACTION_H
111 virtual void AddEdge(
edge *e,
unsigned int absLevel) = 0;
A generic class for basic operations on Graph abstractions.
double distance(path *p)
length in distance of a path
virtual ~GraphAbstraction()
A generic vector (essentially the same as a point, but offers normalization)
Graph * GetAbstractGraph(int level)
return the abstract Graph at the given level
virtual void OpenGLDraw() const
virtual int MeasureRepairHits()
virtual void RepairAbstraction()=0
This must be called after any of the above add/remove operations.
virtual void AddEdge(edge *e, unsigned int absLevel)=0
add edge to abstraction
virtual void VerifyHierarchy()=0
verify that the hierarchy is consistent
void ClearMarkedNodes()
rebuild hierarchy from original domain */
node * GetNthChild(node *which, int n)
Graph * GetAbstractGraph(node *which)
int CountEdgesAtDistance(node *child, node *parent, std::vector< int > &dists)
long GetAbstractionLevel(node *which)
virtual double h(node *a, node *b)=0
heuristic cost between any two nodes
virtual bool Pathable(node *from, node *to)=0
is there a legal path between these 2 nodes?
int WidthBFS(node *child, node *parent)
long GetNumChildren(node *which)
virtual void RemoveNode(node *n)=0
remove node from abstraction
node * GetRandomGroundNodeFromNode(node *n)
unsigned int getNumAbstractGraphs()
return the total number of graphs in the hierarchy
virtual void AddNode(node *n)=0
add node to abstraction
std::vector< Graph * > abstractions
void GetNumAbstractGraphs(node *from, node *to, std::vector< node * > &fromChain, std::vector< node * > &toChain)
given 2 nodes, find as much of their hierarchy that exists in the Graph
int ComputeWidth(node *n)
double MeasureExpectedNodeWidth(node *n)
bool IsParentOf(node *parent, node *child)
return true if the first node is a parent of or is equal two the second node
double MeasureAverageNodeWidth(int level)
virtual recVec GetNodeLoc(node *) const
long GetLabelL(unsigned int index) const
A linked list of nodes which form a continuous path.
virtual void RemoveEdge(edge *e, unsigned int absLevel)=0
remove edge from abstraction
const double kUnknownPosition
node * GetParent(node *which)
node * GetNthParent(node *which, int n)
return nth level parent of which or null if it doesn't exist
Nodes to be stored within a Graph.
int GetNumExternalEdges(node *n, node *p)
void MeasureAbstractionValues(int level, double &n, double &n_dev, double &c, double &c_dev)
Edge class for connections between node in a Graph.