pub struct BPInstance {
pub items: Vec<(Item, usize)>,
pub item_area: fsize,
pub bins: Vec<(Bin, usize)>,
}
Expand description
Bin-packing problem instance: a set of items to be packed into a set of bins. The items are to be packed in such a way that the total cost of the bins used is minimized.
Fields§
§items: Vec<(Item, usize)>
Items to be packed in the instance, along with their requested quantities
item_area: fsize
Total area of all items in the instance
bins: Vec<(Bin, usize)>
Set of bins available to pack the items, along with their quantities
Implementations§
Trait Implementations§
Source§impl Clone for BPInstance
impl Clone for BPInstance
Source§fn clone(&self) -> BPInstance
fn clone(&self) -> BPInstance
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 BPInstance
impl Debug for BPInstance
Source§impl From<BPInstance> for Instance
impl From<BPInstance> for Instance
Source§fn from(instance: BPInstance) -> Self
fn from(instance: BPInstance) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BPInstance
impl RefUnwindSafe for BPInstance
impl Send for BPInstance
impl Sync for BPInstance
impl Unpin for BPInstance
impl UnwindSafe for BPInstance
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