|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectec.cgp.functions.FunctionsBreastCancerY
public class FunctionsBreastCancerY
Function set for the Breast Cancer (Wisconsin) classification problem.
| Field Summary | |
|---|---|
(package private) static int |
F_ADD
add |
(package private) static int |
F_AND
logical and |
(package private) static int |
F_DIV
safe divide; return 1 if divisor is 0. |
(package private) static int |
F_EQ
equal to |
(package private) static int |
F_GT
greater than |
(package private) static int |
F_GTE
greater than or equal to |
(package private) static int |
F_IF
if... |
(package private) static int |
F_IFLEZ
if less than zero then... |
(package private) static int |
F_LT
less than |
(package private) static int |
F_LTE
less than or equal to |
(package private) static int |
F_MUL
multiply |
(package private) static int |
F_NAND
logical nand |
(package private) static int |
F_NEG
negate |
(package private) static int |
F_NOR
logical nor |
(package private) static int |
F_NOT
logical not |
(package private) static int |
F_OR
logical or |
(package private) static int |
F_SUB
subtract |
| Constructor Summary | |
|---|---|
FunctionsBreastCancerY()
|
|
| Method Summary | |
|---|---|
int |
arityOf(int fn)
Return the arity of the given function |
static float |
b2f(boolean inp)
Convert the given boolean to float. |
java.lang.Object |
callFunction(java.lang.Object[] inputs,
int function,
int numFunctions)
Interpret the given function and apply it to the given inputs. |
static boolean |
f2b(float inp)
Interpret the given float as a boolean value. |
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. |
static void |
main(java.lang.String[] args)
|
static void |
testFunctions()
Simple test of the function set. |
| 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
static int F_LT
static int F_LTE
static int F_GT
static int F_GTE
static int F_EQ
static int F_AND
static int F_OR
static int F_NOT
static int F_NOR
static int F_NAND
static int F_NEG
static int F_IF
static int F_IFLEZ
| Constructor Detail |
|---|
public FunctionsBreastCancerY()
| 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 static boolean f2b(float inp)
public static float b2f(boolean inp)
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)
public static void testFunctions()
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||