C# 클래스 Accord.Math.Optimization.QuadraticObjectiveFunction

Quadratic objective function.

In mathematics, a quadratic function, a quadratic polynomial, a polynomial of degree 2, or simply a quadratic, is a polynomial function in one or more variables in which the highest-degree term is of the second degree. For example, a quadratic function in three variables x, y, and z contains exclusively terms x², y², z², xy, xz, yz, x, y, z, and a constant:

f(x,y,z) = ax² + by² +cz² + dxy + exz + fyz + gx + hy + iz + j

Please note that the function's constructor expects the function expression to be given on this form. Scalar values must be located on the left of the variables, and no term should be duplicated in the quadratic expression. Please take a look on the examples section of this page for some examples of expected functions.

References: Wikipedia, The Free Encyclopedia. Quadratic Function. Available on: https://en.wikipedia.org/wiki/Quadratic_function

상속: NonlinearObjectiveFunction, IObjectiveFunction
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
QuadraticObjectiveFunction ( Expression function ) : System

Creates a new objective function specified through a string.

QuadraticObjectiveFunction ( double quadraticTerms, double linearTerms ) : System

Creates a new objective function specified through a string.

QuadraticObjectiveFunction ( string function ) : System

Creates a new objective function specified through a string.

QuadraticObjectiveFunction ( string function, CultureInfo culture ) : System

Creates a new objective function specified through a string.

ToString ( ) : string

Returns a System.String that represents this instance.

TryParse ( string str, CultureInfo culture, QuadraticObjectiveFunction &function ) : bool

Attempts to create a QuadraticObjectiveFunction from a System.String representation.

TryParse ( string str, QuadraticObjectiveFunction &function ) : bool

Attempts to create a QuadraticObjectiveFunction from a System.String representation.

비공개 메소드들

메소드 설명
addTuple ( string>.Dictionary terms, double v, string v1, string v2 ) : string>.Tuple
createLinearTermsVector ( ) : double[]
createQuadraticTermsMatrix ( ) : ].double[
function ( double input ) : double
gradient ( double input ) : double[]
initialize ( string>.Dictionary terms ) : void
parseExpression ( string>.Dictionary terms, Expression expr, double &scalar, bool dontAdd = false ) : string>.Tuple
parseString ( string f, CultureInfo culture ) : Dictionary,double>

메소드 상세

QuadraticObjectiveFunction() 공개 메소드

Creates a new objective function specified through a string.
public QuadraticObjectiveFunction ( Expression function ) : System
function Expression A containing /// the function in the form of a lambda expression.
리턴 System

QuadraticObjectiveFunction() 공개 메소드

Creates a new objective function specified through a string.
public QuadraticObjectiveFunction ( double quadraticTerms, double linearTerms ) : System
quadraticTerms double A Hessian matrix of quadratic terms defining the quadratic objective function.
linearTerms double The vector of linear terms associated with .
리턴 System

QuadraticObjectiveFunction() 공개 메소드

Creates a new objective function specified through a string.
public QuadraticObjectiveFunction ( string function ) : System
function string A containing /// the function in the form similar to "ax²+b".
리턴 System

QuadraticObjectiveFunction() 공개 메소드

Creates a new objective function specified through a string.
public QuadraticObjectiveFunction ( string function, CultureInfo culture ) : System
function string A containing /// the function in the form similar to "ax²+b".
culture System.Globalization.CultureInfo The culture information specifying how /// numbers written in the should /// be parsed. Default is CultureInfo.InvariantCulture.
리턴 System

ToString() 공개 메소드

Returns a System.String that represents this instance.
public ToString ( ) : string
리턴 string

TryParse() 공개 정적인 메소드

Attempts to create a QuadraticObjectiveFunction from a System.String representation.
public static TryParse ( string str, CultureInfo culture, QuadraticObjectiveFunction &function ) : bool
str string The string containing the function in textual form.
culture System.Globalization.CultureInfo The culture information specifying how /// numbers written in the should /// be parsed. Default is CultureInfo.InvariantCulture.
function QuadraticObjectiveFunction The resulting function, if it could be parsed.
리턴 bool

TryParse() 공개 정적인 메소드

Attempts to create a QuadraticObjectiveFunction from a System.String representation.
public static TryParse ( string str, QuadraticObjectiveFunction &function ) : bool
str string The string containing the function in textual form.
function QuadraticObjectiveFunction The resulting function, if it could be parsed.
리턴 bool