pub trait ReductionResult: Clone {
type Source: Problem;
type Target: Problem;
// Required methods
fn target_problem(&self) -> &Self::Target;
fn extract_solution(&self, target_solution: &[usize]) -> Vec<usize>;
fn source_size(&self) -> ProblemSize;
fn target_size(&self) -> ProblemSize;
}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: &[usize]) -> Vec<usize>
fn extract_solution(&self, target_solution: &[usize]) -> Vec<usize>
Sourcefn source_size(&self) -> ProblemSize
fn source_size(&self) -> ProblemSize
Get the size of the source problem (for complexity analysis).
Sourcefn target_size(&self) -> ProblemSize
fn target_size(&self) -> ProblemSize
Get the size of the target problem (for complexity analysis).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.