Skip to content

Commit

Permalink
Clean up failed edges terminal output
Browse files Browse the repository at this point in the history
  • Loading branch information
marrts committed Nov 22, 2024
1 parent 99f54fe commit 878dfc1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,14 @@ class LadderGraph
Node<FloatType> node2 = rung2.nodes.front();
typename State<FloatType>::ConstPtr state2 = node2.sample.state;
out << "Rung # " << failed_id << "\n";
out << "\tNode 1\t|\tNode 2\t|\tDiff (Node2 - Node1)\n";
out << "\t---------------------------------------\n";
for (Eigen::Index i = 0; i < state1->values.rows(); i++)
{
out << std::setprecision(4) << std::fixed << "\t" << state1->values[i] << "\t|\t" << state2->values[i]
<< "\t|\t" << state2->values[i] - state1->values[i] << "\n";
out << std::setprecision(4) << std::fixed
<< "\t" << state1->values[i]
<< "\t|\t" << state2->values[i]
<< "\t|\t" << state2->values[i] - state1->values[i] << "\n";
}
out << "\tTotal L2 Norm: " << (state2->values - state1->values).norm() << "\n";
}
Expand Down

0 comments on commit 878dfc1

Please sign in to comment.