ec.rule
Class RuleConstraints

java.lang.Object
  extended by ec.rule.RuleConstraints
All Implemented Interfaces:
Clique, Setup, java.io.Serializable

public class RuleConstraints
extends java.lang.Object
implements Clique

RuleConstraints is a class for constraints applicable to rules. You can subclass this to add additional constraints information for different kinds of rules.

Version:
1.0

Parameters

base.size
int >= 1
(number of rule constraints)
base.n.name
String
(name of rule constraint n)
Author:
Liviu Panait and Sean Luke
See Also:
Serialized Form

Field Summary
 byte constraintNumber
          The byte value of the constraints -- we can only have 256 of them
 java.lang.String name
          The name of the RuleConstraints object
static java.lang.String P_NAME
           
static java.lang.String P_SIZE
           
static int SIZE_OF_BYTE
           
 
Constructor Summary
RuleConstraints()
           
 
Method Summary
static RuleConstraints constraintsFor(java.lang.String constraintsName, EvolutionState state)
          You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 java.lang.String toString()
          Converting the rule to a string ( the name )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZE_OF_BYTE

public static final int SIZE_OF_BYTE
See Also:
Constant Field Values

P_NAME

public static final java.lang.String P_NAME
See Also:
Constant Field Values

P_SIZE

public static final java.lang.String P_SIZE
See Also:
Constant Field Values

constraintNumber

public byte constraintNumber
The byte value of the constraints -- we can only have 256 of them


name

public java.lang.String name
The name of the RuleConstraints object

Constructor Detail

RuleConstraints

public RuleConstraints()
Method Detail

toString

public java.lang.String toString()
Converting the rule to a string ( the name )

Overrides:
toString in class java.lang.Object

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.

Specified by:
setup in interface Setup

constraintsFor

public static RuleConstraints constraintsFor(java.lang.String constraintsName,
                                             EvolutionState state)
You must guarantee that after calling constraintsFor(...) one or several times, you call state.output.exitIfErrors() once.