Class InputOperation<T>

java.lang.Object
net.bmahe.genetics4j.gp.Operation<T>
net.bmahe.genetics4j.gp.math.InputOperation<T>
Direct Known Subclasses:
ImmutableInputOperation

@Immutable public abstract class InputOperation<T> extends Operation<T>
  • Constructor Details

    • InputOperation

      public InputOperation()
  • Method Details

    • acceptedTypes

      public List<Class> acceptedTypes()
      Description copied from class: Operation
      Returns the list of types that this operation accepts as arguments.

      For strongly-typed genetic programming, this defines the type constraints for each argument position. The list size determines the operation's arity.

      Specified by:
      acceptedTypes in class Operation<T>
      Returns:
      the list of accepted argument types, empty for terminals
    • compute

      public BiFunction<T[],Object[],Object> compute()
      Description copied from class: Operation
      Returns the computation function for this operation.
      Specified by:
      compute in class Operation<T>
      Returns:
      a function that takes input arguments and parameters and returns the computed result
    • index

      @Parameter public abstract int index()