|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--gpsys.Primitive
|
+--gpsys.Function
|
+--gpsys.primitives.MemSet
<typeX> MemSet(MEM_typeX memory, INT index, <typeX> value)MemSet is a generic Function which takes three arguments. The first is an indexed memory. The second is an index into that memory. The third is the value that the specified location of the specified memory needs to be set. MemGet needs to be instantiated to work with a particular type of memory. Valid memory types include MEM_OBJECT, MEM_BYTE, MEM_SHORT, MEM_INT, MEM_LONG, MEM_FLOAT, MEM_DOUBLE, MEM_CHAR, and MEM_BOOLEAN.
Type,
Primitive,
Terminal,
gpsys.MemGet, Serialized Form| Fields inherited from class gpsys.Function |
argTypes |
| Fields inherited from class gpsys.Primitive |
type |
| Constructor Summary | |
MemSet(Type memoryType,
Type returnType)
Construct a new MemSet Function to assign values to the specified memory type, which holds the specified type of elements. |
|
| Method Summary | |
boolean |
evaluateBoolean(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_BOOLEAN type. |
byte |
evaluateByte(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_BYTE type. |
char |
evaluateChar(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_CHAR type. |
double |
evaluateDouble(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_DOUBLE type. |
float |
evaluateFloat(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_FLOAT type. |
int |
evaluateInt(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_INT type. |
long |
evaluateLong(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_LONG type. |
java.lang.Object |
evaluateObject(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_OBJECT type. |
short |
evaluateShort(Individual i,
Gene[] arguments)
Used to set values in memories of MEM_SHORT type. |
Primitive |
instance()
Creates an instance of this MemSet object. |
java.lang.String |
toString()
Returns a String representation of this Function. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public MemSet(Type memoryType,
Type returnType)
memoryType - The type of the memory, can be one of MEM_OBJECT,
MEM_BYTE, MEM_SHORT, MEM_INT,MEM_LONG, MEM_FLOAT,
MEM_DOUBLE, MEM_CHAR, and MEM_BOOLEAN.returnType - The type that the memory holds, can be one of
OBJECT, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE,
CHAR, and BOOLEAN.| Method Detail |
public final java.lang.Object evaluateObject(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final byte evaluateByte(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final short evaluateShort(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final int evaluateInt(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final long evaluateLong(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final float evaluateFloat(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final double evaluateDouble(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final char evaluateChar(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.
public final boolean evaluateBoolean(Individual i,
Gene[] arguments)
throws EvaluationException
i - The individual being evaluated.arguments - The Gene trees supplied as arguments to the Function,
the first argument is the memory to be written to,
the second argument is the index of the memory location
to be assigned, and third is the value to be assigned.public final Primitive instance()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||