|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaffectors.Affector
Stores the formula for how a node changes over time. Each affector encapsulates a particular bit of the full formula for each node, generally an additive term of the differential equation. The base class Affector also stores the current values of all the parameters in the model.
Field Summary | |
java.lang.String |
ADesc
Descriptors for use by the GUI; set these to point to static final Strings that say in as few words as possible what the Affector does (ADesc), what nodes need to be specified (NDesc), and what parameters it uses (PDesc). |
int |
affectorType
|
static int |
CC
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
static int |
CERTIFICATION
Position meanings for Type[]. |
static int |
CONVERSION
Type.[TERMTYPE] values; |
float |
copyNumber
|
static int |
DEGRADATION
Type.[TERMTYPE] values; |
static int |
FF
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
static int |
firstFreeParam
|
static int |
GG
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
static int |
GUI_CAPABLE
Position meanings for Type[]. |
static int |
HH
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
static int |
KK
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
static int |
MATHTYPE
Position meanings for Type[]. |
java.lang.String[] |
NDesc
|
java.lang.String[] |
PDesc
|
static int |
PRODUCTION
Type.[TERMTYPE] values; |
static int |
RETURNS_DERIV
Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS. |
static int |
RETURNS_PARTIALS
Type.[CERTIFICATION] values; in the constructor of a subclass, once you have made sure the formula in getValue (and getNCValue if necessary) is correct, set this.Type.[CERTIFICATION]=Affector.RETURNS_DERIV, and once your subclass knows how to return a list of partial derivatives, set it to RETURNS_PARTIALS. |
static int |
TERMTYPE
Position meanings for Type[]. |
static int |
TT
Type.[MATHTYPE] values; FF refers to a nonlinear function of only *other* nodes, GG is a nonlinear function of other nodes times the target node, HH is a constant times the target node, KK is a constant times some other nodes, CC is a constant, TT is a function only of time. |
int[] |
Type
The Type array is public only so it can be read without the cost of a method call... |
static int |
UNSPECIFIED
Type.[] default value. |
Method Summary | |
static void |
addDefaultParam(java.lang.String name,
float val,
float low,
float high,
java.lang.String variation)
|
float |
Chi(float M,
float K,
float nu)
|
static void |
clearStatic()
|
void |
copy_(Affector cp)
|
Affector |
copy()
|
boolean |
doesContainTarget(Node which_node)
|
static int |
findOrCreateParam(java.lang.String name)
for use of the CalculatorNode or other things that need to look up parameters if they already exist but make them if they do not... |
static int |
findParam(java.lang.String name)
|
void |
fixNodes(Cell cell,
java.lang.String[] node_names)
|
float |
getNCValue(Node which_node)
|
Node[] |
getNodes()
This function is here so that viewers can examine an affector. |
int |
getNumNodes()
|
int |
getNumParameters()
|
static int |
getOtherSide(int side)
|
static Parameter |
getParameter(int pos)
Use this to read a Parameter object, identified by number, from the static arrays held by Affector. |
static Parameter |
getParameter(java.lang.String name)
Use this to read a Parameter object, identified by name, from the static arrays held by Affector. |
static java.lang.String |
getParamName(int pos)
|
static int |
getParamPos(java.lang.String name)
This function should only be called when constructing a model from the init() function of an iterator. |
static float |
getParamValue(int pos)
Use this instead of getting a whole Parameter object if all you want is the value of a parameter identified by its position. |
static float |
getParamValue(java.lang.String name)
Use this instead of getting a whole Parameter object if all you want is the named parameter's value. |
static int |
getParamVariationMode(int pos)
|
float |
getValue(Node which_node)
|
void |
init(int side,
int num_params,
java.lang.String[] params)
|
boolean |
isLinearInTarget()
|
float |
Phi(float M,
float K,
float nu)
|
float |
Psi(float M,
float K,
float nu)
|
protected void |
setContainsTarget(boolean b)
|
protected void |
setDescriptions(java.lang.String aff_desc,
java.lang.String[] node_desc,
java.lang.String[] param_desc)
|
protected abstract void |
setLabelsAndTypes()
|
static void |
setParameter(Parameter p)
Use this to set a parameter using a Parameter object. |
abstract void |
setParameterNumbers(int[] param_nums)
|
static void |
setParamRange(java.lang.String name,
float lower,
float upper,
int mode)
|
static void |
setParamRange(java.lang.String name,
float lower,
float upper,
java.lang.String mode)
|
static void |
setParamValue(int param_pos,
float val)
|
static void |
setParamValue(java.lang.String name,
float val)
|
void |
setSide(int side)
|
protected void |
setSided(boolean sided,
int[] which_sides)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int firstFreeParam
public float copyNumber
public int affectorType
public int[] Type
public static final int TERMTYPE
public static final int MATHTYPE
public static final int CERTIFICATION
public static final int GUI_CAPABLE
public static final int UNSPECIFIED
public static final int FF
public static final int GG
public static final int HH
public static final int KK
public static final int CC
public static final int TT
public static final int PRODUCTION
public static final int CONVERSION
public static final int DEGRADATION
public static final int RETURNS_DERIV
public static final int RETURNS_PARTIALS
public java.lang.String ADesc
public java.lang.String[] NDesc
public java.lang.String[] PDesc
Method Detail |
public static void clearStatic()
protected abstract void setLabelsAndTypes()
public abstract void setParameterNumbers(int[] param_nums)
public int getNumNodes()
public int getNumParameters()
public void init(int side, int num_params, java.lang.String[] params)
protected void setDescriptions(java.lang.String aff_desc, java.lang.String[] node_desc, java.lang.String[] param_desc)
protected void setSided(boolean sided, int[] which_sides)
public void setSide(int side)
protected void setContainsTarget(boolean b)
public boolean isLinearInTarget()
public float getValue(Node which_node)
public float getNCValue(Node which_node)
public boolean doesContainTarget(Node which_node)
public void copy_(Affector cp)
public Affector copy()
public void fixNodes(Cell cell, java.lang.String[] node_names) throws java.lang.Exception
java.lang.Exception
public static int getOtherSide(int side)
public final float Phi(float M, float K, float nu)
public final float Psi(float M, float K, float nu)
public final float Chi(float M, float K, float nu)
public static int findParam(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public static int findOrCreateParam(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public static int getParamPos(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getParamName(int pos)
public static int getParamVariationMode(int pos)
public static void setParamRange(java.lang.String name, float lower, float upper, java.lang.String mode) throws java.lang.Exception
java.lang.Exception
public static void setParamRange(java.lang.String name, float lower, float upper, int mode)
public static Parameter getParameter(java.lang.String name)
public static Parameter getParameter(int pos)
public static void setParameter(Parameter p)
public static float getParamValue(int pos)
public static float getParamValue(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public static void setParamValue(java.lang.String name, float val)
public static void setParamValue(int param_pos, float val)
public static void addDefaultParam(java.lang.String name, float val, float low, float high, java.lang.String variation) throws java.lang.Exception
java.lang.Exception
public Node[] getNodes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |