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

## Protected Member Functions

int | randval (const Gecode::IntSet &d)

## Protected Attributes

int * | vals
| The current values for the variables.
int | a
| How many assigments still to be generated.
int | _n1
| How many variables in the second set.
Gecode::IntSet | _d1
| Domain for second set of variables Generate new value according to domain d.
Protected Attributes inherited from Test::Int::Assignment
int | n
| Number of variables.
Gecode::IntSet | d
| Domain for each variable.

## Detailed Description

Generate random selection of assignments.

Definition at line 116 of file int.hh.

## Constructor & Destructor Documentation

## RandomMixAssignment()

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 121 of file int.hpp.

## ~RandomMixAssignment()

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

inline virtual

Destructor.

Definition at line 144 of file int.hpp.

## Member Function Documentation

## randval()

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

inline protected

Definition at line 109 of file int.hpp.

## operator()()

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

inline virtual

Test whether all assignments have been iterated.

Implements Test::Int::Assignment.

Definition at line 133 of file int.hpp.

## operator++()

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

virtual

Move to next assignment.

Implements Test::Int::Assignment.

Definition at line 70 of file int.cpp.

## operator[]()

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

inline virtual

Return value for variable i.

Implements Test::Int::Assignment.

Definition at line 138 of file int.hpp.

## Member Data Documentation

## vals

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

protected

The current values for the variables.

Definition at line 118 of file int.hh.

## a

int Test::Int::RandomMixAssignment::a

protected

How many assigments still to be generated.

Definition at line 119 of file int.hh.

## _n1

int Test::Int::RandomMixAssignment::_n1

protected

How many variables in the second set.

Definition at line 120 of file int.hh.

## _d1

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

protected

Domain for second set of variables Generate new value according to domain d.

Definition at line 121 of file int.hh.

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

- test/int.hh
- test/int.cpp
- test/int.hpp