Generated on Sat Nov 11 01:12:18 2006 for Gecode by doxygen 1.5.1

Photo Class Reference
[Example scripts (models)]

Inherits Example.

List of all members.


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 61 of file photo.cc.

Public Member Functions

 Photo (const Options &opt)
 Actual model.
 Photo (bool share, Photo &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (void)
 Print solution.
void constrain (Space *s)
 Add constraint for next better solution.

Protected Attributes

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


Constructor & Destructor Documentation

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

Actual model.

Definition at line 72 of file photo.cc.

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

Constructor for cloning s.

Definition at line 109 of file photo.cc.


Member Function Documentation

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

Copy during cloning.

Implements Gecode::Space.

Definition at line 117 of file photo.cc.

virtual void Photo::print ( void   )  [inline, virtual]

Print solution.

Reimplemented from Example.

Definition at line 123 of file photo.cc.

void Photo::constrain ( Space s  )  [inline]

Add constraint for next better solution.

Definition at line 132 of file photo.cc.


Member Data Documentation

const PhotoSpec& Photo::spec [protected]

Photo specification.

Definition at line 64 of file photo.cc.

IntVarArray Photo::pos [protected]

Person's position on photo.

Definition at line 66 of file photo.cc.

IntVar Photo::sat [protected]

Number of satisfied preferences.

Definition at line 68 of file photo.cc.


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