edu.stanford.multiagent.gamer.functions
Class LogFunction

java.lang.Object
  |
  +--edu.stanford.multiagent.gamer.ParameterizedObject
        |
        +--edu.stanford.multiagent.gamer.functions.Function
              |
              +--edu.stanford.multiagent.gamer.functions.LogFunction

public class LogFunction
extends Function

Class implements a log function.


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
LogFunction()
           
 
Method Summary
protected  void checkParameters()
          Checks if Parameter values are consistent.
 void doGenerate()
          Shifts the function if the domain min is less than or equal to 0.
 double eval(double x)
          Evaluates the function at a single point and return the value
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
 
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, randomizeParameters, setParameter, setParameter, setParameters, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFunction

public LogFunction()
            throws java.lang.Exception
Method Detail

getFunctionHelp

protected java.lang.String getFunctionHelp()
Description copied from class: Function
Returns a help string describing the function and the parameters taken by the function

Specified by:
getFunctionHelp in class Function

initialize

public void initialize()
                throws java.lang.Exception
Description copied from class: Function
Calls initialize in the super class ParemeterizedObject which checks parameters

Overrides:
initialize in class Function
Throws:
java.lang.Exception - if there is a problem with the parameters

checkParameters

protected void checkParameters()
                        throws java.lang.Exception
Description copied from class: ParameterizedObject
Checks if Parameter values are consistent. Must be implemented by every non-abstract subclass of ParameterizedObject.

Specified by:
checkParameters in class ParameterizedObject
Throws:
java.lang.Exception - if anything is wrong with the parameter values

doGenerate

public void doGenerate()
Shifts the function if the domain min is less than or equal to 0.

Specified by:
doGenerate in class ParameterizedObject

eval

public double eval(double x)
Description copied from class: Function
Evaluates the function at a single point and return the value

Specified by:
eval in class Function
Parameters:
x - the point at which to evaluate the function