Generated on Mon Nov 25 2013 15:56:32 for Gecode by doxygen 1.8.5
Test::Int::RandomMixAssignment Class Reference

Generate random selection of assignments. More...

#include <int.hh>

Public Member Functions

 RandomMixAssignment (int n0, const Gecode::IntSet &d0, int n1, const Gecode::IntSet &d1, int a0)
 Initialize for a assignments for n0 variables and values d0. More...
 
virtual bool operator() (void) const
 Test whether all assignments have been iterated. More...
 
virtual void operator++ (void)
 Move to next assignment. More...
 
virtual int operator[] (int i) const
 Return value for variable i. More...
 
virtual ~RandomMixAssignment (void)
 Destructor. More...
 
- Public Member Functions inherited from Test::Int::Assignment
 Assignment (int n0, const Gecode::IntSet &d0)
 Initialize assignments for n0 variables and values d0. More...
 
int size (void) const
 Return number of variables. More...
 
virtual ~Assignment (void)
 Destructor. More...
 

Protected Member Functions

int randval (const Gecode::IntSet &d)
 

Protected Attributes

int * vals
 The current values for the variables. More...
 
int a
 How many assigments still to be generated. More...
 
int _n1
 How many variables in the second set. More...
 
Gecode::IntSet _d1
 
                    Domain for second set of variables

Generate new value according to domain d More...

 
- Protected Attributes inherited from Test::Int::Assignment
int n
 Number of variables. More...
 
Gecode::IntSet d
 Domain for each variable. More...
 

Detailed Description

Generate random selection of assignments.

Definition at line 120 of file int.hh.

Constructor & Destructor Documentation

Test::Int::RandomMixAssignment::RandomMixAssignment ( int  n0,
const Gecode::IntSet d0,
int  n1,
const Gecode::IntSet d1,
int  a0 
)
inline

Initialize for a assignments for n0 variables and values d0.

Definition at line 125 of file int.hpp.

Test::Int::RandomMixAssignment::~RandomMixAssignment ( void  )
inlinevirtual

Destructor.

Definition at line 147 of file int.hpp.

Member Function Documentation

int Test::Int::RandomMixAssignment::randval ( const Gecode::IntSet d)
inlineprotected

Definition at line 113 of file int.hpp.

bool Test::Int::RandomMixAssignment::operator() ( void  ) const
inlinevirtual

Test whether all assignments have been iterated.

Implements Test::Int::Assignment.

Definition at line 136 of file int.hpp.

void Test::Int::RandomMixAssignment::operator++ ( void  )
virtual

Move to next assignment.

Implements Test::Int::Assignment.

Definition at line 74 of file int.cpp.

int Test::Int::RandomMixAssignment::operator[] ( int  i) const
inlinevirtual

Return value for variable i.

Implements Test::Int::Assignment.

Definition at line 141 of file int.hpp.

Member Data Documentation

int* Test::Int::RandomMixAssignment::vals
protected

The current values for the variables.

Definition at line 122 of file int.hh.

int Test::Int::RandomMixAssignment::a
protected

How many assigments still to be generated.

Definition at line 123 of file int.hh.

int Test::Int::RandomMixAssignment::_n1
protected

How many variables in the second set.

Definition at line 124 of file int.hh.

Gecode::IntSet Test::Int::RandomMixAssignment::_d1
protected

                    Domain for second set of variables

Generate new value according to domain d

Definition at line 125 of file int.hh.


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