Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0

Example: partition numbers into two groups More...

Public Member Functions

 Partition (const SizeOptions &opt)
 Actual model.
 Partition (Partition &s)
 Constructor used during cloning s.
virtual Spacecopy (void)
 Copying during cloning.
virtual void print (std::ostream &os) const
 Print solution.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
 ScriptBase (const Options &opt)
 Constructor.
 ScriptBase (ScriptBase &e)
 Constructor used for cloning.
virtual void compare (const Space &home, std::ostream &os) const
 Compare with s.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
 IgnoreStepOption (const Options &)
 Constructor.
 IgnoreStepOption (BaseSpace &e)
 Constructor used for cloning.

Protected Attributes

IntVarArray x
 First group of numbers.
IntVarArray y
 Second group of numbers.

(Note that these are not member symbols.)

int main (int argc, char *argv[])
 Main-functiona.

Additional Inherited Members

Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
static std::ostream & select_ostream (const char *sn, std::ofstream &ofs)
 Choose output stream according to sn.
static void run (const Options &opt, Script *s=NULL)

Detailed Description

Example: partition numbers into two groups

Definition at line 45 of file partition.cpp.

Constructor & Destructor Documentation

◆ Partition() [1/2]

Partition::Partition ( const SizeOptions & opt)
inline

Actual model.

Definition at line 53 of file partition.cpp.

◆ Partition() [2/2]

Partition::Partition ( Partition & s)
inline

Constructor used during cloning s.

Definition at line 96 of file partition.cpp.

Member Function Documentation

◆ copy()

virtual Space * Partition::copy ( void )
inlinevirtual

Copying during cloning.

Definition at line 102 of file partition.cpp.

◆ print()

virtual void Partition::print ( std::ostream & os) const
inlinevirtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.

Definition at line 107 of file partition.cpp.

◆ main()

int main ( int argc,
char * argv[] )
related

Main-functiona.

Definition at line 132 of file partition.cpp.

Member Data Documentation

◆ x

IntVarArray Partition::x
protected

First group of numbers.

Definition at line 48 of file partition.cpp.

◆ y

IntVarArray Partition::y
protected

Second group of numbers.

Definition at line 50 of file partition.cpp.


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