C# Class Accord.Math.Optimization.BaseOptimizationMethod

Base class for optimization methods.
Show file Open project: accord-net/framework

Public Methods

Method Description
Maximize ( ) : bool

Finds the maximum value of a function. The solution vector will be made available at the Solution property.

Maximize ( double values ) : bool

Finds the maximum value of a function. The solution vector will be made available at the Solution property.

Minimize ( ) : bool

Finds the minimum value of a function. The solution vector will be made available at the Solution property.

Minimize ( double values ) : bool

Finds the minimum value of a function. The solution vector will be made available at the Solution property.

Protected Methods

Method Description
ArgumentException ( string paramName, string message, string code ) : ArgumentOutOfRangeException

Creates an exception with a given inner optimization algorithm code (for debugging purposes).

BaseOptimizationMethod ( NonlinearObjectiveFunction function ) : System

Initializes a new instance of the BaseOptimizationMethod class.

BaseOptimizationMethod ( int numberOfVariables ) : System

Initializes a new instance of the BaseOptimizationMethod class.

BaseOptimizationMethod ( int numberOfVariables, double>.Func function ) : System

Initializes a new instance of the BaseOptimizationMethod class.

OperationException ( string message, string code ) : InvalidOperationException

Creates an exception with a given inner optimization algorithm code (for debugging purposes).

Optimize ( ) : bool

Implements the actual optimization algorithm. This method should try to minimize the objective function.

Private Methods

Method Description
init ( int numberOfVariables ) : void

Method Details

ArgumentException() protected static method

Creates an exception with a given inner optimization algorithm code (for debugging purposes).
protected static ArgumentException ( string paramName, string message, string code ) : ArgumentOutOfRangeException
paramName string
message string
code string
return System.ArgumentOutOfRangeException

BaseOptimizationMethod() protected method

Initializes a new instance of the BaseOptimizationMethod class.
protected BaseOptimizationMethod ( NonlinearObjectiveFunction function ) : System
function NonlinearObjectiveFunction The objective function whose optimum values should be found.
return System

BaseOptimizationMethod() protected method

Initializes a new instance of the BaseOptimizationMethod class.
protected BaseOptimizationMethod ( int numberOfVariables ) : System
numberOfVariables int The number of free parameters in the optimization problem.
return System

BaseOptimizationMethod() protected method

Initializes a new instance of the BaseOptimizationMethod class.
protected BaseOptimizationMethod ( int numberOfVariables, double>.Func function ) : System
numberOfVariables int The number of free parameters in the optimization problem.
function double>.Func The objective function whose optimum values should be found.
return System

Maximize() public method

Finds the maximum value of a function. The solution vector will be made available at the Solution property.
public Maximize ( ) : bool
return bool

Maximize() public method

Finds the maximum value of a function. The solution vector will be made available at the Solution property.
public Maximize ( double values ) : bool
values double The initial solution vector to start the search.
return bool

Minimize() public method

Finds the minimum value of a function. The solution vector will be made available at the Solution property.
public Minimize ( ) : bool
return bool

Minimize() public method

Finds the minimum value of a function. The solution vector will be made available at the Solution property.
public Minimize ( double values ) : bool
values double The initial solution vector to start the search.
return bool

OperationException() protected static method

Creates an exception with a given inner optimization algorithm code (for debugging purposes).
protected static OperationException ( string message, string code ) : InvalidOperationException
message string
code string
return System.InvalidOperationException

Optimize() protected abstract method

Implements the actual optimization algorithm. This method should try to minimize the objective function.
protected abstract Optimize ( ) : bool
return bool