public class EncogProgramVariables
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
EncogProgramVariables() |
| Modifier and Type | Method and Description |
|---|---|
void |
defineVariable(VariableMapping mapping)
Define the specified variable mapping.
|
ExpressionValue |
getVariable(int i)
Get a variable value by index.
|
ExpressionValue |
getVariable(java.lang.String name)
Get a variable value by name.
|
int |
getVariableIndex(java.lang.String varName)
Get a variable index by name.
|
java.lang.String |
getVariableName(int idx)
Get a variable name by index.
|
void |
setVariable(int index,
double value)
Set a variable floating point value by index.
|
void |
setVariable(java.lang.String name,
double d)
Set a floating point variable value by name.
|
void |
setVariable(java.lang.String name,
ExpressionValue value)
Set a variable value by name.
|
int |
size() |
boolean |
variableExists(java.lang.String name)
Determine if the specified variable name exists.
|
public void defineVariable(VariableMapping mapping)
mapping - The variable mapping.public ExpressionValue getVariable(int i)
i - The index of the variable we are using.public ExpressionValue getVariable(java.lang.String name)
name - The name of the variable we are using.public int getVariableIndex(java.lang.String varName)
varName - The variable name.public java.lang.String getVariableName(int idx)
idx - The variable index.public void setVariable(int index,
double value)
index - The index.value - The value.public void setVariable(java.lang.String name,
double d)
name - The name.d - The value.public void setVariable(java.lang.String name,
ExpressionValue value)
name - The variable name.value - The value.public int size()
public boolean variableExists(java.lang.String name)
name - The name of the variable.