|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucs.RuleCondition
A rule object for use in UCS.
| Field Summary | |
static int[] |
arity
The arity of each element of the current condition. |
int |
length
The length of this condition. |
double[] |
values
The condition |
| Constructor Summary | |
RuleCondition(double[] cond)
RuleCondition constructor. |
|
RuleCondition(int length)
RuleCondition constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a clone of this object. |
boolean |
matches(double[] othergenome)
Checks whether two conditions match or not. |
boolean |
matches(RuleCondition other)
Checks whether two conditions match or not. |
double |
randomValue(int position)
Returns a valid randomly chosen value for the specified index in this rule, including the ``don't care'' symbol. |
void |
set(double[] newgenome)
Sets this condition to the supplied argument. |
void |
set(int position,
double value)
Sets a particular position in this condition to the supplied value. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int[] arity
public int length
public double[] values
| Constructor Detail |
public RuleCondition(double[] cond)
cond - A double array specifying the contents of this condition.public RuleCondition(int length)
length - The required length of this condition.| Method Detail |
public java.lang.Object clone()
public boolean matches(double[] othergenome)
othergenome - A double array specifying a condition to check against this condition.
public boolean matches(RuleCondition other)
other - A condition to check against this condition.
public double randomValue(int position)
position - The index within this condition to query.public void set(double[] newgenome)
newgenome -
public void set(int position,
double value)
position - The index within this condition to set.value - A double value specifying what value the position should be set to. This could be Condition.HASH to set it as a "don't care" symbol.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||