pub struct TwoDSolution {
pub algorithm: String,
pub guillotine: bool,
pub sheet_count: usize,
pub total_waste_area: u64,
pub total_kerf_area: u64,
pub total_cost: f64,
pub max_usable_drop_area: u64,
pub total_sum_sq_usable_drop_areas: u128,
pub layouts: Vec<SheetLayout2D>,
pub unplaced: Vec<RectDemand2D>,
pub metrics: SolverMetrics2D,
}Expand description
A complete solution returned by solve_2d.
Fields§
§algorithm: StringName of the algorithm that produced this solution.
guillotine: boolWhether the layouts are guillotine-compatible.
sheet_count: usizeNumber of sheets consumed.
total_waste_area: u64Total wasted area across all sheets.
total_kerf_area: u64Total area lost to kerf across all layouts.
total_cost: f64Total material cost across all sheets.
max_usable_drop_area: u64Maximum of SheetLayout2D.largest_usable_drop_area across all layouts.
Answers “what is the single biggest usable offcut this job yields?”
total_sum_sq_usable_drop_areas: u128Sum (saturating) of SheetLayout2D.sum_sq_usable_drop_areas across
all layouts. Summation is meaningful because the sum-of-squares is
already additive over each sheet’s disjoint free-region partition.
layouts: Vec<SheetLayout2D>Per-sheet layouts in descending order of utilization.
unplaced: Vec<RectDemand2D>Rectangles the solver was unable to place.
metrics: SolverMetrics2DMetrics captured while solving.
Trait Implementations§
Source§impl Clone for TwoDSolution
impl Clone for TwoDSolution
Source§fn clone(&self) -> TwoDSolution
fn clone(&self) -> TwoDSolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TwoDSolution
impl Debug for TwoDSolution
Source§impl<'de> Deserialize<'de> for TwoDSolution
impl<'de> Deserialize<'de> for TwoDSolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TwoDSolution
impl PartialEq for TwoDSolution
Source§impl Serialize for TwoDSolution
impl Serialize for TwoDSolution
impl StructuralPartialEq for TwoDSolution
Auto Trait Implementations§
impl Freeze for TwoDSolution
impl RefUnwindSafe for TwoDSolution
impl Send for TwoDSolution
impl Sync for TwoDSolution
impl Unpin for TwoDSolution
impl UnsafeUnpin for TwoDSolution
impl UnwindSafe for TwoDSolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more