unsigned int i = 0;
bool v = false;
double d = 0.0;
- bool vi();
- DijkstraNode(RRTNode* n);
+ bool vi()
+ {
+ if (this->v) {
+ return true;
+ }
+ this->v = true;
+ return false;
+ }
+ DijkstraNode(RRTNode* n) : node(n) {}
};
class DijkstraNodeComparator {
public:
- int operator() (DijkstraNode const& n1, DijkstraNode const& n2);
+ int operator() (DijkstraNode const& n1, DijkstraNode const& n2)
+ {
+ return n1.node->cc() > n2.node->cc();
+ }
};
class DijkstraNodeBackwardComparator {
public:
- int operator() (DijkstraNode const& n1, DijkstraNode const& n2);
+ int operator() (DijkstraNode const& n1, DijkstraNode const& n2)
+ {
+ return n1.d > n2.d;
+ }
};
std::vector<RRTNode*> opath_;
double ogoal_cc_ = 0.0;
namespace rrts {
-RRTExt13::DijkstraNode::DijkstraNode(RRTNode* n) : node(n)
-{
-}
-
-bool
-RRTExt13::DijkstraNode::vi()
-{
- if (this->v) {
- return true;
- }
- this->v = true;
- return false;
-}
-
-int
-RRTExt13::DijkstraNodeComparator::operator() (DijkstraNode const& n1,
- DijkstraNode const& n2)
-{
- return n1.node->cc() > n2.node->cc();
-}
-
-int
-RRTExt13::DijkstraNodeBackwardComparator::operator() (DijkstraNode const& n1,
- DijkstraNode const& n2)
-{
- return n1.d > n2.d;
-}
-
void
RRTExt13::interesting_forward()
{