]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
F 179e12c
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 30 Jun 2021 06:51:29 +0000 (08:51 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 30 Jun 2021 06:51:29 +0000 (08:51 +0200)
src/rrtext3.cc

index 9db9c78b93f08312b15c5871760c52769e56b431..aff866c0325d093c41b74e2023285a85aedb2861 100644 (file)
@@ -8,7 +8,7 @@ std::vector<RRTNode *> RRTExt3::first_path_optimization()
                 if (this->orig_path().size() == 0)
                         return this->orig_path();
                 else
-                        this->orig_path_cost(cc(*this->orig_path().back()));
+                        this->orig_path_cost(this->orig_path().back()->cc);
         }
         class DijkstraNode : public RRTNode {
                 public:
@@ -55,14 +55,14 @@ std::vector<RRTNode *> RRTExt3::first_path_optimization()
                         || n->t(RRTNodeType::connected)
                 ) {
                         dn.push_back(DijkstraNode(*n));
-                        dn.back().cc = cc(*n);
+                        dn.back().cc = n->cc;
                         dn.back().s = &dn.back();
                         dn.back().n = n;
                         dn.back().i = dncnt++;
                 }
         }
         dn.push_back(DijkstraNode(*this->orig_path().back()));
-        dn.back().cc = cc(*this->orig_path().back());
+        dn.back().cc = this->orig_path().back()->cc;
         dn.back().s = &dn.back();
         dn.back().n = this->orig_path().back();
         dn.back().i = dncnt++;
@@ -162,14 +162,14 @@ std::vector<RRTNode *> RRTExt3::second_path_optimization()
                         || n->t(RRTNodeType::connected)
                 ) {
                         dn.push_back(DijkstraNode(*n));
-                        dn.back().cc = cc(*n);
+                        dn.back().cc = n->cc;
                         dn.back().s = &dn.back();
                         dn.back().n = n;
                         dn.back().i = dncnt++;
                 }
         }
         dn.push_back(DijkstraNode(*this->orig_path().back()));
-        dn.back().cc = cc(*this->orig_path().back());
+        dn.back().cc = this->orig_path().back()->cc;
         dn.back().s = &dn.back();
         dn.back().n = this->orig_path().back();
         dn.back().i = dncnt++;
@@ -229,7 +229,7 @@ std::vector<RRTNode *> RRTExt3::path()
         this->first_optimized_path_ = this->first_path_optimization();
         if (this->first_optimized_path_.size() > 0)
                 this->first_optimized_path_cost(
-                        cc(*this->first_optimized_path_.back())
+                        this->first_optimized_path_.back()->cc
                 );
         else
                 return this->orig_path();