pub trait ReductionResult {
type Source: Problem;
type Target: Problem;
// Required methods
fn target_problem(&self) -> &Self::Target;
fn extract_solution(
&self,
target_solution: &<Self::Target as Problem>::Solution,
) -> ExtractionResult<<Self::Source as Problem>::Solution>;
}Expand description
Result of reducing a source problem to a target problem.
This trait encapsulates the target problem and provides methods to extract solutions back to the source problem space.
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_solution(
&self,
target_solution: &<Self::Target as Problem>::Solution,
) -> ExtractionResult<<Self::Source as Problem>::Solution>
fn extract_solution( &self, target_solution: &<Self::Target as Problem>::Solution, ) -> ExtractionResult<<Self::Source as Problem>::Solution>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".