From 58e114a908edc7d1e899245ce0a46392c3c4df88 Mon Sep 17 00:00:00 2001
From: jcasals <jcasals@iri.upc.edu>
Date: Fri, 27 Mar 2020 16:20:40 +0100
Subject: [PATCH] Modify Wolf elements' labels in Problem::check()

---
 src/problem/problem.cpp | 72 ++++++++++++++++++++---------------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp
index e13584ac4..afdad5f0f 100644
--- a/src/problem/problem.cpp
+++ b/src/problem/problem.cpp
@@ -1399,7 +1399,7 @@ bool Problem::check(int verbose_level) const
     auto P_raw = this;
     if (verbose_level > 0)
     {
-        cout << "P @ " << P_raw << endl;
+        cout << "Prb @ " << P_raw << endl;
     }
     // ------------------------
     //     HARDWARE branch
@@ -1407,7 +1407,7 @@ bool Problem::check(int verbose_level) const
     auto H = hardware_ptr_;
     if (verbose_level > 0)
     {
-        cout << "H @ " << H.get() << endl;
+        cout << "Hrw @ " << H.get() << endl;
     }
     // check pointer to Problem
     // is_consistent = is_consistent && (H->getProblem().get() == P_raw);
@@ -1424,9 +1424,9 @@ bool Problem::check(int verbose_level) const
     {
         if (verbose_level > 0)
         {
-            cout << "  S" << S->id() << " @ " << S.get() << endl;
-            cout << "    -> P @ " << S->getProblem().get() << endl;
-            cout << "    -> H @ " << S->getHardware().get() << endl;
+            cout << "  Sen" << S->id() << " @ " << S.get() << endl;
+            cout << "    -> Prb @ " << S->getProblem().get() << endl;
+            cout << "    -> Hrw @ " << S->getHardware().get() << endl;
             for (auto pair: S->getStateBlockMap())
             {
                 auto sb = pair.second;
@@ -1460,9 +1460,9 @@ bool Problem::check(int verbose_level) const
         {
             if (verbose_level > 0)
             {
-                cout << "    p" << p->id() << " @ " << p.get() << " -> S" << p->getSensor()->id() << endl;
-                cout << "      -> P  @ " << p->getProblem().get() << endl;
-                cout << "      -> S" << p->getSensor()->id() << " @ " << p->getSensor().get() << endl;
+                cout << "    Prc" << p->id() << " @ " << p.get() << " -> Sen" << p->getSensor()->id() << endl;
+                cout << "      -> Prb  @ " << p->getProblem().get() << endl;
+                cout << "      -> Sen" << p->getSensor()->id() << " @ " << p->getSensor().get() << endl;
             }
             // check problem and sensor pointers
 
@@ -1489,7 +1489,7 @@ bool Problem::check(int verbose_level) const
     auto T = trajectory_ptr_;
     if (verbose_level > 0)
     {
-        cout << "T @ " << T.get() << endl;
+        cout << "Trj @ " << T.get() << endl;
     }
     // check pointer to Problem
     // is_consistent = is_consistent && (T->getProblem().get() == P_raw);
@@ -1505,10 +1505,10 @@ bool Problem::check(int verbose_level) const
     for (auto F : T->getFrameList())
     {
       if (verbose_level > 0) {
-        cout << (F->isKeyOrAux() ? (F->isKey() ? "  KF" : " EF") : "  F")
+        cout << (F->isKeyOrAux() ? (F->isKey() ? "  KFrm" : " EFrm") : "  Frm")
              << F->id() << " @ " << F.get() << endl;
-        cout << "    -> P @ " << F->getProblem().get() << endl;
-        cout << "    -> T @ " << F->getTrajectory().get() << endl;
+        cout << "    -> Prb @ " << F->getProblem().get() << endl;
+        cout << "    -> Trj @ " << F->getTrajectory().get() << endl;
       }
       for (const auto &pair: F->getStateBlockMap()) {
           auto sb = pair.second;
@@ -1559,7 +1559,7 @@ bool Problem::check(int verbose_level) const
             std::stringstream().swap(inconsistency_explanation);
           }
           if (verbose_level > 0) {
-            cout << "    <- c" << cby->id() << " -> F"
+            cout << "    <- c" << cby->id() << " -> Frm"
                  << cby->getFrameOther()->id() << endl;
           }
             // check constrained_by pointer to this frame
@@ -1591,12 +1591,12 @@ bool Problem::check(int verbose_level) const
         {
             if (verbose_level > 0)
             {
-                cout << "    C" << C->id() << " @ " << C.get() << " -> S";
+                cout << "    Cap" << C->id() << " @ " << C.get() << " -> Sen";
                 if (C->getSensor()) cout << C->getSensor()->id();
                 else cout << "-";
                 cout << endl;
-                cout << "      -> P  @ " << C->getProblem().get() << endl;
-                cout << "      -> F" << C->getFrame()->id() << " @ " << C->getFrame().get() << endl;
+                cout << "      -> Prb  @ " << C->getProblem().get() << endl;
+                cout << "      -> Frm" << C->getFrame()->id() << " @ " << C->getFrame().get() << endl;
             }
                 for (auto pair: C->getStateBlockMap())
                 {
@@ -1635,9 +1635,9 @@ bool Problem::check(int verbose_level) const
             {
                 if (verbose_level > 0)
                 {
-                    cout << "      f" << f->id() << " @ " << f.get() << endl;
-                    cout << "        -> P  @ " << f->getProblem().get() << endl;
-                    cout << "        -> C" << f->getCapture()->id() << " @ " << f->getCapture().get()
+                    cout << "      Ftr" << f->id() << " @ " << f.get() << endl;
+                    cout << "        -> Prb  @ " << f->getProblem().get() << endl;
+                    cout << "        -> Cap" << f->getCapture()->id() << " @ " << f->getCapture().get()
                             << endl;
                 }
                 // check problem and capture pointers
@@ -1661,7 +1661,7 @@ bool Problem::check(int verbose_level) const
                 {
                     if (verbose_level > 0)
                     {
-                        cout << "     <- c" << cby->id() << " -> f" << cby->getFeatureOther()->id() << endl;
+                        cout << "     <- c" << cby->id() << " -> Ftr" << cby->getFeatureOther()->id() << endl;
                     }
                     // check constrained_by pointer to this feature
                     // is_consistent = is_consistent && (cby->getFeatureOther() == f);
@@ -1677,7 +1677,7 @@ bool Problem::check(int verbose_level) const
                 for (auto c : f->getFactorList())
                 {
                     if (verbose_level > 0)
-                        cout << "        c" << c->id() << " @ " << c.get();
+                        cout << "        Fac" << c->id() << " @ " << c.get();
 
                     auto Fo = c->getFrameOther();
                     auto Co = c->getCaptureOther();
@@ -1694,12 +1694,12 @@ bool Problem::check(int verbose_level) const
                     if ( Fo )  // case FRAME:
                     {
                         if (verbose_level > 0)
-                            cout << " --> F" << Fo->id() << " <- ";
+                            cout << " --> Frm" << Fo->id() << " <- ";
                         bool found = false;
                         for (auto cby : Fo->getConstrainedByList())
                         {
                             if (verbose_level > 0)
-                                cout << " c" << cby->id();
+                                cout << " Fac" << cby->id();
                             found = found || (c == cby);
                         }
                         if (verbose_level > 0)
@@ -1719,12 +1719,12 @@ bool Problem::check(int verbose_level) const
                     if ( Co )  // case CAPTURE:
                     {
                         if (verbose_level > 0)
-                            cout << " --> C" << Co->id() << " <- ";
+                            cout << " --> Cap" << Co->id() << " <- ";
                         bool found = false;
                         for (auto cby : Co->getConstrainedByList())
                         {
                             if (verbose_level > 0)
-                                cout << " c" << cby->id();
+                                cout << " Fac" << cby->id();
                             found = found || (c == cby);
                         }
                         if (verbose_level > 0)
@@ -1744,12 +1744,12 @@ bool Problem::check(int verbose_level) const
                     if ( fo )   // case FEATURE:
                     {
                         if (verbose_level > 0)
-                            cout << " --> f" << fo->id() << " <- ";
+                            cout << " --> Ftr" << fo->id() << " <- ";
                         bool found = false;
                         for (auto cby : fo->getConstrainedByList())
                         {
                             if (verbose_level > 0)
-                                cout << " c" << cby->id();
+                                cout << " Fac" << cby->id();
                             found = found || (c == cby);
                         }
                         if (verbose_level > 0)
@@ -1768,12 +1768,12 @@ bool Problem::check(int verbose_level) const
                     if ( Lo )      // case LANDMARK:
                     {
                         if (verbose_level > 0)
-                            cout << " --> L" << Lo->id() << " <- ";
+                            cout << " --> Lmk" << Lo->id() << " <- ";
                         bool found = false;
                         for (auto cby : Lo->getConstrainedByList())
                         {
                             if (verbose_level > 0)
-                                cout << " c" << cby->id();
+                                cout << " Fac" << cby->id();
                             found = found || (c == cby);
                         }
                         if (verbose_level > 0)
@@ -1789,8 +1789,8 @@ bool Problem::check(int verbose_level) const
                     }
                     if (verbose_level > 0)
                     {
-                        cout << "          -> P  @ " << c->getProblem().get() << endl;
-                        cout << "          -> f" << c->getFeature()->id() << " @ " << c->getFeature().get() << endl;
+                        cout << "          -> Prb  @ " << c->getProblem().get() << endl;
+                        cout << "          -> Ftr" << c->getFeature()->id() << " @ " << c->getFeature().get() << endl;
                     }
                     // check problem and feature pointers
                     // is_consistent = is_consistent && (c->getProblem().get() == P_raw);
@@ -1887,7 +1887,7 @@ bool Problem::check(int verbose_level) const
     // ------------------------
     auto M = map_ptr_;
     if (verbose_level > 0)
-        cout << "M @ " << M.get() << endl;
+        cout << "Map @ " << M.get() << endl;
     // check pointer to Problem
     // is_consistent = is_consistent && (M->getProblem().get() == P_raw);
 
@@ -1901,9 +1901,9 @@ bool Problem::check(int verbose_level) const
     {
         if (verbose_level > 0)
         {
-            cout << "  L" << L->id() << " @ " << L.get() << endl;
-            cout << "  -> P @ " << L->getProblem().get() << endl;
-            cout << "  -> M @ " << L->getMap().get() << endl;
+            cout << "  Lmk" << L->id() << " @ " << L.get() << endl;
+            cout << "  -> Prb @ " << L->getProblem().get() << endl;
+            cout << "  -> Map @ " << L->getMap().get() << endl;
             for (const auto& pair : L->getStateBlockMap())
             {
                 auto sb = pair.second;
@@ -1939,7 +1939,7 @@ bool Problem::check(int verbose_level) const
 
         for (auto cby : L->getConstrainedByList()) {
           if (verbose_level > 0)
-            cout << "      <- c" << cby->id() << " -> L"
+            cout << "      <- Fac" << cby->id() << " -> Lmk"
                  << cby->getLandmarkOther()->id() << endl;
           // check constrained_by pointer to this landmark
           // is_consistent =
-- 
GitLab