Example: Placing people on a photo More...
Public Types | |
enum | { BRANCH_NONE, BRANCH_DEGREE } |
Branching to use for model. More... | |
Public Member Functions | |
Photo (const SizeOptions &opt) | |
Actual model. More... | |
Photo (bool share, Photo &s) | |
Constructor for cloning s. More... | |
virtual Space * | copy (bool share) |
Copy during cloning. More... | |
virtual void | print (std::ostream &os) const |
Print solution. More... | |
virtual IntVar | cost (void) const |
Return solution cost. More... | |
![]() | |
ScriptBase (void) | |
Default constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | compare (const Space &, std::ostream &os) const |
Compare with s. More... | |
Protected Attributes | |
const PhotoSpec & | spec |
Photo specification. More... | |
IntVarArray | pos |
Person's position on photo. More... | |
IntVar | violations |
Number of violated preferences. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Example: Placing people on a photo
A group of people wants to take a group photo. Each person can give preferences next to whom he or she wants to be placed on the photo. The problem to be solved is to find a placement that violates as few preferences as possible.
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
|
inlinevirtual |
|
related |
|
protected |
|
protected |
|
protected |