pub trait AggregateReductionResult {
type Source: Problem;
type Target: Problem;
// Required methods
fn target_problem(&self) -> &Self::Target;
fn extract_value(
&self,
target_value: <Self::Target as Problem>::Value,
) -> <Self::Source as Problem>::Value;
}Expand description
Result of reducing a source problem to a target problem for aggregate values.
Unlike ReductionResult, this trait maps aggregate values back from target
space to source space instead of mapping witness configurations.
Required Associated Types§
Required Methods§
Sourcefn target_problem(&self) -> &Self::Target
fn target_problem(&self) -> &Self::Target
Get a reference to the target problem.
Sourcefn extract_value(
&self,
target_value: <Self::Target as Problem>::Value,
) -> <Self::Source as Problem>::Value
fn extract_value( &self, target_value: <Self::Target as Problem>::Value, ) -> <Self::Source as Problem>::Value
Extract an aggregate value from target problem space back to source space.
The caller supplies the completed target aggregate: an exact optimum, exhaustive YES/NO, count, or universal fold. Evaluating one candidate is not a substitute for that aggregate when establishing NO or optimality. A decision rule may also use its map to certify a candidate witness. Each rule defines its own map; source and target value types alone do not establish equivalence.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".