pub struct LBFPlacingCost(/* private fields */);
Expand description
The cost LBF assigned to a placing option.
Weighted sum of the x_max and y_max of the shape, with the horizontal dimension being more important.
A pure lexicographic comparison (always prioritizing x-axis) would lead to undesirable results due to the continuous nature of the values.
Implementations§
Source§impl LBFPlacingCost
impl LBFPlacingCost
pub fn new(x_max: fsize, y_max: fsize) -> Self
pub fn from_shape(shape: &SimplePolygon) -> Self
Trait Implementations§
Source§impl Clone for LBFPlacingCost
impl Clone for LBFPlacingCost
Source§fn clone(&self) -> LBFPlacingCost
fn clone(&self) -> LBFPlacingCost
Returns a copy 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 LBFPlacingCost
impl Debug for LBFPlacingCost
Source§impl Ord for LBFPlacingCost
impl Ord for LBFPlacingCost
Source§fn cmp(&self, other: &LBFPlacingCost) -> Ordering
fn cmp(&self, other: &LBFPlacingCost) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LBFPlacingCost
impl PartialEq for LBFPlacingCost
Source§impl PartialOrd for LBFPlacingCost
impl PartialOrd for LBFPlacingCost
impl Copy for LBFPlacingCost
impl Eq for LBFPlacingCost
impl StructuralPartialEq for LBFPlacingCost
Auto Trait Implementations§
impl Freeze for LBFPlacingCost
impl RefUnwindSafe for LBFPlacingCost
impl Send for LBFPlacingCost
impl Sync for LBFPlacingCost
impl Unpin for LBFPlacingCost
impl UnwindSafe for LBFPlacingCost
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