Package Functions
Class QuadraticFunction
java.lang.Object
Functions.QuadraticFunction
- All Implemented Interfaces:
Function
public class QuadraticFunction extends java.lang.Object implements Function
Class for representation of quadratic function of R^n
-
Field Summary
-
Constructor Summary
Constructors Constructor Description QuadraticFunction(double[][] a, double[] b, double c)Standard constructor of matrix representation of function -
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
-
QuadraticFunction
public QuadraticFunction(double[][] a, double[] b, double c)Standard constructor of matrix representation of function
-
-
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)
-