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

Improve Frame::printHeader()

parent 73c2187c
No related branches found
No related tags found
1 merge request!358WIP: Resolve "Complete state vector new data structure?"
...@@ -383,7 +383,9 @@ void FrameBase::setProblem(ProblemPtr _problem) ...@@ -383,7 +383,9 @@ void FrameBase::setProblem(ProblemPtr _problem)
void FrameBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const void FrameBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const
{ {
_stream << _tabs << (isKeyOrAux() ? (isKey() ? "KFrm" : "AFrm") : "Frm") << id() << ((_depth < 2) ? " -- " + std::to_string(getCaptureList().size()) + "C " : ""); _stream << _tabs << (isKeyOrAux() ? (isKey() ? "KFrm" : "AFrm") : "Frm") << id()
<< ", ts=" << std::setprecision(5) << getTimeStamp() << std::setprecision(2)
<< ((_depth < 2) ? " -- " + std::to_string(getCaptureList().size()) + "C " : "");
if (_constr_by) if (_constr_by)
{ {
_stream << " <-- "; _stream << " <-- ";
...@@ -393,16 +395,16 @@ void FrameBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _sta ...@@ -393,16 +395,16 @@ void FrameBase::printHeader(int _depth, bool _constr_by, bool _metric, bool _sta
_stream << std::endl; _stream << std::endl;
if (_metric && _state_blocks){ if (_metric && _state_blocks){
// _stream << _tabs << " " << "ts=" << std::setprecision(5) << getTimeStamp() << std::endl;
for (const auto& key : getStructure()) for (const auto& key : getStructure())
{ {
auto sb = getStateBlock(key); auto sb = getStateBlock(key);
_stream << " " << key << "[" << (sb->isFixed() ? "Fix" : "Est") << "] = ( " << sb->getState().transpose() << " )" << std::endl; _stream << _tabs << " " << key << "[" << (sb->isFixed() ? "Fix" : "Est") << "] = ( " << sb->getState().transpose() << " )" << std::endl;
} }
} }
else if (_metric) else if (_metric)
{ {
_stream << _tabs << " " << (isFixed() ? "Fix" : "Est") << ", ts=" << std::setprecision(5) _stream << _tabs << " " << (isFixed() ? "Fix" : "Est"); // << ", ts=" << std::setprecision(5) << getTimeStamp();
<< getTimeStamp();
_stream << ",\t x = ( " << std::setprecision(2) << getStateVector().transpose() << " )"; _stream << ",\t x = ( " << std::setprecision(2) << getStateVector().transpose() << " )";
_stream << std::endl; _stream << std::endl;
} }
......
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