Skip to content
Snippets Groups Projects
Commit 7213728a authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

print() uses the NodeOther lists

parent 05ed99aa
No related branches found
No related tags found
1 merge request!346Resolve "Frame/Capture/Feature/Landmark Other as list/vectors in FactorBase"
Pipeline #5049 failed
...@@ -1088,16 +1088,24 @@ void Problem::print(int depth, std::ostream& stream, bool constr_by, bool metric ...@@ -1088,16 +1088,24 @@ void Problem::print(int depth, std::ostream& stream, bool constr_by, bool metric
for (auto c : f->getFactorList()) for (auto c : f->getFactorList())
{ {
stream << " Fac" << c->id() << " " << c->getType() << " -->"; stream << " Fac" << c->id() << " " << c->getType() << " -->";
if (c->getFrameOther() == nullptr && c->getCaptureOther() == nullptr && c->getFeatureOther() == nullptr && c->getLandmarkOther() == nullptr) if ( c->getFrameOtherList() .empty()
&& c->getCaptureOtherList() .empty()
&& c->getFeatureOtherList() .empty()
&& c->getLandmarkOtherList().empty())
stream << " Abs"; stream << " Abs";
if (c->getFrameOther() != nullptr)
stream << " Frm" << c->getFrameOther()->id(); for (const auto& Fow : c->getFrameOtherList())
if (c->getCaptureOther() != nullptr) if (!Fow.expired())
stream << " Cap" << c->getCaptureOther()->id(); stream << " Frm" << Fow.lock()->id();
if (c->getFeatureOther() != nullptr) for (const auto& Cow : c->getCaptureOtherList())
stream << " Fac" << c->getFeatureOther()->id(); if (!Cow.expired())
if (c->getLandmarkOther() != nullptr) stream << " Cap" << Cow.lock()->id();
stream << " Lmk" << c->getLandmarkOther()->id(); for (const auto& fow : c->getFeatureOtherList())
if (!fow.expired())
stream << " Ftr" << fow.lock()->id();
for (const auto& Low : c->getLandmarkOtherList())
if (!Low.expired())
stream << " Lmk" << Low.lock()->id();
stream << std::endl; stream << std::endl;
} // for c } // for c
} }
......
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