|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.simulator.SimulationVariable
public class SimulationVariable
Object containing cached variable value for a specific entity.
| Field Summary | |
|---|---|
protected SimulationContext |
simulationContext
Simulation context (to get db). |
protected org.nuiton.topia.persistence.TopiaEntity |
topiaEntity
Managed entity id. |
protected Map<String,Variable> |
variablesCache
Variable name > variable entity. |
| Constructor Summary | |
|---|---|
SimulationVariable(SimulationContext simulationContext,
org.nuiton.topia.persistence.TopiaEntity topiaEntity)
|
|
| Method Summary | |
|---|---|
double |
eval(String name)
Eval current variable equation. |
protected double |
eval(Variable v)
Eval current variable equation. |
double |
getAsDouble(String name)
Return variable value as double. |
org.nuiton.math.matrix.MatrixND |
getAsMatrix(String name)
Return variable value as matrix. |
protected Variable |
getVariableEntity(String name)
Return variable entity from cache or database. |
void |
set(String name,
Object value)
Set variable value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SimulationContext simulationContext
protected org.nuiton.topia.persistence.TopiaEntity topiaEntity
protected Map<String,Variable> variablesCache
| Constructor Detail |
|---|
public SimulationVariable(SimulationContext simulationContext,
org.nuiton.topia.persistence.TopiaEntity topiaEntity)
| Method Detail |
|---|
protected Variable getVariableEntity(String name)
throws org.nuiton.topia.TopiaException
name - variable name to get
org.nuiton.topia.TopiaException - if can't restore variable from db
public double getAsDouble(String name)
throws org.nuiton.topia.TopiaException
name - variable name
org.nuiton.topia.TopiaException - if can't restore variable from db
public org.nuiton.math.matrix.MatrixND getAsMatrix(String name)
throws org.nuiton.topia.TopiaException
name - variable name
org.nuiton.topia.TopiaException - if can't restore variable from db
public void set(String name,
Object value)
throws org.nuiton.topia.TopiaException
name - variable namevalue - new value
org.nuiton.topia.TopiaException - if can't restore variable from db
public double eval(String name)
throws org.nuiton.topia.TopiaException
name - variable name
org.nuiton.topia.TopiaException - if can't restore variable from dbprotected double eval(Variable v)
v - variable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||