/************************************************************************* MCPD results INPUT PARAMETERS: State - algorithm state OUTPUT PARAMETERS: P - array[N,N], transition matrix Rep - optimization report. You should check Rep.TerminationType in order to distinguish successful termination from unsuccessful one. Speaking short, positive values denote success, negative ones are failures. More information about fields of this structure can be found in the comments on MCPDReport datatype. -- ALGLIB -- Copyright 23.05.2010 by Bochkanov Sergey *************************************************************************/ public static void mcpdresults(mcpdstate s, ref double[,] p, mcpdreport rep) { int i = 0; int j = 0; p = new double[0,0]; p = new double[s.n, s.n]; for(i=0; i<=s.n-1; i++) { for(j=0; j<=s.n-1; j++) { p[i,j] = s.p[i,j]; } } rep.terminationtype = s.repterminationtype; rep.inneriterationscount = s.repinneriterationscount; rep.outeriterationscount = s.repouteriterationscount; rep.nfev = s.repnfev; }
public override alglib.apobject make_copy() { mcpdreport _result = new mcpdreport(); _result.inneriterationscount = inneriterationscount; _result.outeriterationscount = outeriterationscount; _result.nfev = nfev; _result.terminationtype = terminationtype; return _result; }