6 #include "API/ConfigSpace/configuration.hpp"
14 #include "BGL_Graph.hpp"
51 Node(
Graph* G, std::tr1::shared_ptr<Configuration> C,
bool newCompco=
true);
116 unsigned int getId()
const;
121 void setId(
unsigned int id);
144 double&
sumCost(
bool recompute=
false);
169 double metric(
Node* node);
183 double dist(confPtr_t q)
const;
311 double getSelectCost() {
return _SelectCost; }
312 void setExpandFailed() { _nbExpan++; }
313 int getNbExpandFailed() {
return _nbExpan; }
314 std::vector<Node*>& getSortedNodes() {
return _SortedNodes; }
315 void setSortedNodes(std::vector<Node*>& nodes) { _SortedNodes = nodes; }
324 BGL_Vertex getDescriptor();
325 void setDescriptor(
const BGL_Vertex& V);
326 void unSetDescriptor();
330 bool isForwardConnectedToGoal();
331 bool isBackwardConnectedToSource();
332 void forwardConnectToGoal();
333 void backwardConnectToSource();
334 void resetConnections();
338 void unflagForward();
339 void unflagBackward();
340 void addForwardNeighbor(
Node *N);
341 void addBackwardNeighbor(
Node *N);
342 std::vector<Node*> getBackwardNeighbors();
343 std::vector<Node*> getForwardNeighbors();
344 void updateForward();
345 void updateBackward();
346 unsigned int getSccId();
347 void setSccId(
unsigned int i);
355 bool m_is_BGL_Descriptor_Valid;
356 BGL_Vertex m_BGL_Descriptor;
363 std::list<Edge *> edges;
366 std::list<Node *> neighbors;
372 std::tr1::shared_ptr<Configuration> m_Configuration;
377 std::vector<Node*> _SortedNodes;
383 bool _isForwardConnectedToGoal;
384 bool _isBackwardConnectedToSource;
386 std::vector<Node*> _ForwardNeighbors;
387 std::vector<Node*> _BackwardNeighbors;
void deleteNode()
Deletes the p3d node without deleting the configuration allready stored in a shared_ptr.
Definition: node.cpp:127
void print() const
Prints the node to the standard output.
Definition: node.cpp:494
~Node()
destructeur de la classe
Definition: node.cpp:144
void setId(unsigned int id)
Sets the Id.
Definition: node.cpp:181
Definition: compco.hpp:23
double getTemp()
obtient la temperature du Node
Definition: node.cpp:156
bool connectNodeToCompco(Node *N, double step)
connect un Node à la composante connexe
Definition: node.cpp:465
Classe représentant un Node d'un Graph.
Definition: node.hpp:39
void setTemp(double t)
modifie la temperature du Node
Definition: node.cpp:165
Node *& parent()
returns a reference to the node parent when in a tree like structure the pointer is editable ...
Definition: node.hpp:127
bool inSameComponent(Node *N) const
teste si deux Node sont dans la même composante connexe
Definition: node.cpp:460
double getDist()
obtient la distance au Node courant créé
bool isLinkable(Node *node, double *dist) const
Checks if two nodes can be linked.
Definition: node.cpp:351
void removeNeighbor(Node *node)
Remove the given node from the list of neighbors of this node.
Definition: node.hpp:302
ConnectedComponent * getConnectedComponent() const
obtient la structure de composante connexe à laquelle appartient le Node
Definition: node.hpp:230
bool equalCompco(Node *compco) const
teste si deux composante connexe sont égales
Definition: node.cpp:484
double distMultisol(Node *node) const
copy of p3d_APInode_dist_multisol
Definition: node.cpp:329
unsigned getNumberOfNeighbors()
Get the number of neighbors of this node.
Definition: node.hpp:293
std::list< Edge * > & getEdges()
Get the list of edges going out of this node.
Definition: node.hpp:281
void addNeighbor(Node *node)
Add the given node to the list of neighbors of this node.
Definition: node.hpp:299
Classe représentant une Edge d'un Graph.
Definition: edge.hpp:24
Node * randomNodeFromComp() const
tire un Node aléatoirement dans la composante connexe
Definition: node.cpp:489
void checkStopByWeight()
vérifie si le poids max du Node a été atteint
Definition: node.cpp:429
bool isLinkableMultisol(Node *node, double *dist) const
Check if two node are connectable.
Definition: node.cpp:412
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
void removeEdge(Edge *edge)
Remove the given edge from the list of edges going out of this node.
Definition: node.hpp:287
bool maximumNumberNodes()
teste si la composante connexe a atteint le nombre max de Nodes
Definition: node.cpp:449
void merge(Node *compco)
merge deux composantes connexes
Definition: node.cpp:479
void addEdge(Edge *edge)
Add the given edge to the list of edges going out of this node.
Definition: node.hpp:284
double dist(Node *N) const
calcule la distance entre deux Node et stocke la valeur dans DistNew
Definition: node.cpp:314
std::vector< Node * > computeNeighbors()
Recompute the list of neighbors of this node.
Definition: node.cpp:187
void activ(bool b)
modifie la valeur de activ
Definition: node.cpp:251
bool isActiv()
obtient la valeur de activ
Definition: node.cpp:256
std::vector< Edge * > computeEdges()
Recompute the list of edges going out of this node.
Definition: node.cpp:205
double & sumCost(bool recompute=false)
Returns the Sum of cost along the path.
Definition: node.cpp:272
unsigned int getNumberOfNodesInCompco() const
Gets the number of nodes in the connected componnent.
confPtr_t getConfiguration()
obtient la Configuration stockée
Definition: node.cpp:246
Graph * getGraph()
obtient le Graph pour lequel le Node a été créé
Definition: node.cpp:236
void deleteCompco()
detruit la composante connexe
Definition: node.cpp:443
node * getNodeStruct()
obtient la structure p3d_node
Definition: node.cpp:231
void setConnectedComponent(ConnectedComponent *compco)
Sets the compco of the node.
Definition: node.cpp:454
double cost()
obtient le cout du Node
Definition: node.cpp:261
Robot * getRobot()
obtient le Robot pour lequel le Node a été créé
Definition: node.cpp:241
unsigned int getId() const
Returns the node id.
Definition: node.cpp:173
bool & isLeaf()
returns a reference to the if leaf data the pointer is editable
Definition: node.hpp:133
std::list< Node * > & getNeighbors()
Get the list of neighbors of this node.
Definition: node.hpp:296
bool equal(Node *N) const
teste si deux Node sont égaux
Definition: node.cpp:343
void setSelectCost(double Cost)
Method for EST.
Definition: node.hpp:310
bool operator==(Node &N)
Equal operator.
Definition: node.cpp:122
Node()
Constructor.
Definition: node.cpp:33
unsigned getNumberOfEdges()
Get the number of edges going out of this node.
Definition: node.hpp:278