pub trait IterationOutput {
// Provided methods
fn write_output(&mut self) { ... }
fn format_row(
&mut self,
_data: &IpoptDataHandle,
_cq: &IpoptCqHandle,
) -> String { ... }
fn printed_objective_inf_pr(
&mut self,
_data: &IpoptDataHandle,
_cq: &IpoptCqHandle,
) -> Option<(f64, f64)> { ... }
fn is_restoration(&self) -> bool { ... }
}Expand description
Strategy that emits one row of the iter-by-iter table. The default
write_output is a no-op so structural unit tests can drive the
algorithm without an output sink. Phase 7 ports OrigIterationOutput
with the full upstream column format.
Provided Methods§
fn write_output(&mut self)
Sourcefn format_row(&mut self, _data: &IpoptDataHandle, _cq: &IpoptCqHandle) -> String
fn format_row(&mut self, _data: &IpoptDataHandle, _cq: &IpoptCqHandle) -> String
Format the next iteration row into a fresh String, given the
current data + CQ snapshots. Default returns an empty string.
Mirrors IpOrigIterationOutput::WriteOutput minus the
journalist write — callers route the returned line wherever
they want (stdout, file, log buffer for tests).
Sourcefn printed_objective_inf_pr(
&mut self,
_data: &IpoptDataHandle,
_cq: &IpoptCqHandle,
) -> Option<(f64, f64)>
fn printed_objective_inf_pr( &mut self, _data: &IpoptDataHandle, _cq: &IpoptCqHandle, ) -> Option<(f64, f64)>
The (objective, inf_pr) pair the row prints, for the structured
per-iteration event, so the solve report carries the console’s
numbers rather than a neighbouring quantity (gh#979). None means
this output prints no such columns, and the caller falls back to
the algorithm’s own unscaled_curr_f / internal infeasibility.
Sourcefn is_restoration(&self) -> bool
fn is_restoration(&self) -> bool
Whether the rows this output prints belong to the restoration
phase (the r-suffixed rows). Tags the structured event.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".