|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectec.cgp.functions.FunctionsRegression
public class FunctionsRegression
Function set for the regression problems.
| Field Summary | |
|---|---|
(package private) static int |
F_ADD
Add |
(package private) static int |
F_DIV
Safe divide |
(package private) static int |
F_MUL
Multiply |
(package private) static int |
F_SUB
Subtract |
| Constructor Summary | |
|---|---|
FunctionsRegression()
|
|
| Method Summary | |
|---|---|
int |
arityOf(int fn)
Return the arity of the given function |
java.lang.Object |
callFunction(java.lang.Object[] inputs,
int function,
int numFunctions)
Interpret the given function and apply it to the given inputs. |
java.lang.String |
functionName(int fn)
Return a function name, suitable for display in expressions, for the given function. |
java.lang.String |
inputName(int inp,
java.lang.Object val)
Return the name, suitable for display, for the given input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static int F_ADD
static int F_SUB
static int F_MUL
static int F_DIV
| Constructor Detail |
|---|
public FunctionsRegression()
| Method Detail |
|---|
public java.lang.Object callFunction(java.lang.Object[] inputs,
int function,
int numFunctions)
callFunction in interface Functionsinputs - The arguments passed to the function. It is possible that some
or all of the arguments will be unused by some functions.function - The function number. Every function number must map to a
function.numFunctions - The total number of functions available.
public java.lang.String functionName(int fn)
functionName in interface Functionsfn - The function number
public int arityOf(int fn)
arityOf in interface Functionsfn - the function number
public java.lang.String inputName(int inp,
java.lang.Object val)
inputName in interface Functionsinp - The input numberval - Optional input value (needed if you want to display a constant
value for this input)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||