22#include <boost/rational.hpp>
44 std::vector<std::pair<Vertex, Vertex>>
crit_set;
60 os <<
"{\n \"version\": 1,\n \"rounds\": [\n";
61 for (std::size_t r = 0; r < trace.
rounds.size(); ++r) {
64 os <<
" {\n \"vertices\": [";
65 for (std::size_t i = 0; i < round.
vertices.size(); ++i) {
72 os <<
"],\n \"crit_set\": [";
73 for (std::size_t i = 0; i < round.
crit_set.size(); ++i) {
77 os <<
"[" << round.
crit_set[i].first <<
", " << round.
crit_set[i].second <<
"]";
80 os <<
"],\n \"theta\": [" << round.
theta.numerator() <<
", " << round.
theta.denominator() <<
"]\n";
81 os <<
" }" << (r + 1 < trace.
rounds.size() ?
",\n" :
"\n");
Graph/flow-graph type aliases, subgraph/component helpers, and demo graph generators used by cunningh...
Definition cunningham.hpp:50
void write_trace_json(std::ostream &os, const SolverTrace &trace)
Writes trace to os as versioned JSON ("version": 1).
Definition solver_trace.hpp:59
The full recorded trace of a spanning_tree_modulus run.
Definition solver_trace.hpp:48
std::vector< TraceRound > rounds
Definition solver_trace.hpp:49
One round of spanning_tree_modulus's main loop: the component it was carved from, the edge set dispat...
Definition solver_trace.hpp:41
rational< long > theta
Definition solver_trace.hpp:42
std::vector< std::pair< Vertex, Vertex > > crit_set
the dispatched edges
Definition solver_trace.hpp:44
std::vector< Vertex > vertices
the component's vertex set
Definition solver_trace.hpp:43