Package planner.utils.objfunctions
Class LinearFunction
java.lang.Object
planner.utils.objfunctions.LinearFunction
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface planner.utils.objfunctions.ObjectiveFunction
getInstancesEstimations
-
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 interfaceObjectiveFunction
- Parameters:
genotype
- candidate solution.input
- input variables neede for the estimation.- Returns:
- the estimation.
-