Package | Description |
---|---|
org.oakgp |
A tree-based genetic programming framework.
|
org.oakgp.function |
Provides functions that accept arguments and produce a result.
|
org.oakgp.function.choice |
Provides functions for selection.
|
org.oakgp.function.coll |
Provides functions for working with collections.
|
org.oakgp.function.compare |
Provides functions for comparing the results of evaluating
Node instances. |
org.oakgp.function.hof |
Provides higher-order functions.
|
org.oakgp.generate |
Provides classes for the creation of an initial population.
|
org.oakgp.node |
Provides classes that can be used to construct hierarchical tree structures.
|
org.oakgp.primitive |
Provides classes for specifying the contents of a primitive set.
|
org.oakgp.util |
Utility classes that support the functionality provided by the rest of the framework.
|
Modifier and Type | Method and Description |
---|---|
static Type |
Type.arrayType(Type t)
Returns the type associated with a
Arguments containing elements of the specified type. |
static Type |
Type.bigDecimalType()
Returns the type associated with instances of
java.math.BigDecimal . |
static Type |
Type.bigIntegerType()
Returns the type associated with instances of
java.math.BigInteger . |
static Type |
Type.booleanArrayType()
Returns the type associated with a
Arguments containing elements of type booleanType() . |
static Type |
Type.booleanType()
Returns the type associated with instances of
java.lang.Boolean . |
static Type |
Type.doubleType()
Returns the type associated with instances of
java.lang.Double . |
static Type |
Type.functionType(Type... signature)
Returns the type associated with instances of
org.oakgp.function.Function with the specified signature. |
static Type |
Type.integerArrayType()
Returns the type associated with a
Arguments containing elements of type integerType() . |
static Type |
Type.integerToBooleanFunctionType()
Returns the type associated with
org.oakgp.function.Function instances that accept a integerType() and return booleanType() . |
static Type |
Type.integerType()
Returns the type associated with instances of
java.lang.Integer . |
static Type |
Type.longType()
Returns the type associated with instances of
java.lang.Long . |
static Type |
Type.nullableType(Type t)
Returns a type that represents values that can be either the given
Type or null . |
static Type |
Type.stringType()
Returns the type associated with instances of
java.lang.String . |
static Type |
Type.type(String name)
Returns a
Type with the given name. |
static Type |
Type.type(String name,
Type... args)
Returns a
Type with the given name and arguments. |
Modifier and Type | Method and Description |
---|---|
static Type |
Type.arrayType(Type t)
Returns the type associated with a
Arguments containing elements of the specified type. |
int |
Type.compareTo(Type t) |
static Type |
Type.functionType(Type... signature)
Returns the type associated with instances of
org.oakgp.function.Function with the specified signature. |
static boolean |
Type.isNullable(Type t)
Returns
true if the given Type represents values that may be null . |
static Type |
Type.nullableType(Type t)
Returns a type that represents values that can be either the given
Type or null . |
static boolean |
Type.sameTypes(Type[] a,
Type[] b)
Returns
true if the two arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are the same. |
static boolean |
Type.sameTypes(Type[] a,
Type[] b)
Returns
true if the two arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are the same. |
static Type |
Type.type(String name,
Type... args)
Returns a
Type with the given name and arguments. |
Modifier and Type | Method and Description |
---|---|
Type |
Signature.getArgumentType(int index)
Returns the
Type at the specified position in the arguments of this signature. |
Type |
Signature.getReturnType()
Returns the type associated with values returned by the evaluation of functions that have this signature.
|
Modifier and Type | Method and Description |
---|---|
List<Type> |
Signature.getArgumentTypes()
Returns an unmodifiable list containing the type of each argument associated with this signature.
|
Modifier and Type | Method and Description |
---|---|
static Signature |
Signature.createSignature(Type returnType,
Type... argumentTypes)
Returns a new
Signature with the specified return type and argument types. |
static Signature |
Signature.createSignature(Type returnType,
Type... argumentTypes)
Returns a new
Signature with the specified return type and argument types. |
Constructor and Description |
---|
If(Type type)
Constructs a selection operator that returns values of the specified type.
|
OrElse(Type type)
Constructs a selection operator that returns values of the specified type.
|
SwitchEnum(Class<? extends Enum<?>> enumClass,
Type enumType,
Type returnType)
Constructs a selection operator that returns values of the specified type.
|
Constructor and Description |
---|
Count(Type t)
Constructs a function to return the number of items in collections of the specified type.
|
Modifier and Type | Method and Description |
---|---|
static LessThanOrEqual |
LessThanOrEqual.create(Type t)
Returns a
LessThanOrEqual for comparing functions of the specified type. |
static LessThan |
LessThan.create(Type t)
Returns a
LessThan for comparing functions of the specified type. |
Constructor and Description |
---|
Equal(Type type)
Constructs a function that compares two arguments of the specified type.
|
GreaterThan(Type type)
Constructs a function that compares two arguments of the specified type.
|
GreaterThanOrEqual(Type type)
Constructs a function that compares two arguments of the specified type.
|
NotEqual(Type type)
Constructs a function that compares two arguments of the specified type.
|
Constructor and Description |
---|
Filter(Type type)
Creates a higher order functions that filters the elements of a collection.
|
Map(Type from,
Type to)
Creates a higher order functions that applies a function to each element of a collection.
|
Reduce(Type type)
Creates a higher order functions that recursively applies a function to the elements of a collection.
|
Modifier and Type | Method and Description |
---|---|
Node |
TreeGeneratorImpl.generate(Type type,
int depth) |
Node |
TreeGenerator.generate(Type type,
int depth)
Constructs a new tree data structure.
|
Modifier and Type | Method and Description |
---|---|
Type |
VariableNode.getType() |
Type |
Node.getType()
Returns the
Type of this Node . |
Type |
FunctionNode.getType() |
Type |
ConstantNode.getType() |
Constructor and Description |
---|
ConstantNode(Object value,
Type type)
Constructs a new
ConstantNode that represents the specified value. |
VariableNode(int id,
Type type)
Constructs a new
VariableNode with the specified ID. |
Modifier and Type | Method and Description |
---|---|
static VariableSet |
VariableSet.createVariableSet(Type... variableTypes)
Constructs a variable set containing variables of the specified types.
|
List<VariableNode> |
VariableSet.getByType(Type type)
Returns a list of all variables in this set that are of the specified type.
|
List<Function> |
FunctionSet.getByType(Type type)
Returns a list of all functions in this set that have the specified return type.
|
List<ConstantNode> |
ConstantSet.getByType(Type type)
Returns a list of all constants in this set that are of the specified type.
|
boolean |
PrimitiveSetImpl.hasFunctions(Type type) |
boolean |
PrimitiveSet.hasFunctions(Type type)
Returns
true if the primitive set contains at least one function which has a return type of the specified type, else false . |
boolean |
PrimitiveSetImpl.hasTerminals(Type type) |
boolean |
PrimitiveSet.hasTerminals(Type type)
Returns
true if the primitive set contains at least one terminal node of the specified type, else false . |
Function |
PrimitiveSetImpl.nextFunction(Type type)
Returns a randomly selected
Function of the specified Type . |
Function |
PrimitiveSet.nextFunction(Type type)
Returns a randomly selected
Function of the specified Type . |
Node |
PrimitiveSetImpl.nextTerminal(Type type)
Returns a randomly selected terminal node.
|
Node |
PrimitiveSet.nextTerminal(Type type)
Returns a randomly selected terminal node.
|
Modifier and Type | Field and Description |
---|---|
static Type |
Void.VOID_TYPE
Returns the type associated with instances of
Void.VOID . |
Modifier and Type | Method and Description |
---|---|
static Type[] |
Utils.createIntegerTypeArray(int size)
Creates an array of the specified size and assigns the result of
integerType() to each element. |
Type |
RunBuilder.Config.getReturnType() |
Modifier and Type | Method and Description |
---|---|
static <T extends Node> |
Utils.groupByType(T[] nodes)
Returns a map grouping the specified nodes by their
Type . |
Modifier and Type | Method and Description |
---|---|
static ConstantNode[] |
Utils.createEnumConstants(Class<? extends Enum<?>> e,
Type t)
Returns an array consisting of a
ConstantNode instance for each of the possible values of the specified enum. |
RunBuilder.RandomSetter |
RunBuilder.setReturnType(Type returnType)
Sets the required
Type associated with the values produced as a result of evaluating the programs that are automatically generated by the run. |
RunBuilder.VariablesRatioSetter |
RunBuilder.VariablesSetter.setVariables(Type... variableTypes)
Sets the
Type s to associate with the variables available for use in the construction of programs generated by the run. |
OakGP Genetic Programming Framework