Package de.labathome.trustconstr.report
Class ReportBase
java.lang.Object
de.labathome.trustconstr.report.ReportBase
- Direct Known Subclasses:
BasicReport,IPReport,SQPReport
Abstract base for trust-constr per-iteration progress reports.
Counterpart to scipy's
_trustregion_constr/report.py:ReportBase.
Concrete subclasses (BasicReport, SQPReport,
IPReport) define column names, widths, and per-iteration
format strings; this base handles the actual rendering of the header,
data rows, and footer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String[]protected abstract int[]protected abstract String[]Per-columnFormatterformat specs (e.g.voidPrint a blank line as the report footer.voidprintFooter(PrintStream out) Print the footer to a specified target (used by tests).voidPrint the column header line and a separator.voidprintHeader(PrintStream out) Print the column header to a specified target (used by tests).voidprintIteration(PrintStream out, Object... values) Print a single iteration row to a specified target (used by tests).voidprintIteration(Object... values) Print a single iteration row toSystem.out.
-
Constructor Details
-
ReportBase
public ReportBase()
-
-
Method Details
-
columnNames
- Returns:
- per-column header labels
-
columnWidths
protected abstract int[] columnWidths()- Returns:
- per-column display widths (number of characters per cell)
-
iterationFormats
Per-columnFormatterformat specs (e.g."^7"for a centered 7-char field,"^+13.4e"for centered scientific notation). The leading%and trailings/f/etc. are added byprintIteration(java.lang.Object...).- Returns:
- per-column format specs, parallel to
columnNames()
-
printHeader
public void printHeader()Print the column header line and a separator. Output goes toSystem.out(writeable target tests can overrideSystem.setOut(PrintStream)). -
printHeader
Print the column header to a specified target (used by tests).- Parameters:
out- target stream
-
printIteration
Print a single iteration row toSystem.out.- Parameters:
values- per-column values, in the order matchingcolumnNames()anditerationFormats()
-
printIteration
Print a single iteration row to a specified target (used by tests).- Parameters:
out- target streamvalues- per-column values, in column order
-