]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Rename entries to ispaths
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 20 Jan 2022 18:18:10 +0000 (19:18 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 20 Jan 2022 18:18:10 +0000 (19:18 +0100)
In-slot paths is better name as the variable is a vector of vectors.
Moreover, entries will be used for just entries in the following
patches.

incl/pslot.hh
src/entry_positions_range.cc
src/gen_for_gnuplot.cc
src/prove_parallel_slot.cc
src/pslot.cc

index 7cf2b42822a2863da88248fc339a25e819089489..542341288c279c93fb2ddfc21350e8fc6d321156 100644 (file)
@@ -32,7 +32,7 @@ private:
        Line _curb;
        Line _front;
 public:
-       std::vector<std::vector<BicycleCar>> _entries;
+       std::vector<std::vector<BicycleCar>> _ispaths;
        /*! \brief Set parking slot.
 
        \param p Point with `x`, `y` coordinates of entry side's corner.
index e0e18d29740ef8c9a58f713177776942294d9259..a86857005d12a96a16a38720134cd473f3741a53 100644 (file)
@@ -52,10 +52,10 @@ int main(int argc, char** argv)
                double d = 0;
                double fd = 0;
                unsigned int cd = 0;
-               if (s._entries.size() > 0) {
-                       for (unsigned int i = 1; i < s._entries.size(); i++) {
-                               double dd = std::abs(s._entries[i].front().h()
-                                       - s._entries[i - 1].front().h());
+               if (s._ispaths.size() > 0) {
+                       for (unsigned int i = 1; i < s._ispaths.size(); i++) {
+                               double dd = std::abs(s._ispaths[i].front().h()
+                                       - s._ispaths[i - 1].front().h());
                                if (dd <= 0.0001) {
                                        d += dd;
                                } else {
index 8b6a5cb01305e26f93b4714cbf9645ea7d725bea..491b42cc05ae2e2bd7f04bb42940356714604938 100644 (file)
@@ -117,7 +117,7 @@ main()
        P(RR_POINT)
 
        for (auto& m: V) {
-               m.c = s._entries.front().front();
+               m.c = s._ispaths.front().front();
                m.c.sp(m.c.sp() * -1.0);
                m.c.st(m.c.st() * -1.0);
        }
index fe361d359635f2b26b7cbe0900c97cef9360c65a..dd46f45bb41bd1881b719f1d3b6943d7cc00b839 100644 (file)
@@ -87,9 +87,9 @@ int main(int argc, char** argv)
                                        && pr.e() == 0.0)) {
                                std::cout << w << " " << len << " ";
                                std::cout << max_cusp << " ";
-                               std::cout << s._entries.size() << " ";
-                               auto f = s._entries.front().front();
-                               auto b = s._entries.back().front();
+                               std::cout << s._ispaths.size() << " ";
+                               auto f = s._ispaths.front().front();
+                               auto b = s._ispaths.back().front();
                                std::cout << f.x() << " " << f.y() << " ";
                                std::cout << f.h() << " ";
                                std::cout << b.x() << " " << b.y() << " ";
index b1a17dad1d2b8b8b81bc555fd2e9217faeaf8577..f791e15993bde17e04dafc2f002885a9d787a41b 100644 (file)
@@ -386,18 +386,18 @@ ParkingSlot::fe(BicycleCar c)
        for (auto s: starts) {
                auto r = this->drive_in_slot(s);
                if (r.size() > 0) {
-                       this->_entries.push_back(r);
+                       this->_ispaths.push_back(r);
                }
        }
-       if (this->_entries.size() == 0) {
+       if (this->_ispaths.size() == 0) {
                return PoseRange(Pose(0.0, 0.0, 0.0), Pose(0.0, 0.0, 0.0));
        }
-       if (this->_entries.size() == 1) {
-               auto f = this->_entries.front().front();
+       if (this->_ispaths.size() == 1) {
+               auto f = this->_ispaths.front().front();
                return PoseRange(f, f);
        }
-       auto& c1 = this->_entries.front().front();
-       auto& c2 = this->_entries.back().front();
+       auto& c1 = this->_ispaths.front().front();
+       auto& c2 = this->_ispaths.back().front();
        PoseRange p(c1, c2);
        if (swapped) {
                this->swap_side();