Class LinearFunction

java.lang.Object
planner.utils.objfunctions.LinearFunction
All Implemented Interfaces:
ObjectiveFunction

public class LinearFunction extends Object implements ObjectiveFunction
LinearFunction is a class implementing a linear scheme for estimate a value from a candidate solution and a set of input variables.
Since:
1.0
Version:
1.0
Author:
Alicia Vazquez Ramos
  • Constructor Details

    • LinearFunction

      public LinearFunction()
  • Method Details

    • compute

      public double compute(double[] genotype, double[] input)
      Computes an estimation for a candidate solution and a set of input variables with a linear scheme, multiplying each gene by each input variable. If one of the arrays is larger than the other the remaining values are added.
      Specified by:
      compute in interface ObjectiveFunction
      Parameters:
      genotype - candidate solution.
      input - input variables neede for the estimation.
      Returns:
      the estimation.