pub trait Solver {
type Geometry: Geometry;
type Boundary: Boundary;
type Scalar;
// Required methods
fn solve(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
) -> Result<SolveResult<Self::Scalar>>;
fn solve_with_progress(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
callback: ProgressCallback,
) -> Result<SolveResult<Self::Scalar>>;
fn cancel(&self);
}Expand description
Trait for nesting/packing solvers.
Required Associated Types§
Required Methods§
Sourcefn solve(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
) -> Result<SolveResult<Self::Scalar>>
fn solve( &self, geometries: &[Self::Geometry], boundary: &Self::Boundary, ) -> Result<SolveResult<Self::Scalar>>
Solves the nesting/packing problem.
Sourcefn solve_with_progress(
&self,
geometries: &[Self::Geometry],
boundary: &Self::Boundary,
callback: ProgressCallback,
) -> Result<SolveResult<Self::Scalar>>
fn solve_with_progress( &self, geometries: &[Self::Geometry], boundary: &Self::Boundary, callback: ProgressCallback, ) -> Result<SolveResult<Self::Scalar>>
Solves with a progress callback.