public DotNetCostFunction(CostFunctionDelegate arg0) : this(NQuantLibcPINVOKE.new_DotNetCostFunction(CostFunctionDelegate.getCPtr(arg0)), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } }
public QlArray solve(CostFunctionDelegate function, Constraint c, OptimizationMethod m, EndCriteria e, QlArray iv) { QlArray ret = new QlArray(NQuantLibcPINVOKE.Optimizer_solve(swigCPtr, CostFunctionDelegate.getCPtr(function), Constraint.getCPtr(c), OptimizationMethod.getCPtr(m), EndCriteria.getCPtr(e), QlArray.getCPtr(iv)), true); if (NQuantLibcPINVOKE.SWIGPendingException.Pending) { throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CostFunctionDelegate obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }