ifs.example.csp
Class CSPVariable

java.lang.Object
  extended by ifs.model.Variable
      extended by ifs.example.csp.CSPVariable
All Implemented Interfaces:
Comparable

public class CSPVariable
extends Variable

CSP variable.

This class only implements generation of variable's values (domain)

Version:
1.0
Author:
Tomáš Müller

Field Summary
 
Fields inherited from class ifs.model.Variable
iValue
 
Constructor Summary
CSPVariable(int id, int domainSize)
          Constructor
CSPVariable(int id, int domainSize, int kernelId)
          Constructor
 
Method Summary
 void generateInitialValue(Random rnd)
          Generate an intial value (for MPP and for forcing of existance of a solution)
 int getKernelId()
          Get kernel id
 String getName()
          Variable's name -- for printing purposes
 
Methods inherited from class ifs.model.Variable
addContstraint, addVariableListener, assign, compareTo, constraints, constraintVariables, countAssignments, equals, getAssignment, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getId, getInitialAssignment, getModel, hardConstraints, hasAssignment, hashCode, hasInitialAssignment, lastAssignmentIteration, lastUnassignmentIteration, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setBestAssignment, setExtra, setInitialAssignment, setModel, setValues, softConstraints, toString, unassign, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CSPVariable

public CSPVariable(int id,
                   int domainSize)
Constructor

Parameters:
domainSize - number of values of the variable

CSPVariable

public CSPVariable(int id,
                   int domainSize,
                   int kernelId)
Constructor

Parameters:
domainSize - number of values of the variable
kernelId - kernel id (for structured CSP)
Method Detail

getKernelId

public int getKernelId()
Get kernel id


generateInitialValue

public void generateInitialValue(Random rnd)
Generate an intial value (for MPP and for forcing of existance of a solution)


getName

public String getName()
Description copied from class: Variable
Variable's name -- for printing purposes

Overrides:
getName in class Variable


Copyright © 2005 Tomáš Müller