Namespace List

The namespaces specified in this document are:

NamespaceAssembly
Net.Kniaz.Optimization.QuasiNewton.TestsNet.Kniaz.Optimization
Net.Kniaz.OptimizationNet.Kniaz.Optimization
Net.Kniaz.Optimization.NonGradient.TestsNet.Kniaz.Optimization
Net.Kniaz.Optimization.QuasiNewtonNet.Kniaz.Optimization
Net.Kniaz.Math.DFPNet.Kniaz.Optimization
Net.Kniaz.Optimization.NonGradientNet.Kniaz.Optimization

Namespace : Net.Kniaz.Math.DFP



Net.Kniaz.Math.DFP Type List

Classes

TypeSummary
LinearSearch Summary description for Class1.


Net.Kniaz.Math.DFP Classes

LinearSearch Class

Summary

public class LinearSearch

Summary description for Class1.

Constructor Members

NameAccessSummary
LinearSearch()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
Search() : Voidpublic

Namespace : Net.Kniaz.Optimization.QuasiNewton



Net.Kniaz.Optimization.QuasiNewton Type List

Classes

TypeSummary
BFGS Summary description for QuasiNewtonOptimization.
DFP Summary description for DFP.
LineSearch Summary description for LineSearch.
OneDWrapper Summary description for OneDWrapper.
Optimizer Summary description for Optimizer.


Net.Kniaz.Optimization.QuasiNewton Classes

Optimizer Class

Summary

public abstract class Optimizer

Summary description for Optimizer.

Constructor Members

NameAccessSummary
Optimizer()public

Field Members

NameAccessSummary
_alpha : Doubleprotected
_curIter : Int32protected
_epsilon : Doubleprotected
_f : IGradientFunctionprotected
_hessian : GeneralMatrixprotected
_initial : Double[]protected
_itMax : Int32protected
_nDim : Int32protected
_step : Doubleprotected
_xCurrent : Double[]protected

Property Members

NameAccessSummary
Iteration : Int32public
Minimum : Double[]public

Method Members

NameAccessSummary
CalculateNextHessianApproximation() : GeneralMatrixprotected
Diff() : Doubleprotected
FindMinimum() : Voidpublic

BFGS Class

Summary

public class BFGS : Optimizer

Summary description for QuasiNewtonOptimization.

Constructor Members

NameAccessSummary
BFGS()public

Field Members

NameAccessSummary
_alpha : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_curIter : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_epsilon : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_f : IGradientFunctionprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_hessian : GeneralMatrixprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_initial : Double[]protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_itMax : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_nDim : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_step : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_xCurrent : Double[]protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

Property Members

NameAccessSummary
Iteration : Int32public(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
Minimum : Double[]public(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

Method Members

NameAccessSummary
CalculateNextHessianApproximation() : GeneralMatrixprotected
Diff() : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
FindMinimum() : Voidpublic(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

DFP Class

Summary

public class DFP : Optimizer

Summary description for DFP.

Constructor Members

NameAccessSummary
DFP()public

Field Members

NameAccessSummary
_alpha : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_curIter : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_epsilon : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_f : IGradientFunctionprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_hessian : GeneralMatrixprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_initial : Double[]protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_itMax : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_nDim : Int32protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_step : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
_xCurrent : Double[]protected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

Property Members

NameAccessSummary
Iteration : Int32public(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
Minimum : Double[]public(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

Method Members

NameAccessSummary
CalculateNextHessianApproximation() : GeneralMatrixprotected
Diff() : Doubleprotected(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)
FindMinimum() : Voidpublic(from Net.Kniaz.Optimization.QuasiNewton.Optimizer)

LineSearch Class

Summary

public class LineSearch

Summary description for LineSearch.

Constructor Members

NameAccessSummary
LineSearch()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
FindMinimumViaBrent() : Int32public Finds minimum via a Brent Method: http://mathworld.wolfram.com/BrentsMethod.html
FindMinimumViaGoldenSection() : Int32public Finds minimum via gold section search. x1 must be between x0 and x2
FindMinInterval() : Int32public

OneDWrapper Class

Summary

public class OneDWrapper : Net.Kniaz.Optimization.IOneDFunction

Summary description for OneDWrapper.

Constructor Members

NameAccessSummary
OneDWrapper()public

Method Members

NameAccessSummary
GetVal() : Doublepublic

Namespace : Net.Kniaz.Optimization.QuasiNewton.Tests



Net.Kniaz.Optimization.QuasiNewton.Tests Type List

Classes

TypeSummary
BananaInitializes a new instance of the class.
BrentTests Testing linear minimum search using Brent method.
DerivativesInitializes a new instance of the class.
DFPTests TestDFP.
GoldenTests Testing one dimensional minimum using the Golden Section Algorithm
IntervalTests Testing of the interval barcketing algorithm
ParabolaInitializes a new instance of the class.
TestFunctionInitializes a new instance of the class.


Net.Kniaz.Optimization.QuasiNewton.Tests Classes

BrentTests Class

Summary

public class BrentTests

Testing linear minimum search using Brent method.

Constructor Members

NameAccessSummary
BrentTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
MinBrent1() : Voidpublic Testing using function from the interval test function. Global Min is at x = -1.364641. We are starting with finding the bracket at 10 with step 1. Bracket function returns -4.764, -0.529, 6.326. These are fed to the 1D min function
MinBrent2() : Voidpublic This time the start is around the local minimum so the search should converge around local minimum
MinBrent3() : Voidpublic Tests regular parabola with a min of -0.75. Start the test coming from negative direction
MinBrent4() : Voidpublic Testing the same parabola as in the previous function but coming from the far positive direction
MinBrent5() : Voidpublic testing a parabola added to an exp

TestFunction Class

Summary

public class TestFunction : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

Constructor Members

NameAccessSummary
TestFunction()publicInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic

Parabola Class

Summary

public class Parabola : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

Constructor Members

NameAccessSummary
Parabola()publicInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic

Banana Class

Summary

public class Banana : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

Constructor Members

NameAccessSummary
Banana()publicInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic

Derivatives Class

Summary

public class Derivatives

Constructor Members

NameAccessSummary
Derivatives()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
Hessian() : Voidpublic
PartialDerivative00() : Voidpublic
PartialDerivative01() : Voidpublic
PartialDerivative02() : Voidpublic
PartialDerivative10() : Voidpublic
PartialDerivative11() : Voidpublic
PartialDerivative12() : Voidpublic
PartialDerivative20() : Voidpublic
PartialDerivative21() : Voidpublic
PartialDerivative22() : Voidpublic

DFPTests Class

Summary

public class DFPTests

TestDFP.

Constructor Members

NameAccessSummary
DFPTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
FitBFGS1() : Voidpublic
FitBFGS2() : Voidpublic
FitBFGS3() : Voidpublic
FitDFP1() : Voidpublic
FitDFP2() : Voidpublic
FitDFP3() : Voidpublic

GoldenTests Class

Summary

public class GoldenTests

Testing one dimensional minimum using the Golden Section Algorithm

Constructor Members

NameAccessSummary
GoldenTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
MinGold1() : Voidpublic Testing the algorithm using the test function test1 - a "w" shaped function Global Min is at x = -1.364641. We are starting with finding the bracket at 10 with step 1. Bracket function returns -4.764, -0.529, 6.326. These are fed to the 1D min function
MinGold2() : Voidpublic This time the start ofsearch is close to the local minimum so the search should converge to local minimum
MinGold3() : Voidpublic Tests regular parabola with a min of -0.75 coming from negative direction
MinGold4() : Voidpublic testing a parabola coming from the far positive direction

IntervalTests Class

Summary

public class IntervalTests

Testing of the interval barcketing algorithm

Constructor Members

NameAccessSummary
IntervalTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
MinInterval1() : Voidpublic Try finding a bracket starting from negative end
MinInterval2() : Voidpublic Start from the positive end
MinInterval3() : Voidpublic

Namespace : Net.Kniaz.Optimization.NonGradient



Net.Kniaz.Optimization.NonGradient Type List

Classes

TypeSummary
Nelder Implements Nelder-Mead method of fiding minimum http://mathworld.wolfram.com/Nelder-MeadMethod.html
Rosenbrock Implements the Rosenbrock optimization algorithm http://www.applied-mathematics.net/optimization/Rosenbrockbrock.html


Net.Kniaz.Optimization.NonGradient Classes

Nelder Class

Summary

public class Nelder

Implements Nelder-Mead method of fiding minimum http://mathworld.wolfram.com/Nelder-MeadMethod.html

Constructor Members

NameAccessSummary
Nelder()public Parametrized constructor

Property Members

NameAccessSummary
Epsilon : Doublepublic
Iterations : Int32public
Itmax : Int32public
Result : Double[]public

Method Members

NameAccessSummary
FindMinimum() : Voidpublic Finds minimum for a function and parameters given in the constructor

Rosenbrock Class

Summary

public class Rosenbrock

Implements the Rosenbrock optimization algorithm http://www.applied-mathematics.net/optimization/Rosenbrockbrock.html

Constructor Members

NameAccessSummary
Rosenbrock()public Parametrized constructor

Property Members

NameAccessSummary
Epsilon : Doublepublic
Iterations : Int32public
Itmax : Int32public

Method Members

NameAccessSummary
FindMinimum() : Voidpublic Finds minimum of the function

Namespace : Net.Kniaz.Optimization.NonGradient.Tests



Net.Kniaz.Optimization.NonGradient.Tests Type List

Classes

TypeSummary
NelderTests Tests Nelder Mead with 5 dimensional parabola and 3d Banana
RosenTests Summary description for TestRosenbrock.


Net.Kniaz.Optimization.NonGradient.Tests Classes

NelderTests Class

Summary

public class NelderTests

Tests Nelder Mead with 5 dimensional parabola and 3d Banana

Constructor Members

NameAccessSummary
NelderTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
CalculateBananaMinimum() : Voidpublic
CalculateParabolaMinimum() : Voidpublic

RosenTests Class

Summary

public class RosenTests

Summary description for TestRosenbrock.

Constructor Members

NameAccessSummary
RosenTests()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
CalculateBananaMinimum() : Voidpublic Calculate minimum of the rosebrock "Banana" function using Rosenbrock method
CalculateParabolaMinimum() : Voidpublic Calculates the minimum of the 5 dimensional parabola using the rosenbrock Method

Namespace : Net.Kniaz.Optimization



Net.Kniaz.Optimization Type List

Interfaces

TypeSummary
IFunction Interface for an arbitrary function of n dimensions
IGradientFunction Interface for a Real function with gradient
IOneDFunction Interface for real function of 1 dimension. Defined for use in linear searches.

Classes

TypeSummary
Banana 3 Dimensional banana - most gradient methods fail on this function. Rosenbrockbroock is very good at finding minimum for this
NumericNet Helper function that calculates square root of sum of squares Used by the test function to test on minimum
Parabola Summary description for Functions.
RealFunction Summary description for RealFunction.
TestFunction 3 dimensional quadratic function with the minimum at (1,-2,3)
TestFunction1 Test function has a W like shape with the first dip being global minimum at x =~-1.5 and the second dip at x = 4
TestFunction2 A regular Parabola with a min of -0.75
TestFunction3 This function is "glued" from expotential and a parabola minimum is at 0.78152


Net.Kniaz.Optimization Interfaces

IFunction Interface

Summary

public interface IFunction

Interface for an arbitrary function of n dimensions

Property Members

NameAccessSummary
Dimension : Int32public Returns dimension of the function

Method Members

NameAccessSummary
GetVal() : Doublepublic Return Value of the function for a value vector x

IGradientFunction Interface

Summary

public interface IGradientFunction : Net.Kniaz.Optimization.IFunction

Interface for a Real function with gradient

Method Members

NameAccessSummary
GetDerivativeVal() : Doublepublic returns the value of the derivative for the nth varaible at some point
GetGradient() : Double[]public

IOneDFunction Interface

Summary

public interface IOneDFunction

Interface for real function of 1 dimension. Defined for use in linear searches.

Method Members

NameAccessSummary
GetVal() : Doublepublic


Net.Kniaz.Optimization Classes

RealFunction Class

Summary

public abstract class RealFunction : Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

Summary description for RealFunction.

Constructor Members

NameAccessSummary
RealFunction()protectedInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic
GetDerivativeVal() : Doublepublic
GetGradient() : Double[]public
GetHessian() : Double[][]public
GetPartialDerivativeVal() : Doublepublic
GetVal() : Doublepublic

TestFunction Class

Summary

public class TestFunction : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

3 dimensional quadratic function with the minimum at (1,-2,3)

Constructor Members

NameAccessSummary
TestFunction()publicInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic

TestFunction1 Class

Summary

public class TestFunction1 : Net.Kniaz.Optimization.IOneDFunction

Test function has a W like shape with the first dip being global minimum at x =~-1.5 and the second dip at x = 4

Constructor Members

NameAccessSummary
TestFunction1()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
GetVal() : Doublepublic

TestFunction2 Class

Summary

public class TestFunction2 : Net.Kniaz.Optimization.IOneDFunction

A regular Parabola with a min of -0.75

Constructor Members

NameAccessSummary
TestFunction2()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
GetVal() : Doublepublic

TestFunction3 Class

Summary

public class TestFunction3 : Net.Kniaz.Optimization.IOneDFunction

This function is "glued" from expotential and a parabola minimum is at 0.78152

Constructor Members

NameAccessSummary
TestFunction3()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
GetVal() : Doublepublic

NumericNet Class

Summary

public class NumericNet

Helper function that calculates square root of sum of squares Used by the test function to test on minimum

Constructor Members

NameAccessSummary
NumericNet()publicInitializes a new instance of the class.

Method Members

NameAccessSummary
CalcDiff() : Doublepublic

Parabola Class

Summary

public class Parabola : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

Summary description for Functions.

Constructor Members

NameAccessSummary
Parabola()public

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic

Banana Class

Summary

public class Banana : RealFunction, Net.Kniaz.Optimization.IGradientFunction, Net.Kniaz.Optimization.IFunction

3 Dimensional banana - most gradient methods fail on this function. Rosenbrockbroock is very good at finding minimum for this

Constructor Members

NameAccessSummary
Banana()publicInitializes a new instance of the class.

Property Members

NameAccessSummary
Dimension : Int32public

Method Members

NameAccessSummary
CalculateHessian() : GeneralMatrixpublic(from Net.Kniaz.Optimization.RealFunction)
GetDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetGradient() : Double[]public(from Net.Kniaz.Optimization.RealFunction)
GetHessian() : Double[][]public(from Net.Kniaz.Optimization.RealFunction)
GetPartialDerivativeVal() : Doublepublic(from Net.Kniaz.Optimization.RealFunction)
GetVal() : Doublepublic