org.encog.ml.prg
public class EncogProgramVariables extends Object implements 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(String name)
Get a variable value by name.
|
int |
getVariableIndex(String varName)
Get a variable index by name.
|
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(String name,
double d)
Set a floating point variable value by name.
|
void |
setVariable(String name,
ExpressionValue value)
Set a variable value by name.
|
int |
size() |
boolean |
variableExists(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(String name)
name
- The name of the variable we are using.public int getVariableIndex(String varName)
varName
- The variable name.public String getVariableName(int idx)
idx
- The variable index.public void setVariable(int index, double value)
index
- The index.value
- The value.public void setVariable(String name, double d)
name
- The name.d
- The value.public void setVariable(String name, ExpressionValue value)
name
- The variable name.value
- The value.public int size()
public boolean variableExists(String name)
name
- The name of the variable.Copyright © 2014. All Rights Reserved.