Package net.bmahe.genetics4j.gp
Class OperationFactories
java.lang.Object
net.bmahe.genetics4j.gp.OperationFactories
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OperationFactory
static OperationFactory
of
(String name, Class[] acceptedTypes, Class returnedType, BiFunction<Object[], Object[], Object> compute) static <T,
U, V> OperationFactory ofBinary
(String name, Class<T> acceptedType1, Class<U> acceptedType2, Class<V> returnedType, BiFunction<T, U, V> compute) static OperationFactory
ofCoefficient
(String name, Class returnedType, Object value) static OperationFactory
ofOperationSupplier
(Class[] acceptedTypes, Class returnedType, Supplier<Operation> buildSupplier) static <T> OperationFactory
ofTerminal
(String name, Class<T> returnedType, Supplier<T> compute) static <T,
U> OperationFactory
-
Constructor Details
-
OperationFactories
private OperationFactories()
-
-
Method Details
-
ofOperationSupplier
public static OperationFactory ofOperationSupplier(Class[] acceptedTypes, Class returnedType, Supplier<Operation> buildSupplier) -
of
-
of
public static OperationFactory of(String name, Class[] acceptedTypes, Class returnedType, BiFunction<Object[], Object[], Object> compute) -
ofCoefficient
-
ofTerminal
public static <T> OperationFactory ofTerminal(String name, Class<T> returnedType, Supplier<T> compute) -
ofUnary
public static <T,U> OperationFactory ofUnary(String name, Class<T> acceptedType, Class<U> returnedType, Function<T, U> compute) -
ofBinary
public static <T,U, OperationFactory ofBinaryV> (String name, Class<T> acceptedType1, Class<U> acceptedType2, Class<V> returnedType, BiFunction<T, U, V> compute)
-