libmove3d-planners
|
Classe représentant un Node d'un Graph. More...
#include <node.hpp>
Public Member Functions | |
Node () | |
Constructor. | |
Node (Graph *G, std::tr1::shared_ptr< Configuration > C, bool newCompco=true) | |
Constructeur de la classe. More... | |
Node (Graph *G, node *N) | |
Constructeur de la classe. More... | |
~Node () | |
destructeur de la classe | |
void | deleteNode () |
Deletes the p3d node without deleting the configuration allready stored in a shared_ptr. | |
bool | operator== (Node &N) |
Equal operator. | |
node * | getNodeStruct () |
obtient la structure p3d_node More... | |
Graph * | getGraph () |
obtient le Graph pour lequel le Node a été créé More... | |
Robot * | getRobot () |
obtient le Robot pour lequel le Node a été créé More... | |
confPtr_t | getConfiguration () |
obtient la Configuration stockée More... | |
void | activ (bool b) |
modifie la valeur de activ More... | |
bool | isActiv () |
obtient la valeur de activ More... | |
unsigned int | getId () const |
Returns the node id. | |
void | setId (unsigned int id) |
Sets the Id. | |
Node *& | parent () |
returns a reference to the node parent when in a tree like structure the pointer is editable | |
bool & | isLeaf () |
returns a reference to the if leaf data the pointer is editable | |
double | cost () |
obtient le cout du Node More... | |
double & | sumCost (bool recompute=false) |
Returns the Sum of cost along the path. More... | |
double | getTemp () |
obtient la temperature du Node More... | |
void | setTemp (double t) |
modifie la temperature du Node More... | |
double | getDist () |
obtient la distance au Node courant créé More... | |
double | distMultisol (Node *node) const |
copy of p3d_APInode_dist_multisol More... | |
double | metric (Node *node) |
double | dist (Node *N) const |
calcule la distance entre deux Node et stocke la valeur dans DistNew More... | |
double | dist (confPtr_t q) const |
Compute the distance between the node and a configuration q and store it to DistNew. More... | |
bool | equal (Node *N) const |
teste si deux Node sont égaux More... | |
bool | inSameComponent (Node *N) const |
teste si deux Node sont dans la même composante connexe More... | |
bool | isLinkable (Node *node, double *dist) const |
Checks if two nodes can be linked. More... | |
bool | isLinkableMultisol (Node *node, double *dist) const |
Check if two node are connectable. More... | |
void | checkStopByWeight () |
vérifie si le poids max du Node a été atteint | |
unsigned int | getNumberOfNodesInCompco () const |
Gets the number of nodes in the connected componnent. | |
ConnectedComponent * | getConnectedComponent () const |
obtient la structure de composante connexe à laquelle appartient le Node More... | |
void | setConnectedComponent (ConnectedComponent *compco) |
Sets the compco of the node. More... | |
void | deleteCompco () |
detruit la composante connexe | |
bool | maximumNumberNodes () |
teste si la composante connexe a atteint le nombre max de Nodes More... | |
bool | connectNodeToCompco (Node *N, double step) |
connect un Node à la composante connexe More... | |
void | merge (Node *compco) |
merge deux composantes connexes More... | |
bool | equalCompco (Node *compco) const |
teste si deux composante connexe sont égales More... | |
Node * | randomNodeFromComp () const |
tire un Node aléatoirement dans la composante connexe More... | |
unsigned | getNumberOfEdges () |
Get the number of edges going out of this node. | |
std::list< Edge * > & | getEdges () |
Get the list of edges going out of this node. | |
void | addEdge (Edge *edge) |
Add the given edge to the list of edges going out of this node. | |
void | removeEdge (Edge *edge) |
Remove the given edge from the list of edges going out of this node. | |
std::vector< Edge * > | computeEdges () |
Recompute the list of edges going out of this node. | |
unsigned | getNumberOfNeighbors () |
Get the number of neighbors of this node. | |
std::list< Node * > & | getNeighbors () |
Get the list of neighbors of this node. | |
void | addNeighbor (Node *node) |
Add the given node to the list of neighbors of this node. | |
void | removeNeighbor (Node *node) |
Remove the given node from the list of neighbors of this node. | |
std::vector< Node * > | computeNeighbors () |
Recompute the list of neighbors of this node. | |
void | setSelectCost (double Cost) |
Method for EST. | |
double | getSelectCost () |
void | setExpandFailed () |
int | getNbExpandFailed () |
std::vector< Node * > & | getSortedNodes () |
void | setSortedNodes (std::vector< Node * > &nodes) |
void | print () const |
Prints the node to the standard output. | |
BGL_Vertex | getDescriptor () |
void | setDescriptor (const BGL_Vertex &V) |
void | unSetDescriptor () |
bool | isForwardConnectedToGoal () |
bool | isBackwardConnectedToSource () |
void | forwardConnectToGoal () |
void | backwardConnectToSource () |
void | resetConnections () |
bool | isFlaged () |
void | flag () |
void | unflag () |
void | unflagForward () |
void | unflagBackward () |
void | addForwardNeighbor (Node *N) |
void | addBackwardNeighbor (Node *N) |
std::vector< Node * > | getBackwardNeighbors () |
std::vector< Node * > | getForwardNeighbors () |
void | updateForward () |
void | updateBackward () |
unsigned int | getSccId () |
void | setSccId (unsigned int i) |
Public Attributes | |
int | useful |
Node::Node | ( | Graph * | G, |
std::tr1::shared_ptr< Configuration > | C, | ||
bool | newCompco = true |
||
) |
Constructeur de la classe.
G | le Graph pour lequel le Node est créé |
C | la Configuration stockée dans le Node |
id | the number in the graph (Graph->getNumberOfNodes) |
Node::Node | ( | Graph * | G, |
node * | N | ||
) |
void Node::activ | ( | bool | b | ) |
modifie la valeur de activ
b | la nouvelle valeur de activ |
bool Node::connectNodeToCompco | ( | Node * | N, |
double | step | ||
) |
double Node::dist | ( | Node * | N | ) | const |
double Node::dist | ( | confPtr_t | q | ) | const |
Compute the distance between the node and a configuration q and store it to DistNew.
q | the configuration |
double Node::distMultisol | ( | Node * | node | ) | const |
copy of p3d_APInode_dist_multisol
Copy of p3d_APInode_dist_multisol.
bool Node::equal | ( | Node * | N | ) | const |
bool Node::equalCompco | ( | Node * | compco | ) | const |
teste si deux composante connexe sont égales
compco | la composante connexe à tester |
shared_ptr< Configuration > Node::getConfiguration | ( | ) |
obtient la Configuration stockée
|
inline |
double Node::getDist | ( | ) |
Graph * Node::getGraph | ( | ) |
p3d_node * Node::getNodeStruct | ( | ) |
obtient la structure p3d_node
Robot * Node::getRobot | ( | ) |
double Node::getTemp | ( | ) |
bool Node::inSameComponent | ( | Node * | N | ) | const |
bool Node::isActiv | ( | ) |
obtient la valeur de activ
bool Node::isLinkable | ( | Node * | node, |
double * | dist | ||
) | const |
Checks if two nodes can be linked.
Function that is the copy of p3d_APInode_linked that relies on the old graph Compute the localpath using the local method associated to the robot.
node | the node to test |
dist | the distance between the nodes |
bool Node::isLinkableMultisol | ( | Node * | node, |
double * | dist | ||
) | const |
Check if two node are connectable.
node | the node to test |
dist | the distance between the nodes |
bool Node::maximumNumberNodes | ( | ) |
teste si la composante connexe a atteint le nombre max de Nodes
void Node::merge | ( | Node * | compco | ) |
merge deux composantes connexes
compco | la composante connexe à merger |
Node * Node::randomNodeFromComp | ( | ) | const |
void Node::setConnectedComponent | ( | ConnectedComponent * | compco | ) |
Sets the compco of the node.
the | connected component in which is the node |
void Node::setTemp | ( | double | t | ) |
modifie la temperature du Node
t | la nouvelle temperature |
double & Node::sumCost | ( | bool | recompute = false | ) |
Returns the Sum of cost along the path.
Return the total cost of the path connecting the root of the tree to this node.
recompute | should the cost be recomputed? |