public abstract class FunctionSet
extends java.lang.Object
getAllowedFunction()
will return
allowed functions only, providing an easy way to control which functions
can be used in mutations.
registerFunctions()
to add the required
functions.Constructor and Description |
---|
FunctionSet() |
Modifier and Type | Method and Description |
---|---|
void |
disableFunction(int index)
Disables the indexed function.
|
void |
enableFunction(int index)
Disables the indexed function.
|
Function |
getAllowedFunction(int index)
Returns an allowed function.
|
int |
getAllowedFunctionCount() |
Function |
getFunction(int index)
Returns a function from the complete collection,
enabled or disabled alike.
|
int |
getMaxArity()
Computes and returns the maximum arity out of
all enabled functions.
|
int |
getTotalFunctionCount() |
boolean |
isEnabled(Function function)
Checks if a specified function is enabled.
|
public int getAllowedFunctionCount()
public int getTotalFunctionCount()
public Function getAllowedFunction(int index)
index
- the allowed function index.public Function getFunction(int index)
index
- the function index.public int getMaxArity()
public void disableFunction(int index)
index
- the function to disable.public void enableFunction(int index)
index
- the function to disable.public boolean isEnabled(Function function)
function
- the function to check.