|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.prg.extension.BasicTemplate
public abstract class BasicTemplate
A basic template.
Field Summary |
---|
Fields inherited from interface org.encog.ml.prg.extension.ProgramExtensionTemplate |
---|
NO_PREC |
Constructor Summary | |
---|---|
BasicTemplate(int thePrecedence,
String theSignature,
NodeType theType,
boolean isVariable,
int theDataSize)
Construct a basic template object. |
|
BasicTemplate(String theSignature)
Construct a function based on the provided signature. |
Method Summary | |
---|---|
int |
getChildNodeCount()
|
int |
getDataSize()
|
String |
getName()
|
NodeType |
getNodeType()
|
List<ParamTemplate> |
getParams()
|
int |
getPrecedence()
|
ParamTemplate |
getReturnValue()
|
String |
getSignature()
|
boolean |
isPossibleReturnType(EncogProgramContext context,
ValueType rtn)
Determines if the specified return type is a possible return type. |
boolean |
isVariable()
|
void |
randomize(Random rnd,
List<ValueType> desiredTypes,
ProgramNode actual,
double minValue,
double maxValue)
Randomize this actual tree node. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.encog.ml.prg.extension.ProgramExtensionTemplate |
---|
evaluate |
Constructor Detail |
---|
public BasicTemplate(int thePrecedence, String theSignature, NodeType theType, boolean isVariable, int theDataSize)
thePrecedence
- The precedence.theSignature
- The opcode signature.theType
- The opcode type.isVariable
- True, if this opcode is a variable.theDataSize
- The data size kept for this opcode.public BasicTemplate(String theSignature)
theSignature
- The signature.Method Detail |
---|
public int getChildNodeCount()
getChildNodeCount
in interface ProgramExtensionTemplate
public int getDataSize()
getDataSize
in interface ProgramExtensionTemplate
public String getName()
getName
in interface ProgramExtensionTemplate
public NodeType getNodeType()
getNodeType
in interface ProgramExtensionTemplate
public List<ParamTemplate> getParams()
getParams
in interface ProgramExtensionTemplate
public int getPrecedence()
getPrecedence
in interface ProgramExtensionTemplate
public ParamTemplate getReturnValue()
getReturnValue
in interface ProgramExtensionTemplate
public String getSignature()
public boolean isPossibleReturnType(EncogProgramContext context, ValueType rtn)
isPossibleReturnType
in interface ProgramExtensionTemplate
context
- The program context.rtn
- The potential return type to check.
public boolean isVariable()
isVariable
in interface ProgramExtensionTemplate
public void randomize(Random rnd, List<ValueType> desiredTypes, ProgramNode actual, double minValue, double maxValue)
randomize
in interface ProgramExtensionTemplate
rnd
- Random number generator.desiredTypes
- The desired type of the randomization, if allowed.actual
- The actual program node to randomize.minValue
- The minimum value to use for randomization.maxValue
- The maximum value to use for randomization.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |