|
||||||||||
| 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.TableFunction
Class implements a table lookup function for truly random table functions.
| Field Summary | |
protected static Parameters.ParamInfo |
pMax
|
protected static Parameters.ParamInfo |
pMin
|
protected static Parameters.ParamInfo |
pPoints
|
protected double[] |
table
|
protected static Parameters.ParamInfo[] |
tfParam
|
| Fields inherited from class edu.stanford.multiagent.gamer.functions.Function |
dMax, dMin |
| Fields inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
parameters |
| Constructor Summary | |
TableFunction()
|
|
| Method Summary | |
protected void |
checkParameters()
Checks if Parameter values are consistent. |
void |
doGenerate()
Generates the table. |
double |
eval(double x)
Evaluates the table, by finding nearest point. |
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 |
static void |
main(java.lang.String[] args)
Used only for testings |
void |
randomizeParameters()
Randomizes things |
| Methods inherited from class edu.stanford.multiagent.gamer.functions.Function |
getDMax, getDMin, getHelp, setDomain |
| Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
getBooleanParameter, getDescription, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, setParameter, setParameter, setParameters, setParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Parameters.ParamInfo pMin
protected static Parameters.ParamInfo pMax
protected static Parameters.ParamInfo pPoints
protected static Parameters.ParamInfo[] tfParam
protected double[] table
| Constructor Detail |
public TableFunction()
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 Functionjava.lang.Exception - if there is a problem with the parameters
protected void checkParameters()
throws java.lang.Exception
ParameterizedObject
checkParameters in class ParameterizedObjectjava.lang.Exception - if anything is wrong with the parameter
valuespublic void randomizeParameters()
randomizeParameters in class ParameterizedObjectpublic void doGenerate()
doGenerate in class ParameterizedObjectpublic double eval(double x)
eval in class Functionx - the point at which to evaluate the function
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||