Skip to main content

AggregateReductionResult

Trait AggregateReductionResult 

Source
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§

Source

type Source: Problem

The source problem type.

Source

type Target: Problem

The target problem type.

Required Methods§

Source

fn target_problem(&self) -> &Self::Target

Get a reference to the target problem.

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§