]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Rename pointer to rrt node member variable
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 16 Mar 2023 13:55:49 +0000 (14:55 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 16 Mar 2023 13:55:50 +0000 (14:55 +0100)
rrts/incl/rrtext.hh
rrts/src/rrtext13.cc

index c4ed0380d7795085d7c01b9858348c9c372288d5..24a206f331ba3d9406f08a1b479e9d57cf8920a7 100644 (file)
@@ -123,7 +123,7 @@ class RRTExt13 : public virtual RRTS {
 private:
        class DijkstraNode {
        public:
-               RRTNode* node = nullptr;
+               RRTNode* p_rrtnode = nullptr;
                unsigned int i = 0;
                bool v = false;
                double d = 0.0;
@@ -135,13 +135,13 @@ private:
                        this->v = true;
                        return false;
                }
-               DijkstraNode(RRTNode* n) : node(n) {}
+               DijkstraNode(RRTNode* n) : p_rrtnode(n) {}
        };
        class DijkstraNodeComparator {
        public:
                int operator() (DijkstraNode const& n1, DijkstraNode const& n2)
                {
-                       return n1.node->cc() > n2.node->cc();
+                       return n1.p_rrtnode->cc() > n2.p_rrtnode->cc();
                }
        };
        class DijkstraNodeBackwardComparator {
index d506e0b5e6712c12304b1305237c26da90314f50..1619d7bce3e583bffdcbb6e96cd89e30b1cbec41 100644 (file)
@@ -101,11 +101,11 @@ RRTExt13::dijkstra_forward()
        pq.push(this->dn_.front());
        while (!pq.empty()) {
                DijkstraNode fd = pq.top();
-               RRTNode& f = *fd.node;
+               RRTNode& f = *fd.p_rrtnode;
                pq.pop();
                this->set_bc_pose_to(f);
                for (unsigned int i = fd.i + 1; i < this->dn_.size(); i++) {
-                       RRTNode& t = *this->dn_[i].node;
+                       RRTNode& t = *this->dn_[i].p_rrtnode;
                        if (!this->_bc.drivable(t)) {
                                continue;
                        }
@@ -143,12 +143,12 @@ RRTExt13::dijkstra_backward()
        pq.push(this->dn_.front());
        while (!pq.empty()) {
                DijkstraNode td = pq.top();
-               RRTNode& t = *td.node;
+               RRTNode& t = *td.p_rrtnode;
                pq.pop();
                this->set_bc_pose_to(t);
                for (unsigned int i = td.i; i > 0; i--) {
                        DijkstraNode& fd = this->dn_[i];
-                       RRTNode& f = *this->dn_[i].node;
+                       RRTNode& f = *this->dn_[i].p_rrtnode;
                        if (!this->_bc.drivable(f)) {
                                continue;
                        }