affectors
Class Affector_Template

java.lang.Object
  extended byaffectors.Affector
      extended byaffectors.Affector_Template
All Implemented Interfaces:
java.lang.Cloneable

public class Affector_Template
extends Affector

This should be a description of what this Affector does and where it might be used This description will show up in the online html documentation files. Even though it takes a couple minutes, it pays to do a decent job in these descriptions because the exact use for an Affector is the kind of thing you are likely to forget. The next section of this comments should show the formula being used. The third and fourth sections of this comments should contain a short description of each node or parameter used by the Affector, and an example of what the Affector would look like in a network file. We do the parameters section using a table, which makes it easier to read - if you don't know html, just make one copy of the line that starts with for each parameter and replace ANode with the parameter name and Describe node here with the parameters description.

Formula
dnodex/dt =

Parameters

ANode [nodex] Describe node here

Usage
&nodex

&DecayAff nodex H_nodex
&endnodex


Field Summary
 
Fields inherited from class affectors.Affector
ADesc, affectorType, CC, CERTIFICATION, CONVERSION, copyNumber, DEGRADATION, FF, firstFreeParam, GG, GUI_CAPABLE, HH, KK, MATHTYPE, NDesc, PDesc, PRODUCTION, RETURNS_DERIV, RETURNS_PARTIALS, TERMTYPE, TT, Type, UNSPECIFIED
 
Constructor Summary
Affector_Template()
          Constructor for this Affector.
 
Method Summary
 float getNCValue(Node which_node)
          If the Affector uses its own Node's concentration in making its calculation, then you this method should return the same value as getValue() divided by the concentration of the Affectors' Node.
 float getValue(Node which_node)
           
protected  void setLabelsAndTypes()
           
 void setParameterNumbers(int[] param_nums)
           
 
Methods inherited from class affectors.Affector
addDefaultParam, Chi, clearStatic, copy_, copy, doesContainTarget, findOrCreateParam, findParam, fixNodes, getNodes, getNumNodes, getNumParameters, getOtherSide, getParameter, getParameter, getParamName, getParamPos, getParamValue, getParamValue, getParamVariationMode, init, isLinearInTarget, Phi, Psi, setContainsTarget, setDescriptions, setParameter, setParamRange, setParamRange, setParamValue, setParamValue, setSide, setSided
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Affector_Template

public Affector_Template()
Constructor for this Affector. All Affectors must use a no-argument constructor, and currently there is no need to do anything in the constructor of most Affectors. You do need to change the name here from TemplateAff to [YourAffectorsName]Aff.

Method Detail

setLabelsAndTypes

protected void setLabelsAndTypes()
Specified by:
setLabelsAndTypes in class Affector

setParameterNumbers

public void setParameterNumbers(int[] param_nums)
Specified by:
setParameterNumbers in class Affector

getValue

public float getValue(Node which_node)
Overrides:
getValue in class Affector

getNCValue

public float getNCValue(Node which_node)
If the Affector uses its own Node's concentration in making its calculation, then you this method should return the same value as getValue() divided by the concentration of the Affectors' Node. Thus, assuming Nodes[0] was this Affectors Node, the code here could be written: getValue() / Nodes[0].getIntegrationValue() Its better to just rewrite the formula, though, since the code will run faster without the extra method call and division.

Overrides:
getNCValue in class Affector