]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Add ext17, ext18
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Fri, 23 Jul 2021 09:18:32 +0000 (11:18 +0200)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Tue, 27 Jul 2021 15:10:19 +0000 (17:10 +0200)
CMakeLists.txt
incl/rrtext.hh
src/rrtext17.cc [new file with mode: 0644]
src/rrtext18.cc [new file with mode: 0644]

index 882a8ff539cc7a0c222fd69490c1dcbb535b06fe..963aefc26b5de362ffb8748dc1d9c4d940f70e2b 100644 (file)
@@ -17,6 +17,8 @@ link_libraries(jsoncpp_lib)
 
 add_library(rrts STATIC
        src/rrts.cc
+       src/rrtext18.cc
+       src/rrtext17.cc
        src/rrtext16.cc
        src/rrtext15.cc
        src/rrtext14.cc
index d6f3a4f12e7d4d6a0129f1184892fbfebe1a1089..dba83fa258d144e52b947b6663185fec49197f36 100644 (file)
 
 namespace rrts {
 
+class RRTExt18 : public virtual RRTS {
+private:
+       bool should_finish() const;
+};
+
+class RRTExt17 : public virtual RRTS {
+private:
+       bool should_finish() const;
+};
+
 class RRTExt16 : public virtual RRTS {
 private:
        void steer(RRTNode const& f, RRTNode const& t);
diff --git a/src/rrtext17.cc b/src/rrtext17.cc
new file mode 100644 (file)
index 0000000..d791b6d
--- /dev/null
@@ -0,0 +1,11 @@
+#include "rrtext.hh"
+
+namespace rrts {
+
+bool
+RRTExt17::should_finish() const
+{
+       return this->goal_.p() != nullptr || this->icnt_ > 1000;
+}
+
+} // namespace rrts
diff --git a/src/rrtext18.cc b/src/rrtext18.cc
new file mode 100644 (file)
index 0000000..b3a9b75
--- /dev/null
@@ -0,0 +1,11 @@
+#include "rrtext.hh"
+
+namespace rrts {
+
+bool
+RRTExt18::should_finish() const
+{
+       return this->icnt_ > 1000;
+}
+
+} // namespace rrts