# OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting Class Reference

Curve fitting applications. More...

List of all members.

## Classes

class  PNormMinClass

## Static Public Member Functions

static float[] LeastSquares (float[,] A, float[] b, float[] W, float lambda)
Computes least squares fitting of Ax = b weighted by W and returns x.
static float[] LeastSquares (float[,] A, float[] b)
Computes least squares fitting of Ax = b and returns x.
static float[] LeastSquares (float[,] A, float[] b, float lambda)
Computes least squares fitting of Ax = b and returns x.
static float[] PNormMinimization (float[] x0, float[,] A, float[] b, float[] W, float[] lambda, float p, float q)
Computes the p-norm minimization of Ax - b with weights w, using q-norm regularization with weights lambda on x.
static float[] PNormMinimization (float[] x0, float[,] A, float[] b, float[] W, float[] lambda, float p, float q, float[,] AeqConstr, float[] bEqConstr)
Computes the p-norm minimization of Ax - b with weights w, using q-norm regularization with weights lambda on x.

## Static Public Attributes

static CLCalc.Program.Kernel kernelpNorm
Computes p-norm of a vector, sum(|xi|^p).
static CLCalc.Program.Kernel kerneldpNorm

## Detailed Description

Curve fitting applications.

## Member Function Documentation

 static float [] OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting.LeastSquares ( float A[,], float[] b, float lambda ) ` [static]`

Computes least squares fitting of Ax = b and returns x.

Parameters:
 A Dependent variables measurements b Independent variables measurements lambda Regularization term
 static float [] OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting.LeastSquares ( float A[,], float[] b ) ` [static]`

Computes least squares fitting of Ax = b and returns x.

Parameters:
 A Dependent variables measurements b Independent variables measurements
 static float [] OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting.LeastSquares ( float A[,], float[] b, float[] W, float lambda ) ` [static]`

Computes least squares fitting of Ax = b weighted by W and returns x.

Parameters:
 A Dependent variables measurements b Independent variables measurements W Weights lambda Regularization term
 static float [] OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting.PNormMinimization ( float[] x0, float A[,], float[] b, float[] W, float[] lambda, float p, float q, float AeqConstr[,], float[] bEqConstr ) ` [static]`

Computes the p-norm minimization of Ax - b with weights w, using q-norm regularization with weights lambda on x.

Parameters:
 x0 Start point A Dependent variables b Independent variables measurements W Weights of each equation lambda Regularization term of each component of x p Ax - b minimization exponent q x regularization exponent AeqConstr Equality constraint matrix AeqConstr * x = bConstr bEqConstr Equality constraint right hand side
 static float [] OpenCLTemplate.LinearAlgebra.floatOptimization.CurveFitting.PNormMinimization ( float[] x0, float A[,], float[] b, float[] W, float[] lambda, float p, float q ) ` [static]`

Computes the p-norm minimization of Ax - b with weights w, using q-norm regularization with weights lambda on x.

Parameters:
 x0 Start point A Dependent variables b Independent variables measurements W Weights of each equation lambda Regularization term of each component of x p Ax - b minimization exponent q x regularization exponent