|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.groovyj.jgprog.Function
|
+--com.groovyj.jgprog.functions.NaturalLogarithm
The protected natural logarithm function. Allowed to be of type float or double. Its child is the argument and must be of the same type as this node.
If the argument is 0, the result is 0.
For float exponents, if the absolute result is greater than 1e10 then the result is clipped to +/-1e10.
For double exponents, if the absolute result is greater than 1e100 then the result is clipped to +/-1e100.
Copyright (c) 2000 Robert Baruch. This code is released under the GNU General Public License (GPL).
| Inner Class Summary | |
static interface |
NaturalLogarithm.Compatible
|
| Fields inherited from class com.groovyj.jgprog.Function |
arity, individual, returnType |
| Constructor Summary | |
NaturalLogarithm(Type type)
|
|
| Method Summary | |
double |
execute_double(Chromosome c,
int n)
Executes this node as a double. |
float |
execute_float(Chromosome c,
int n)
Executes this node as a float. |
java.lang.Object |
execute_object(Chromosome c,
int n)
Executes this node as an object. |
Type |
getChildType(int i)
Gets the type of node allowed form the given child number. |
java.lang.String |
getName()
Gets the name of this node. |
| Methods inherited from class com.groovyj.jgprog.Function |
execute_boolean, execute_int, execute_long, execute_void, execute, getArity, getReturnType, setIndividual, setReturnType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NaturalLogarithm(Type type)
| Method Detail |
public java.lang.String getName()
FunctiongetName in class Functioncom.groovyj.jgprog.Function
public float execute_float(Chromosome c,
int n)
Functionexecute_float in class Functioncom.groovyj.jgprog.FunctionUnsupportedOperationException - if the type of this node is not float
public double execute_double(Chromosome c,
int n)
Functionexecute_double in class Functioncom.groovyj.jgprog.FunctionUnsupportedOperationException - if the type of this node is not doublepublic Type getChildType(int i)
FunctiongetChildType in class Functioncom.groovyj.jgprog.Functioni - the child number
public java.lang.Object execute_object(Chromosome c,
int n)
Functionexecute_object in class Functioncom.groovyj.jgprog.FunctionUnsupportedOperationException - if the type of this node is not object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||