class RandomCspC : public CspC

Random Constraint Satisfaction Problems

Inheritance:


Public Methods

void ProduceFileName ( char * FileName )
Producing a filename
virtual void const ProduceProblem ()
Producing a Random CSP
RandomCspC ()
Constructor
~RandomCspC ()
Destructor

Inherited from CspC:

Public Classes

struct ConstraintS

Public Fields

typedef ConstraintS* ConstraintT

Public Methods

void const AddConflict( VariableT const iVariable1, VariableT const iVariable2, ValueT const iValue1, ValueT const iValue2 )
void const AddConstraint( VariableT const iVariable1, VariableT const iVariable2 )
DomainSizeT const GetDomainSize( VariableT const iVariable )
int const GetNumberOfConflicts( ValueT const iSolution [] )
unsigned int const GetNumberOfConstraints( )
NumberOfVariablesT const GetNumberOfVariables()
bool const IsConflict( VariableT const iVariable1, VariableT const iVariable2, ValueT const iValue1, ValueT const iValue2 )
bool const IsConstraint( VariableT const iVariable1, VariableT const iVariable2 )
bool const IsDirty()
bool const IsValid( ValueT const iSolution [] )
bool const LoadFromFile( char const * iFilename )
CspC const& operator= ( const CspC & iCsp )
void const RemoveConflict( VariableT const iVariable1, VariableT const iVariable2, ValueT const iValue1, ValueT const iValue2 )
void const RemoveConstraint( VariableT const iVariable1, VariableT const iVariable2 )
void const Reset()
bool const SaveToFile( char const * const iFilename )
void const SetDomainSize( VariableT const iVariable, DomainSizeT const iDomainSize )

Public

struct ConstraintS

Protected Methods

ConstraintT const GetConstraint( VariableT const iVariable1, VariableT const iVariable2 )

Private Methods

void const Copy( CspC const & iCsp )
void const Create( NumberOfVariablesT const iNumberOfVariables )
void const Destroy()
bool const IsValidParameter( VariableT const iVariable, ValueT const iValue )
bool const IsValidParameter( VariableT const iVariable )
void const Swap( VariableT & iVariable1, VariableT & iVariable2 )

Documentation

This class is a empty class that can be extended to a class capable of producing Random Binary Constraint Satisfaction Problems. The class should implement the ProduceProblem function.

RandomCspC()
Constructor copies all the parameters for further usage.

Returns:
nothing.
Parameters:
iNumberOfVariables - Number of variables in CSP.
iDomainSize - Size of domain of each variable *or* maximum size of domain.
iRandomDomainSize - If true than a the domainsize will be varied over the variables.
iTightness - Determines percentage of conflicts that are generated.
iConnectivity - Percentage of constraints that are generated.
Author:
J.I. van Hemert
Version:
1.1

~RandomCspC()
For C++'s sake we have to implement the virtual destructor.

Returns:
nothing.
Author:
J.I. van Hemert
Version:
1.1

void ProduceFileName( char * FileName )
Create a filename from all the parameters of the CSP.

Returns:
nothing (FileName is the returnvalue).
Parameters:
FileName - reference to a string (char *) that should have enough memory for holding the filename produced by this function, maximum required is 100 bytes.
Author:
J.I. van Hemert
Version:
1.1

virtual void const ProduceProblem()
Produce a constraint satisfaction method using the method of Patrick Prosser, which he mentiones in his article 'Binary Constraint Satisfaction Problems: Some are Harder than Others' in '11th European Conference on Artificial Inteligence (ECAI94)' edited by A. Cohn and published in 1994 by * John Wiley \& Sons, Ltd.

Returns:
nothing.
Author:
J.I. van Hemert
Version:
1.1


This class has no child classes.
Author:
J.I. van Hemert
Version:
1.1

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de