parameterrules
Class MultiplyParameterRule

java.lang.Object
  extended byparameterrules.ParameterRule
      extended byparameterrules.MultiplyParameterRule
All Implemented Interfaces:
java.lang.Cloneable

public class MultiplyParameterRule
extends ParameterRule

Implements the manipulation the Parameter's value is multiplied by a constant before being used in a model.


Field Summary
 
Fields inherited from class parameterrules.ParameterRule
numParams, paramNums
 
Method Summary
 boolean changeParameters(float[] params, int mode, ParameterSet set)
          This method should change parameters so that they conform to this rule.
 ParameterRule copy()
           
 float getFuzzyScore(float[] params)
          This method should return 0 if the parameters in the input set pass the criteria in this rule.
protected  void loadParameter(java.lang.String info, BetterTokenizer tokenizer)
          Override this function for each parameter rule to load in setup info specific to that rule.
 
Methods inherited from class parameterrules.ParameterRule
init, isGood, loadParameters, pickNewParameterValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public ParameterRule copy()
Overrides:
copy in class ParameterRule

getFuzzyScore

public float getFuzzyScore(float[] params)
Description copied from class: ParameterRule
This method should return 0 if the parameters in the input set pass the criteria in this rule. Otherwise it should return a positive number whose magnitude gets larger as the parameter set gets farther from satisfying this rule.

Overrides:
getFuzzyScore in class ParameterRule
Parameters:
params - The values of all the parameters in the reference parameter set. The params array and the reference parameter set need to match one-to-one.

loadParameter

protected void loadParameter(java.lang.String info,
                             BetterTokenizer tokenizer)
                      throws java.lang.Exception
Description copied from class: ParameterRule
Override this function for each parameter rule to load in setup info specific to that rule. You can use the refParam to look up the positions of any model parameters you load. The default method will load parameters with the @Param tag and put the parameter numbers into the paramNums array.

Overrides:
loadParameter in class ParameterRule
Throws:
java.lang.Exception

changeParameters

public boolean changeParameters(float[] params,
                                int mode,
                                ParameterSet set)
Description copied from class: ParameterRule
This method should change parameters so that they conform to this rule. If the parameters matched the rule without any changes, this method should return true. Otherwise, return false.

Overrides:
changeParameters in class ParameterRule
Parameters:
params - The values of all the parameters in the reference parameter set. The params array and the reference parameter set need to match one-to-one.