TMtxOptimization.SetObjects Method

void SetObjects(Object[] ObjConst)

Define any additional Object constant parameters in the RealFunction.

#NameTypeDescription
1ObjConstObject[]

Result: stored in self (calling object)

Remarks:

Use SetObjects method to define any additional Object constant parameters in the RealFunction. By default, the PConsts has 0 elements.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    // define the real function to be minimized
    private double vecfun(TVec pars, TVec consts, params object[] objConsts)
    {
        TVec tmpVec = object0] as TVec;
        return pars[0]*tmpVec.Sum() -tmpVec.SumOfSquares()*pars[1];
    }

private void Example(TMtxOptimization opt1)
{
    // ...
    opt1.RealFunction = VecFun;
        opt1.VariableParameters.SetIt(false,new double[] {-1,0})});
    Vector xVec = new Vector(0);
    opt1.SetObjects(new object[] {xVec});
}
}
See Also: TMtxOptimization.RealFunction, TMtxOptimization.VariableParameters, TMtxOptimization.ConstantParameters