|
|||||||||
| 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.MemGet
<typeX> MemGet(MEM_typeX memory, INT index)MemGet is a generic Function which takes two arguments. The first is an indexed memory. The second is an index into that memory. The Function retrieves the value at the specified location of the specified memory. 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.MemSet, Serialized Form| Fields inherited from class gpsys.Function |
argTypes |
| Fields inherited from class gpsys.Primitive |
type |
| Constructor Summary | |
MemGet(Type memoryType,
Type returnType)
Construct a new MemGet Function to access the specified memory type, which holds the specified type of elements. |
|
| Method Summary | |
boolean |
evaluateBoolean(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_BOOLEAN type. |
byte |
evaluateByte(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_BYTE type. |
char |
evaluateChar(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_CHAR type. |
double |
evaluateDouble(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_DOUBLE type. |
float |
evaluateFloat(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_FLOAT type. |
int |
evaluateInt(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_INT type. |
long |
evaluateLong(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_LONG type. |
java.lang.Object |
evaluateObject(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_OBJECT type. |
short |
evaluateShort(Individual i,
Gene[] arguments)
Used to get values from memory of MEM_SHORT type. |
Primitive |
instance()
Creates an instance of this MemGet object. |
java.lang.String |
toString()
Returns a String representation of this Function. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public MemGet(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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.
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 accessed, and
the second argument is the index of the memory location
being accessed.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 | ||||||||