procedure SetObjects(const ObjConst: TObjectArray);
Define any additional Object constant parameters in the RealFunction.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ObjConst | TObjectArray |
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
Uses Math387, MtxVecTools;
function MyFunction(const Pars: TVec; const consts: TVec; const OConsts: Array of TObject): double;
var tmpVec: TVec;
begin
tmpVec: = OConsts[0] as TVec;
MyFunction := Pars[0]*tmpVec.Sum -tmpVec.SumOfSquares*Pars[1];
end;
begin
// ...
MtxOptimization.VariableParameters.SetIt(false,[-1,0]);
MtxOptimization1.SetObjects([XVec]);
// ...
end;