Class Print
cpp/examples/examples_common.h.
WHAT A TWIN PRINTS IS READ BY A PARSER, not by a person. parity-static
scrapes a row's stdout with the shared comparator
(parity-static/_compare_vendor.py), so a banner, a bare scalar and a
table header are part of the result and not decoration: a twin that computes
the right number and prints it in a shape the parser does not recognise
compares no cell and reports as green while asserting nothing.
WHERE THE JAR HAS NO SOLVER the twin says so BY NAME through
na(String, String) and moves on. A refusal is information; answering
a SolverJMT block with the MVA number is a silent solver
substitution, which is the defect the harness's ported-solver list exists to
prevent.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe AvgTable header, the eight columnsgetAvgTablecarries.static voidavgRow(String station, String jobClass, double qlen, double util, double respt, double residt, double arvr, double tput) One AvgTable row, at the column widthsavgHeader()declares.static voidbare(double value) The scalar ON A LINE OF ITS OWN, beside the labelled one.static Stringg(double v, int sig) C's%.<sig>g:sigsignificant digits with the trailing zeros stripped, which Java's own%gdoes not do.static voidOne labelled scalar, the shape a reference script prints a system metric in.static voidstatic voidThe solver this twin does not carry, refused by name.static voidA line of prose, printed as the reference prints it.static voidThe banner a reference script prints before each solver block.
-
Method Details
-
section
The banner a reference script prints before each solver block. -
note
A line of prose, printed as the reference prints it. -
na
The solver this twin does not carry, refused by name.whynames what the reference example asked for, so a reader can tell a missing engine from a model the JAR cannot express. The harness reads theSOLVER:/N/A:pair and EXCUSES that solver's golden table rather than reporting it missing. -
kv
One labelled scalar, the shape a reference script prints a system metric in. -
kv
-
bare
public static void bare(double value) The scalar ON A LINE OF ITS OWN, beside the labelled one.A reference script with no table to print puts its result bare --
print(pr_ctmc)in the Python twin -- andparse_optimization_scalarscrapes exactly that: the FIRST bare float in (0, 100). A labelledkey: valueline is neither a table nor a bare scalar and is read by nothing, so without this the twin computes the right number and the row still compares no cell. Call it once per example, for the quantity the reference prints bare.Printed at 17 significant digits, the round-trip width of a double: the golden holds the reference's full precision (0.0003484356916108198) and the six-digit
kv(java.lang.String, double)form would compare a rounded number. -
g
C's%.<sig>g:sigsignificant digits with the trailing zeros stripped, which Java's own%gdoes not do.It matters beyond looks. The avg-table columns below are parsed as floats, and the reference tables this twin is compared against are printed by C and by Python, both of which strip; a column of
0.340000against a golden of0.34parses identically but a DIFF of the two transcripts does not, and that diff is how a twin is checked by hand. -
avgHeader
public static void avgHeader()The AvgTable header, the eight columnsgetAvgTablecarries. -
avgRow
public static void avgRow(String station, String jobClass, double qlen, double util, double respt, double residt, double arvr, double tput) One AvgTable row, at the column widthsavgHeader()declares.
-