Generated on Mon Nov 30 23:53:45 2009 for Gecode by doxygen 1.6.1

Photo Class Reference
[Scripts for problems]

Example: Placing people on a photo More...

List of all members.

Public Types

enum  { BRANCH_NONE, BRANCH_DEGREE }
 

Branching to use for model.

More...

Public Member Functions

 Photo (const SizeOptions &opt)
 Actual model.
 Photo (bool share, Photo &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os) const
 Print solution.
virtual IntVar cost (void) const
 Return solution cost.

Protected Attributes

const PhotoSpecspec
 Photo specification.
IntVarArray pos
 Person's position on photo.
IntVar sat
 Number of satisfied preferences.

Detailed Description

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 satisfies as many preferences as possible.

Definition at line 80 of file photo.cpp.


Member Enumeration Documentation

anonymous enum

Branching to use for model.

Enumerator:
BRANCH_NONE 

Choose variables from left to right.

BRANCH_DEGREE 

Choose variable with largest degree.

Definition at line 91 of file photo.cpp.


Constructor & Destructor Documentation

Photo::Photo ( const SizeOptions opt  )  [inline]

Actual model.

Definition at line 96 of file photo.cpp.

Photo::Photo ( bool  share,
Photo s 
) [inline]

Constructor for cloning s.

Definition at line 127 of file photo.cpp.


Member Function Documentation

virtual Space* Photo::copy ( bool  share  )  [inline, virtual]

Copy during cloning.

Implements Gecode::Space.

Definition at line 134 of file photo.cpp.

virtual void Photo::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< MaximizeSpace >.

Definition at line 139 of file photo.cpp.

virtual IntVar Photo::cost ( void   )  const [inline, virtual]

Return solution cost.

Implements Gecode::MiniModel::OptimizeSpace< IRT_GR >.

Definition at line 144 of file photo.cpp.


Member Data Documentation

const PhotoSpec& Photo::spec [protected]

Photo specification.

Definition at line 83 of file photo.cpp.

IntVarArray Photo::pos [protected]

Person's position on photo.

Definition at line 85 of file photo.cpp.

IntVar Photo::sat [protected]

Number of satisfied preferences.

Definition at line 87 of file photo.cpp.


The documentation for this class was generated from the following file: