Skip to content
Snippets Groups Projects
Commit a10fe38f authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Labels name fix @problem::check

parent 4273bdbd
No related branches found
No related tags found
1 merge request!348WIP: Resolve "Rework Problem::{check,print} into a recursive approach"
Pipeline #5203 failed
......@@ -1113,7 +1113,7 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
if (_verbose)
{
_stream << " <- c" << cby->id() << " -> ";
_stream << " <- Fac" << cby->id() << " -> ";
for (const auto& Fow : cby->getFrameOtherList())
_stream << " F" << Fow.lock()->id() << std::endl;
}
......@@ -1187,9 +1187,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
if (_verbose)
{
_stream << " <- c" << cby->id() << " -> ";
_stream << " <- Fac" << cby->id() << " -> ";
for (const auto& Cow : cby->getCaptureOtherList())
_stream << " C" << Cow.lock()->id();
_stream << " Cap" << Cow.lock()->id();
_stream << std::endl;
}
......@@ -1242,9 +1242,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
if (_verbose)
{
_stream << " <- c" << cby->id() << " -> ";
_stream << " <- Fac" << cby->id() << " -> ";
for (const auto& fow : cby->getFeatureOtherList())
_stream << " f" << fow.lock()->id();
_stream << " Ftr" << fow.lock()->id();
_stream << std::endl;
}
......@@ -1278,9 +1278,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
const auto& Fo = Fow.lock();
if (_verbose)
{
_stream << " ( --> F" << Fo->id() << " <- ";
_stream << " ( --> Frm" << Fo->id() << " <- ";
for (auto cby : Fo->getConstrainedByList())
_stream << " c" << cby->id();
_stream << " Fac" << cby->id();
}
// check constrained_by pointer in constrained frame
......@@ -1303,9 +1303,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
if (_verbose)
{
_stream << " ( --> C" << Co->id() << " <- ";
_stream << " ( --> Cap" << Co->id() << " <- ";
for (auto cby : Co->getConstrainedByList())
_stream << " c" << cby->id();
_stream << " Fac" << cby->id();
}
// check constrained_by pointer in constrained frame
......@@ -1327,9 +1327,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
const auto& fo = fow.lock();
if (_verbose)
{
_stream << " ( --> f" << fo->id() << " <- ";
_stream << " ( --> Ftr" << fo->id() << " <- ";
for (auto cby : fo->getConstrainedByList())
_stream << " c" << cby->id();
_stream << " Fac" << cby->id();
}
// check constrained_by pointer in constrained feature
......@@ -1351,9 +1351,9 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
if (_verbose)
{
_stream << " ( --> L" << Lo->id() << " <- ";
_stream << " ( --> Lmk" << Lo->id() << " <- ";
for (auto cby : Lo->getConstrainedByList())
_stream << " c" << cby->id();
_stream << " Fac" << cby->id();
}
// check constrained_by pointer in constrained landmark
......@@ -1406,12 +1406,12 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
// find in own Frame
found_here = F->hasStateBlock(sb);
if (found_here && _verbose) _stream << " F" << F->id();
if (found_here && _verbose) _stream << " Frm" << F->id();
found = found || found_here;
// find in own Capture
found_here = C->hasStateBlock(sb);
if (found_here && _verbose) _stream << " C" << C->id();
if (found_here && _verbose) _stream << " Cap" << C->id();
found = found || found_here;
// Find in other Captures of the own Frame
......@@ -1419,7 +1419,7 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
for (auto FC : F->getCaptureList())
{
found_here = FC->hasStateBlock(sb);
if (found_here && _verbose) _stream << " F" << F->id() << ".C" << FC->id();
if (found_here && _verbose) _stream << " Frm" << F->id() << ".Cap" << FC->id();
found = found || found_here;
}
......@@ -1427,7 +1427,7 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
if (S)
{
found_here = S->hasStateBlock(sb);
if (found_here && _verbose) _stream << " S" << S->id();
if (found_here && _verbose) _stream << " Sen" << S->id();
found = found || found_here;
}
......@@ -1439,14 +1439,14 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
const auto& Fo = Fow.lock();
found_here = Fo->hasStateBlock(sb);
if (found_here && _verbose) _stream << " Fo" << Fo->id();
if (found_here && _verbose) _stream << " FrmO" << Fo->id();
found = found || found_here;
// find in feature other's captures
for (auto FoC : Fo->getCaptureList())
{
found_here = FoC->hasStateBlock(sb);
if (found_here && _verbose) _stream << " Fo" << Fo->id() << ".C" << FoC->id();
if (found_here && _verbose) _stream << " FrmO" << Fo->id() << ".C" << FoC->id();
found = found || found_here;
}
......@@ -1460,7 +1460,7 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
const auto& Co = Cow.lock();
found_here = Co->hasStateBlock(sb);
if (found_here && _verbose) _stream << " Co" << Co->id();
if (found_here && _verbose) _stream << " CapO" << Co->id();
found = found || found_here;
}
}
......@@ -1474,19 +1474,19 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
// find in constrained feature's Frame
auto foF = fo->getFrame();
found_here = foF->hasStateBlock(sb);
if (found_here && _verbose) _stream << " foF" << foF->id();
if (found_here && _verbose) _stream << " FtrOF" << foF->id();
found = found || found_here;
// find in constrained feature's Capture
auto foC = fo->getCapture();
found_here = foC->hasStateBlock(sb);
if (found_here && _verbose) _stream << " foC" << foC->id();
if (found_here && _verbose) _stream << " FtrOC" << foC->id();
found = found || found_here;
// find in constrained feature's Sensor
auto foS = fo->getCapture()->getSensor();
found_here = foS->hasStateBlock(sb);
if (found_here && _verbose) _stream << " foS" << foS->id();
if (found_here && _verbose) _stream << " FtrOS" << foS->id();
found = found || found_here;
}
}
......@@ -1498,7 +1498,7 @@ bool Problem::check(bool _verbose, std::ostream& _stream) const
{
const auto& Lo = Low.lock();
found_here = Lo->hasStateBlock(sb);
if (found_here && _verbose) _stream << " Lo" << Lo->id();
if (found_here && _verbose) _stream << " LmkO" << Lo->id();
found = found || found_here;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment