Test::Float::RandomAssignment Class Reference

Generate random selection of assignments. More...

`#include <float.hh>`

## Public Member Functions

| RandomAssignment (int n, const Gecode::FloatVal &d, int a)
| Initialize for a assignments for n variables and values d.
virtual bool | operator() (void) const
| Test whether all assignments have been iterated.
virtual void | operator++ (void)
| Move to next assignment.
virtual Gecode::FloatVal | operator[] (int i) const
| Return value for variable i.
virtual void | set (int i, const Gecode::FloatVal &val)
| Set assignment to value val for variable i.
virtual | ~RandomAssignment (void)
| Destructor.
Public Member Functions inherited from Test::Float::Assignment
| Assignment (int n0, const Gecode::FloatVal &d0)
| Initialize assignments for n0 variables and values d0.
int | size (void) const
| Return number of variables.
virtual | ~Assignment (void)
| Destructor.

## Protected Member Functions

Gecode::FloatNum | randval (void)

## Protected Attributes

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

## Detailed Description

Generate random selection of assignments.

Definition at line 144 of file float.hh.

## Constructor & Destructor Documentation

## RandomAssignment()

Test::Float::RandomAssignment::RandomAssignment | ( | int | n,
|  | const Gecode::FloatVal & | d,
|  | int | a )

inline

Initialize for a assignments for n variables and values d.

Definition at line 130 of file float.hpp.

## ~RandomAssignment()

Test::Float::RandomAssignment::~RandomAssignment | ( | void |  | ) |

inline virtual

Destructor.

Definition at line 151 of file float.hpp.

## Member Function Documentation

## randval()

Gecode::FloatNum Test::Float::RandomAssignment::randval | ( | void |  | ) |

inline protected

Definition at line 112 of file float.hpp.

## operator()()

bool Test::Float::RandomAssignment::operator() | ( | void |  | ) | const

inline virtual

Test whether all assignments have been iterated.

Implements Test::Float::Assignment.

Definition at line 137 of file float.hpp.

## operator++()

void Test::Float::RandomAssignment::operator++ | ( | void |  | ) |

virtual

Move to next assignment.

Implements Test::Float::Assignment.

Definition at line 89 of file float.cpp.

## operator[]()

Gecode::FloatVal Test::Float::RandomAssignment::operator[] | ( | int | i | ) | const

inline virtual

Return value for variable i.

Implements Test::Float::Assignment.

Definition at line 141 of file float.hpp.

## set()

void Test::Float::RandomAssignment::set | ( | int | i,
|  | const Gecode::FloatVal & | val )

inline virtual

Set assignment to value val for variable i.

Implements Test::Float::Assignment.

Definition at line 146 of file float.hpp.

## Member Data Documentation

## vals

Gecode::FloatVal* Test::Float::RandomAssignment::vals

protected

The current values for the variables.

Definition at line 146 of file float.hh.

## a

int Test::Float::RandomAssignment::a

protected

How many assigments still to be generated Generate new value according to domain.

Definition at line 147 of file float.hh.

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

- test/float.hh
- test/float.cpp
- test/float.hpp