You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Types > Dew.Math.TJacobianFunction Type
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Dew.Math.TJacobianFunction Type

Defines procedure for calculating the Jacobian matrix.

Syntax
C#
Visual Basic
public delegate void TJacobianFunction([In] TVec X, [In] TVec Y, [In] TMtx jac);

Optimization.cs

Jacobian matrix element (i,j) is defined as partial(Y(j))/partial(C(i)).

Define the Jacobian for the banana function.

// Split banana function in two parts private void BananaFun(TVec x, TVec f, double[] c, object[] o); { f[0] = 100*Math387.IntPower(x[1]-Math387.IntPower(x[0],2),2); f[1] = Math387.IntPower(1-x[0],2); } // Jacobian is 2x2 matrix private void BananaJac(TVec x, TVec f, TMtx Jac); { Jac[0,0] = -400*(x[1]-Math387.IntPower(x[0],2))*x[0]; // partial(f0)/ partial(x0) Jac[0,1] = -2*(1-x[0]); // partial(f1)/ partial(x0) Jac[1,0] = 200*(x[1]-Math387.IntPower(x[0],2)); // partial(f0)/ partial(x1) Jac[1,1] = 0.0; // partial(f1)/ partial(x1) }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!