Package Functions
Class QuadraticDiagonalFunction
java.lang.Object
Functions.QuadraticDiagonalFunction
- All Implemented Interfaces:
Function
public class QuadraticDiagonalFunction extends java.lang.Object implements Function
CLass for economic representation of quadratic function from R^n by diagonal matrix.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description QuadraticDiagonalFunction(double[] a, double[] b, double c)Standard constructor for the function given by diagonal matrix -
Method Summary
Modifier and Type Method Description double[]multiply(double[] x)function that compute (A * x)doublerun(double[] x)Compute the function meaning in the point given like vectordouble[]runGradient(double[] x)Compute gradient of the function in given point
-
Field Details
-
Constructor Details
-
QuadraticDiagonalFunction
public QuadraticDiagonalFunction(double[] a, double[] b, double c)Standard constructor for the function given by diagonal matrix
-
-
Method Details
-
run
public double run(double[] x)Description copied from interface:FunctionCompute the function meaning in the point given like vector -
runGradient
public double[] runGradient(double[] x)Description copied from interface:FunctionCompute gradient of the function in given point- Specified by:
runGradientin interfaceFunction- Parameters:
x- vector that represent point- Returns:
- vector that represent gradient of the function
-
multiply
public double[] multiply(double[] x)Description copied from interface:Functionfunction that compute (A * x)
-