|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.multiagent.gamer.ParameterizedObject | +--edu.stanford.multiagent.gamer.functions.Function | +--edu.stanford.multiagent.gamer.functions.DecreasingWrapper
A Wrapper that takes an arbitrary increasing function, and turns it into a decreasing one (by negating)
Field Summary |
Fields inherited from class edu.stanford.multiagent.gamer.functions.Function |
dMax, dMin |
Fields inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
parameters |
Constructor Summary | |
DecreasingWrapper()
|
Method Summary | |
protected void |
checkParameters()
Checks if Parameter values are consistent. |
void |
doGenerate()
Computes the additive constant to satisfy the min parameter. |
double |
eval(double x)
Evaluates the function at a single point and return the value |
java.lang.String |
getDescription()
Returns description of the class. |
protected java.lang.String |
getFunctionHelp()
Returns a help string describing the function and the parameters taken by the function |
void |
initialize()
Calls initialize in the super class ParemeterizedObject which checks parameters |
void |
randomizeParameters()
Randomize things |
void |
setParameters(edu.stanford.multiagent.gamer.ParamParser p,
boolean randomize)
Sets multiple parameters at once using a ParamParser. |
Methods inherited from class edu.stanford.multiagent.gamer.functions.Function |
getDMax, getDMin, getHelp, setDomain |
Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
getBooleanParameter, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, setParameter, setParameter, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DecreasingWrapper() throws java.lang.Exception
Method Detail |
protected java.lang.String getFunctionHelp()
Function
getFunctionHelp
in class Function
public void initialize() throws java.lang.Exception
Function
initialize
in class Function
java.lang.Exception
- if there is a problem with the parameterspublic void setParameters(edu.stanford.multiagent.gamer.ParamParser p, boolean randomize) throws java.lang.Exception
ParameterizedObject
setParameters
in class ParameterizedObject
p
- the ParamParser containing the parameters and
their valuesrandomize
- should be set to true if it is desired
that any unset parameters be randomized
java.lang.Exception
public void randomizeParameters()
randomizeParameters
in class ParameterizedObject
protected void checkParameters() throws java.lang.Exception
ParameterizedObject
checkParameters
in class ParameterizedObject
java.lang.Exception
- if anything is wrong with the parameter
valuespublic void doGenerate()
doGenerate
in class ParameterizedObject
public double eval(double x)
Function
eval
in class Function
x
- the point at which to evaluate the functionpublic java.lang.String getDescription()
ParameterizedObject
getDescription
in class ParameterizedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |