Test::Int::BinPacking::LoadBinAssignment Class Reference
[Bin-packing constraints]
Generate load and bin assignments. More...
Public Member Functions | |
LoadBinAssignment (int m, const Gecode::IntSet &d_m, int n, const Gecode::IntSet &d_n, int l) | |
Initialize assignments for load and bin variables. | |
virtual bool | operator() (void) const |
Test whether all assignments have been iterated. | |
virtual void | operator++ (void) |
Move to next assignment. | |
virtual int | operator[] (int i) const |
Return value for variable i. | |
virtual | ~LoadBinAssignment (void) |
Destructor. | |
Protected Attributes | |
int | n_bins |
Number of bins. | |
int | n_items |
Number of items. | |
Gecode::IntSet | d_load |
Domain for load variables. | |
Gecode::IntSet | d_bin |
Domain for bin variables. | |
int | load |
Load to generate (unless -1). | |
Gecode::IntSetValues * | dsv |
Iterator for each variable. |
Detailed Description
Generate load and bin assignments.
Definition at line 54 of file bin-packing.cpp.
Constructor & Destructor Documentation
Test::Int::BinPacking::LoadBinAssignment::LoadBinAssignment | ( | int | m, | |
const Gecode::IntSet & | d_m, | |||
int | n, | |||
const Gecode::IntSet & | d_n, | |||
int | l | |||
) | [inline] |
Initialize assignments for load and bin variables.
Definition at line 70 of file bin-packing.cpp.
virtual Test::Int::BinPacking::LoadBinAssignment::~LoadBinAssignment | ( | void | ) | [inline, virtual] |
Destructor.
Definition at line 123 of file bin-packing.cpp.
Member Function Documentation
virtual bool Test::Int::BinPacking::LoadBinAssignment::operator() | ( | void | ) | const [inline, virtual] |
Test whether all assignments have been iterated.
Implements Test::Int::Assignment.
Definition at line 82 of file bin-packing.cpp.
virtual void Test::Int::BinPacking::LoadBinAssignment::operator++ | ( | void | ) | [inline, virtual] |
Move to next assignment.
Implements Test::Int::Assignment.
Definition at line 86 of file bin-packing.cpp.
virtual int Test::Int::BinPacking::LoadBinAssignment::operator[] | ( | int | i | ) | const [inline, virtual] |
Return value for variable i.
Implements Test::Int::Assignment.
Definition at line 118 of file bin-packing.cpp.
Member Data Documentation
int Test::Int::BinPacking::LoadBinAssignment::n_bins [protected] |
Number of bins.
Definition at line 57 of file bin-packing.cpp.
int Test::Int::BinPacking::LoadBinAssignment::n_items [protected] |
Number of items.
Definition at line 59 of file bin-packing.cpp.
Domain for load variables.
Definition at line 61 of file bin-packing.cpp.
Domain for bin variables.
Definition at line 63 of file bin-packing.cpp.
int Test::Int::BinPacking::LoadBinAssignment::load [protected] |
Load to generate (unless -1).
Definition at line 65 of file bin-packing.cpp.
Iterator for each variable.
Definition at line 67 of file bin-packing.cpp.
The documentation for this class was generated from the following file:
- test/int/bin-packing.cpp (Revision: 15116)