Name

intprb_getproblems — Lists the problems.

Calling Sequence

   nprobmax = intprb_getproblems()
   str = intprb_getproblems(prbmat)
   str = intprb_getproblems(prbmat,verbose)
   
   

Parameters

nprobmax:

a floating point integer, the maximum problem number. Valid problem numbers are then produced by 1:nprobmax.

prbmat:

a matrix of floating point integers, the problem numbers

verbose:

a boolean, if true then prints the problem description (default = true).

str:

a string describing the problem

Description

This function lists the respective information associated with the test function number in prbmat. There is a direct map from the problem name to the function name. For example, the "SUM" problem corresponds to the "intprb_sum" function which is in the "intprb_sum.sci" file. The numbers in parenthesis (n) means that the files include parameters for varying the dimension of the problem.

Examples

// Display one problem at a time
intprb_getproblems(1);
intprb_getproblems(3);

// Display all problems
nprobmax = intprb_getproblems()
intprb_getproblems(1:nprobmax);

// Get all problems
nprobmax = intprb_getproblems()
str = intprb_getproblems(1:nprobmax,%f)

// Do a Monte-Carlo on all problems
stacksize("max");
nprobmax = intprb_getproblems();
for nprob = 1 : nprobmax
shortname = intprb_getname(nprob);
longname = intprb_getname(nprob,%t);
mprintf("=======================\n");
mprintf("Problem #%d : %s (%s)\n",nprob,longname,shortname);
[n,p]=intprb_getsetup(nprob);
e = intprb_getexpect(n,p,nprob);
v = intprb_getvariance(n,p,nprob);
for m = logspace(3,5,3)
x = grand(m,n,"def");
f = intprb_getfcn(m,n,x,p,nprob);
meanm = mean(f);
varm = variance(f);
mprintf("%10d %+7.5f %.7f %.7f\n",m,meanm,varm,varm/m);
clear("f");
clear("x");
end
end

   

Authors

Michael Baudin - 2010 - DIGITEO