]> rtime.felk.cvut.cz Git - hubacji1/psp.git/commitdiff
Rename `possible_inits` to `possible_goals`
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 19 Sep 2019 12:59:23 +0000 (14:59 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 19 Sep 2019 12:59:23 +0000 (14:59 +0200)
api/psp.h
src/psp.cc
ut/psp.t.cc

index 4c71d3e455ab53adc142526ba25c6ef9508a3d0f..91e0b9c07a35e3fe3ce638f71832298c45fdbbbd 100644 (file)
--- a/api/psp.h
+++ b/api/psp.h
@@ -71,13 +71,13 @@ class PSPlanner {
                 \param cnt Number of inits.
                 \param dist Distance between inits.
                 */
-                std::vector<BicycleCar> possible_inits(
+                std::vector<BicycleCar> possible_goals(
                         unsigned int cnt,
                         double dist
                 );
-                std::vector<BicycleCar> possible_inits()
+                std::vector<BicycleCar> possible_goals()
                 {
-                        return this->possible_inits(10, 1);
+                        return this->possible_goals(10, 1);
                 }
 
                 // find entry
index 449b9a5aa59fa5a58cca83cb72f5ac8bdf4500ab..d4471fb2647c02de242c37275dfc06a5cec5e432 100644 (file)
@@ -250,7 +250,7 @@ bool PSPlanner::parked()
                 && inside(this->gc().rfx(), this->gc().rfy(), slot);
 }
 
-std::vector<BicycleCar> PSPlanner::possible_inits(
+std::vector<BicycleCar> PSPlanner::possible_goals(
         unsigned int cnt,
         double dist
 )
index e663b75b22381be88941c136d9cb706a5e6f0466..c9278b6aa3f4add585b422bb737b0a74ba43a0d7 100644 (file)
@@ -147,9 +147,9 @@ WVTEST_MAIN("possible goals test")
         WVPASSEQ_DOUBLE(psp.gc().x() + 1, psp.cc().x(), 0.00001);
         WVPASSEQ_DOUBLE(psp.gc().y(), psp.cc().y(), 0.00001);
         WVPASSEQ_DOUBLE(psp.gc().h(), psp.cc().h(), 0.00001);
-        WVPASS(psp.possible_inits().size() > 0);
+        WVPASS(psp.possible_goals().size() > 0);
         double i = 1;
-        for (auto &c: psp.possible_inits()) {
+        for (auto &c: psp.possible_goals()) {
                 WVPASSEQ_DOUBLE(psp.gc().x() + 1 + i, c.x(), 0.00001);
                 WVPASSEQ_DOUBLE(psp.gc().y(), c.y(), 0.00001);
                 WVPASSEQ_DOUBLE(psp.gc().h(), c.h(), 0.00001);