23 #if (AE_COMPILER==AE_MSVC) 24 #pragma warning(disable:4100) 25 #pragma warning(disable:4127) 26 #pragma warning(disable:4702) 27 #pragma warning(disable:4996) 82 alglib_impl::gqgeneraterec(const_cast<alglib_impl::ae_vector*>(alpha.
c_ptr()), const_cast<alglib_impl::ae_vector*>(beta.
c_ptr()), mu0, n, &info, const_cast<alglib_impl::ae_vector*>(x.
c_ptr()), const_cast<alglib_impl::ae_vector*>(w.
c_ptr()), &_alglib_env_state);
418 alglib_impl::gkqgeneraterec(const_cast<alglib_impl::ae_vector*>(alpha.
c_ptr()), const_cast<alglib_impl::ae_vector*>(beta.
c_ptr()), mu0, n, &info, const_cast<alglib_impl::ae_vector*>(x.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wkronrod.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wgauss.
c_ptr()), &_alglib_env_state);
557 alglib_impl::gkqlegendrecalc(n, &info, const_cast<alglib_impl::ae_vector*>(x.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wkronrod.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wgauss.
c_ptr()), &_alglib_env_state);
595 alglib_impl::gkqlegendretbl(n, const_cast<alglib_impl::ae_vector*>(x.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wkronrod.
c_ptr()), const_cast<alglib_impl::ae_vector*>(wgauss.
c_ptr()), &eps, &_alglib_env_state);
616 _autogkreport_owner::_autogkreport_owner()
620 throw ap_error(
"ALGLIB: malloc error");
622 throw ap_error(
"ALGLIB: malloc error");
629 throw ap_error(
"ALGLIB: malloc error");
631 throw ap_error(
"ALGLIB: malloc error");
640 throw ap_error(
"ALGLIB: malloc error");
644 _autogkreport_owner::~_autogkreport_owner()
659 autogkreport::autogkreport() :
_autogkreport_owner() ,terminationtype(p_struct->terminationtype),nfev(p_struct->nfev),nintervals(p_struct->nintervals)
693 throw ap_error(
"ALGLIB: malloc error");
695 throw ap_error(
"ALGLIB: malloc error");
702 throw ap_error(
"ALGLIB: malloc error");
704 throw ap_error(
"ALGLIB: malloc error");
713 throw ap_error(
"ALGLIB: malloc error");
894 return *(
reinterpret_cast<bool*
>(&result));
904 void (*func)(
double x,
double xminusa,
double bminusx,
double &
y,
void *ptr),
908 throw ap_error(
"ALGLIB: error in 'autogkintegrate()' (func is NULL)");
919 throw ap_error(
"ALGLIB: unexpected error in 'autogkintegrate()'");
974 static ae_int_t autogk_maxsubintervals = 10000;
975 static void autogk_autogkinternalprepare(
double a,
979 autogkinternalstate* state,
981 static ae_bool autogk_autogkinternaliteration(autogkinternalstate* state,
983 static void autogk_mheappop(
ae_matrix* heap,
987 static void autogk_mheappush(
ae_matrix* heap,
991 static void autogk_mheapresize(
ae_matrix* heap,
1073 for(i=1; i<=n-1; i++)
1207 for(i=1; i<=n+1; i++)
1230 for(i=1; i<=n+1; i++)
1259 a22 = a22-a12*a21/a11;
1262 alph = (b1-bet*a12)/a11;
1266 a12 = a12-a22*a11/a21;
1269 alph = (b2-bet*a22)/a21;
1295 for(i=1; i<=n+2; i++)
1431 for(i=1; i<=n+1; i++)
1490 for(i=0; i<=n-1; i++)
1495 for(i=1; i<=n-1; i++)
1510 for(i=0; i<=n-2; i++)
1594 alpha2 =
ae_sqr(alpha, _state);
1595 beta2 =
ae_sqr(beta, _state);
1596 a.
ptr.
p_double[1] = (beta2-alpha2)/((apb+2)*(apb+4));
1598 for(i=2; i<=n-1; i++)
1600 a.
ptr.
p_double[
i] = 0.25*(beta2-alpha2)/(i*i*(1+0.5*apb/i)*(1+0.5*(apb+2)/i));
1601 b.
ptr.
p_double[
i] = 0.25*(1+alpha/
i)*(1+beta/i)*(1+apb/
i)/((1+0.5*(apb+1)/
i)*(1+0.5*(apb-1)/
i)*
ae_sqr(1+0.5*apb/i, _state));
1615 for(i=0; i<=n-2; i++)
1683 t =
lngamma(alpha+1, &s, _state);
1693 for(i=1; i<=n-1; i++)
1710 for(i=0; i<=n-2; i++)
1771 for(i=0; i<=n-1; i++)
1778 for(i=1; i<=n-1; i++)
1790 for(i=0; i<=n-2; i++)
1898 for(i=0; i<=
ae_iceil((
double)(3*(n/2))/(
double)2, _state); i++)
1918 gqgeneraterec(alpha, beta, mu0, n, info, &xgtmp, &wgtmp, _state);
1934 for(i=
ae_ifloor((
double)(3*n)/(
double)2, _state)+1; i<=2*
n; i++)
1942 for(i=
ae_iceil((
double)(3*n)/(
double)2, _state)+1; i<=2*
n; i++)
1955 for(i=0; i<=wlen-1; i++)
1965 for(m=0; m<=n-2; m++)
1968 for(k=(m+1)/2; k>=0; k--)
1978 for(j=n/2; j>=0; j--)
1982 for(m=n-1; m<=2*n-3; m++)
1985 for(k=m+1-n; k<=(m-1)/2; k++)
2011 gqgeneraterec(alpha, beta, mu0, 2*n+1, info, x, wkronrod, _state);
2021 for(i=0; i<=2*n-1; i++)
2034 for(i=0; i<=2*
n; i++)
2038 for(i=0; i<=n-1; i++)
2177 clen =
ae_iceil((
double)(3*(n/2))/(
double)2, _state)+1;
2180 for(i=0; i<=clen-1; i++)
2196 alpha2 =
ae_sqr(alpha, _state);
2197 beta2 =
ae_sqr(beta, _state);
2198 a.
ptr.
p_double[1] = (beta2-alpha2)/((apb+2)*(apb+4));
2200 for(i=2; i<=clen-1; i++)
2202 a.
ptr.
p_double[
i] = 0.25*(beta2-alpha2)/(i*i*(1+0.5*apb/i)*(1+0.5*(apb+2)/i));
2203 b.
ptr.
p_double[
i] = 0.25*(1+alpha/
i)*(1+beta/i)*(1+apb/
i)/((1+0.5*(apb+1)/
i)*(1+0.5*(apb-1)/
i)*
ae_sqr(1+0.5*apb/i, _state));
2217 for(i=0; i<=n-2; i++)
2286 alen =
ae_ifloor((
double)(3*(n/2))/(
double)2, _state)+1;
2287 blen =
ae_iceil((
double)(3*(n/2))/(
double)2, _state)+1;
2290 for(k=0; k<=alen-1; k++)
2295 for(k=1; k<=blen-1; k++)
2299 gkqgeneraterec(&alpha, &beta, mu0, n, info, x, wkronrod, wgauss, _state);
2310 for(i=0; i<=n-2; i++)
2376 ae_assert(((((n==15||n==21)||n==31)||n==41)||n==51)||n==61,
"GKQNodesTbl: incorrect N!", _state);
2380 for(i=0; i<=n-1; i++)
2390 wgauss->
ptr.
p_double[0] = 0.129484966168869693270611432679082;
2391 wgauss->
ptr.
p_double[1] = 0.279705391489276667901467771423780;
2392 wgauss->
ptr.
p_double[2] = 0.381830050505118944950369775488975;
2393 wgauss->
ptr.
p_double[3] = 0.417959183673469387755102040816327;
2394 x->
ptr.
p_double[0] = 0.991455371120812639206854697526329;
2395 x->
ptr.
p_double[1] = 0.949107912342758524526189684047851;
2396 x->
ptr.
p_double[2] = 0.864864423359769072789712788640926;
2397 x->
ptr.
p_double[3] = 0.741531185599394439863864773280788;
2398 x->
ptr.
p_double[4] = 0.586087235467691130294144838258730;
2399 x->
ptr.
p_double[5] = 0.405845151377397166906606412076961;
2400 x->
ptr.
p_double[6] = 0.207784955007898467600689403773245;
2401 x->
ptr.
p_double[7] = 0.000000000000000000000000000000000;
2402 wkronrod->
ptr.
p_double[0] = 0.022935322010529224963732008058970;
2403 wkronrod->
ptr.
p_double[1] = 0.063092092629978553290700663189204;
2404 wkronrod->
ptr.
p_double[2] = 0.104790010322250183839876322541518;
2405 wkronrod->
ptr.
p_double[3] = 0.140653259715525918745189590510238;
2406 wkronrod->
ptr.
p_double[4] = 0.169004726639267902826583426598550;
2407 wkronrod->
ptr.
p_double[5] = 0.190350578064785409913256402421014;
2408 wkronrod->
ptr.
p_double[6] = 0.204432940075298892414161999234649;
2409 wkronrod->
ptr.
p_double[7] = 0.209482141084727828012999174891714;
2414 wgauss->
ptr.
p_double[0] = 0.066671344308688137593568809893332;
2415 wgauss->
ptr.
p_double[1] = 0.149451349150580593145776339657697;
2416 wgauss->
ptr.
p_double[2] = 0.219086362515982043995534934228163;
2417 wgauss->
ptr.
p_double[3] = 0.269266719309996355091226921569469;
2418 wgauss->
ptr.
p_double[4] = 0.295524224714752870173892994651338;
2419 x->
ptr.
p_double[0] = 0.995657163025808080735527280689003;
2420 x->
ptr.
p_double[1] = 0.973906528517171720077964012084452;
2421 x->
ptr.
p_double[2] = 0.930157491355708226001207180059508;
2422 x->
ptr.
p_double[3] = 0.865063366688984510732096688423493;
2423 x->
ptr.
p_double[4] = 0.780817726586416897063717578345042;
2424 x->
ptr.
p_double[5] = 0.679409568299024406234327365114874;
2425 x->
ptr.
p_double[6] = 0.562757134668604683339000099272694;
2426 x->
ptr.
p_double[7] = 0.433395394129247190799265943165784;
2427 x->
ptr.
p_double[8] = 0.294392862701460198131126603103866;
2428 x->
ptr.
p_double[9] = 0.148874338981631210884826001129720;
2429 x->
ptr.
p_double[10] = 0.000000000000000000000000000000000;
2430 wkronrod->
ptr.
p_double[0] = 0.011694638867371874278064396062192;
2431 wkronrod->
ptr.
p_double[1] = 0.032558162307964727478818972459390;
2432 wkronrod->
ptr.
p_double[2] = 0.054755896574351996031381300244580;
2433 wkronrod->
ptr.
p_double[3] = 0.075039674810919952767043140916190;
2434 wkronrod->
ptr.
p_double[4] = 0.093125454583697605535065465083366;
2435 wkronrod->
ptr.
p_double[5] = 0.109387158802297641899210590325805;
2436 wkronrod->
ptr.
p_double[6] = 0.123491976262065851077958109831074;
2437 wkronrod->
ptr.
p_double[7] = 0.134709217311473325928054001771707;
2438 wkronrod->
ptr.
p_double[8] = 0.142775938577060080797094273138717;
2439 wkronrod->
ptr.
p_double[9] = 0.147739104901338491374841515972068;
2440 wkronrod->
ptr.
p_double[10] = 0.149445554002916905664936468389821;
2445 wgauss->
ptr.
p_double[0] = 0.030753241996117268354628393577204;
2446 wgauss->
ptr.
p_double[1] = 0.070366047488108124709267416450667;
2447 wgauss->
ptr.
p_double[2] = 0.107159220467171935011869546685869;
2448 wgauss->
ptr.
p_double[3] = 0.139570677926154314447804794511028;
2449 wgauss->
ptr.
p_double[4] = 0.166269205816993933553200860481209;
2450 wgauss->
ptr.
p_double[5] = 0.186161000015562211026800561866423;
2451 wgauss->
ptr.
p_double[6] = 0.198431485327111576456118326443839;
2452 wgauss->
ptr.
p_double[7] = 0.202578241925561272880620199967519;
2453 x->
ptr.
p_double[0] = 0.998002298693397060285172840152271;
2454 x->
ptr.
p_double[1] = 0.987992518020485428489565718586613;
2455 x->
ptr.
p_double[2] = 0.967739075679139134257347978784337;
2456 x->
ptr.
p_double[3] = 0.937273392400705904307758947710209;
2457 x->
ptr.
p_double[4] = 0.897264532344081900882509656454496;
2458 x->
ptr.
p_double[5] = 0.848206583410427216200648320774217;
2459 x->
ptr.
p_double[6] = 0.790418501442465932967649294817947;
2460 x->
ptr.
p_double[7] = 0.724417731360170047416186054613938;
2461 x->
ptr.
p_double[8] = 0.650996741297416970533735895313275;
2462 x->
ptr.
p_double[9] = 0.570972172608538847537226737253911;
2463 x->
ptr.
p_double[10] = 0.485081863640239680693655740232351;
2464 x->
ptr.
p_double[11] = 0.394151347077563369897207370981045;
2465 x->
ptr.
p_double[12] = 0.299180007153168812166780024266389;
2466 x->
ptr.
p_double[13] = 0.201194093997434522300628303394596;
2467 x->
ptr.
p_double[14] = 0.101142066918717499027074231447392;
2468 x->
ptr.
p_double[15] = 0.000000000000000000000000000000000;
2469 wkronrod->
ptr.
p_double[0] = 0.005377479872923348987792051430128;
2470 wkronrod->
ptr.
p_double[1] = 0.015007947329316122538374763075807;
2471 wkronrod->
ptr.
p_double[2] = 0.025460847326715320186874001019653;
2472 wkronrod->
ptr.
p_double[3] = 0.035346360791375846222037948478360;
2473 wkronrod->
ptr.
p_double[4] = 0.044589751324764876608227299373280;
2474 wkronrod->
ptr.
p_double[5] = 0.053481524690928087265343147239430;
2475 wkronrod->
ptr.
p_double[6] = 0.062009567800670640285139230960803;
2476 wkronrod->
ptr.
p_double[7] = 0.069854121318728258709520077099147;
2477 wkronrod->
ptr.
p_double[8] = 0.076849680757720378894432777482659;
2478 wkronrod->
ptr.
p_double[9] = 0.083080502823133021038289247286104;
2479 wkronrod->
ptr.
p_double[10] = 0.088564443056211770647275443693774;
2480 wkronrod->
ptr.
p_double[11] = 0.093126598170825321225486872747346;
2481 wkronrod->
ptr.
p_double[12] = 0.096642726983623678505179907627589;
2482 wkronrod->
ptr.
p_double[13] = 0.099173598721791959332393173484603;
2483 wkronrod->
ptr.
p_double[14] = 0.100769845523875595044946662617570;
2484 wkronrod->
ptr.
p_double[15] = 0.101330007014791549017374792767493;
2489 wgauss->
ptr.
p_double[0] = 0.017614007139152118311861962351853;
2490 wgauss->
ptr.
p_double[1] = 0.040601429800386941331039952274932;
2491 wgauss->
ptr.
p_double[2] = 0.062672048334109063569506535187042;
2492 wgauss->
ptr.
p_double[3] = 0.083276741576704748724758143222046;
2493 wgauss->
ptr.
p_double[4] = 0.101930119817240435036750135480350;
2494 wgauss->
ptr.
p_double[5] = 0.118194531961518417312377377711382;
2495 wgauss->
ptr.
p_double[6] = 0.131688638449176626898494499748163;
2496 wgauss->
ptr.
p_double[7] = 0.142096109318382051329298325067165;
2497 wgauss->
ptr.
p_double[8] = 0.149172986472603746787828737001969;
2498 wgauss->
ptr.
p_double[9] = 0.152753387130725850698084331955098;
2499 x->
ptr.
p_double[0] = 0.998859031588277663838315576545863;
2500 x->
ptr.
p_double[1] = 0.993128599185094924786122388471320;
2501 x->
ptr.
p_double[2] = 0.981507877450250259193342994720217;
2502 x->
ptr.
p_double[3] = 0.963971927277913791267666131197277;
2503 x->
ptr.
p_double[4] = 0.940822633831754753519982722212443;
2504 x->
ptr.
p_double[5] = 0.912234428251325905867752441203298;
2505 x->
ptr.
p_double[6] = 0.878276811252281976077442995113078;
2506 x->
ptr.
p_double[7] = 0.839116971822218823394529061701521;
2507 x->
ptr.
p_double[8] = 0.795041428837551198350638833272788;
2508 x->
ptr.
p_double[9] = 0.746331906460150792614305070355642;
2509 x->
ptr.
p_double[10] = 0.693237656334751384805490711845932;
2510 x->
ptr.
p_double[11] = 0.636053680726515025452836696226286;
2511 x->
ptr.
p_double[12] = 0.575140446819710315342946036586425;
2512 x->
ptr.
p_double[13] = 0.510867001950827098004364050955251;
2513 x->
ptr.
p_double[14] = 0.443593175238725103199992213492640;
2514 x->
ptr.
p_double[15] = 0.373706088715419560672548177024927;
2515 x->
ptr.
p_double[16] = 0.301627868114913004320555356858592;
2516 x->
ptr.
p_double[17] = 0.227785851141645078080496195368575;
2517 x->
ptr.
p_double[18] = 0.152605465240922675505220241022678;
2518 x->
ptr.
p_double[19] = 0.076526521133497333754640409398838;
2519 x->
ptr.
p_double[20] = 0.000000000000000000000000000000000;
2520 wkronrod->
ptr.
p_double[0] = 0.003073583718520531501218293246031;
2521 wkronrod->
ptr.
p_double[1] = 0.008600269855642942198661787950102;
2522 wkronrod->
ptr.
p_double[2] = 0.014626169256971252983787960308868;
2523 wkronrod->
ptr.
p_double[3] = 0.020388373461266523598010231432755;
2524 wkronrod->
ptr.
p_double[4] = 0.025882133604951158834505067096153;
2525 wkronrod->
ptr.
p_double[5] = 0.031287306777032798958543119323801;
2526 wkronrod->
ptr.
p_double[6] = 0.036600169758200798030557240707211;
2527 wkronrod->
ptr.
p_double[7] = 0.041668873327973686263788305936895;
2528 wkronrod->
ptr.
p_double[8] = 0.046434821867497674720231880926108;
2529 wkronrod->
ptr.
p_double[9] = 0.050944573923728691932707670050345;
2530 wkronrod->
ptr.
p_double[10] = 0.055195105348285994744832372419777;
2531 wkronrod->
ptr.
p_double[11] = 0.059111400880639572374967220648594;
2532 wkronrod->
ptr.
p_double[12] = 0.062653237554781168025870122174255;
2533 wkronrod->
ptr.
p_double[13] = 0.065834597133618422111563556969398;
2534 wkronrod->
ptr.
p_double[14] = 0.068648672928521619345623411885368;
2535 wkronrod->
ptr.
p_double[15] = 0.071054423553444068305790361723210;
2536 wkronrod->
ptr.
p_double[16] = 0.073030690332786667495189417658913;
2537 wkronrod->
ptr.
p_double[17] = 0.074582875400499188986581418362488;
2538 wkronrod->
ptr.
p_double[18] = 0.075704497684556674659542775376617;
2539 wkronrod->
ptr.
p_double[19] = 0.076377867672080736705502835038061;
2540 wkronrod->
ptr.
p_double[20] = 0.076600711917999656445049901530102;
2545 wgauss->
ptr.
p_double[0] = 0.011393798501026287947902964113235;
2546 wgauss->
ptr.
p_double[1] = 0.026354986615032137261901815295299;
2547 wgauss->
ptr.
p_double[2] = 0.040939156701306312655623487711646;
2548 wgauss->
ptr.
p_double[3] = 0.054904695975835191925936891540473;
2549 wgauss->
ptr.
p_double[4] = 0.068038333812356917207187185656708;
2550 wgauss->
ptr.
p_double[5] = 0.080140700335001018013234959669111;
2551 wgauss->
ptr.
p_double[6] = 0.091028261982963649811497220702892;
2552 wgauss->
ptr.
p_double[7] = 0.100535949067050644202206890392686;
2553 wgauss->
ptr.
p_double[8] = 0.108519624474263653116093957050117;
2554 wgauss->
ptr.
p_double[9] = 0.114858259145711648339325545869556;
2555 wgauss->
ptr.
p_double[10] = 0.119455763535784772228178126512901;
2556 wgauss->
ptr.
p_double[11] = 0.122242442990310041688959518945852;
2557 wgauss->
ptr.
p_double[12] = 0.123176053726715451203902873079050;
2558 x->
ptr.
p_double[0] = 0.999262104992609834193457486540341;
2559 x->
ptr.
p_double[1] = 0.995556969790498097908784946893902;
2560 x->
ptr.
p_double[2] = 0.988035794534077247637331014577406;
2561 x->
ptr.
p_double[3] = 0.976663921459517511498315386479594;
2562 x->
ptr.
p_double[4] = 0.961614986425842512418130033660167;
2563 x->
ptr.
p_double[5] = 0.942974571228974339414011169658471;
2564 x->
ptr.
p_double[6] = 0.920747115281701561746346084546331;
2565 x->
ptr.
p_double[7] = 0.894991997878275368851042006782805;
2566 x->
ptr.
p_double[8] = 0.865847065293275595448996969588340;
2567 x->
ptr.
p_double[9] = 0.833442628760834001421021108693570;
2568 x->
ptr.
p_double[10] = 0.797873797998500059410410904994307;
2569 x->
ptr.
p_double[11] = 0.759259263037357630577282865204361;
2570 x->
ptr.
p_double[12] = 0.717766406813084388186654079773298;
2571 x->
ptr.
p_double[13] = 0.673566368473468364485120633247622;
2572 x->
ptr.
p_double[14] = 0.626810099010317412788122681624518;
2573 x->
ptr.
p_double[15] = 0.577662930241222967723689841612654;
2574 x->
ptr.
p_double[16] = 0.526325284334719182599623778158010;
2575 x->
ptr.
p_double[17] = 0.473002731445714960522182115009192;
2576 x->
ptr.
p_double[18] = 0.417885382193037748851814394594572;
2577 x->
ptr.
p_double[19] = 0.361172305809387837735821730127641;
2578 x->
ptr.
p_double[20] = 0.303089538931107830167478909980339;
2579 x->
ptr.
p_double[21] = 0.243866883720988432045190362797452;
2580 x->
ptr.
p_double[22] = 0.183718939421048892015969888759528;
2581 x->
ptr.
p_double[23] = 0.122864692610710396387359818808037;
2582 x->
ptr.
p_double[24] = 0.061544483005685078886546392366797;
2583 x->
ptr.
p_double[25] = 0.000000000000000000000000000000000;
2584 wkronrod->
ptr.
p_double[0] = 0.001987383892330315926507851882843;
2585 wkronrod->
ptr.
p_double[1] = 0.005561932135356713758040236901066;
2586 wkronrod->
ptr.
p_double[2] = 0.009473973386174151607207710523655;
2587 wkronrod->
ptr.
p_double[3] = 0.013236229195571674813656405846976;
2588 wkronrod->
ptr.
p_double[4] = 0.016847817709128298231516667536336;
2589 wkronrod->
ptr.
p_double[5] = 0.020435371145882835456568292235939;
2590 wkronrod->
ptr.
p_double[6] = 0.024009945606953216220092489164881;
2591 wkronrod->
ptr.
p_double[7] = 0.027475317587851737802948455517811;
2592 wkronrod->
ptr.
p_double[8] = 0.030792300167387488891109020215229;
2593 wkronrod->
ptr.
p_double[9] = 0.034002130274329337836748795229551;
2594 wkronrod->
ptr.
p_double[10] = 0.037116271483415543560330625367620;
2595 wkronrod->
ptr.
p_double[11] = 0.040083825504032382074839284467076;
2596 wkronrod->
ptr.
p_double[12] = 0.042872845020170049476895792439495;
2597 wkronrod->
ptr.
p_double[13] = 0.045502913049921788909870584752660;
2598 wkronrod->
ptr.
p_double[14] = 0.047982537138836713906392255756915;
2599 wkronrod->
ptr.
p_double[15] = 0.050277679080715671963325259433440;
2600 wkronrod->
ptr.
p_double[16] = 0.052362885806407475864366712137873;
2601 wkronrod->
ptr.
p_double[17] = 0.054251129888545490144543370459876;
2602 wkronrod->
ptr.
p_double[18] = 0.055950811220412317308240686382747;
2603 wkronrod->
ptr.
p_double[19] = 0.057437116361567832853582693939506;
2604 wkronrod->
ptr.
p_double[20] = 0.058689680022394207961974175856788;
2605 wkronrod->
ptr.
p_double[21] = 0.059720340324174059979099291932562;
2606 wkronrod->
ptr.
p_double[22] = 0.060539455376045862945360267517565;
2607 wkronrod->
ptr.
p_double[23] = 0.061128509717053048305859030416293;
2608 wkronrod->
ptr.
p_double[24] = 0.061471189871425316661544131965264;
2609 wkronrod->
ptr.
p_double[25] = 0.061580818067832935078759824240055;
2614 wgauss->
ptr.
p_double[0] = 0.007968192496166605615465883474674;
2615 wgauss->
ptr.
p_double[1] = 0.018466468311090959142302131912047;
2616 wgauss->
ptr.
p_double[2] = 0.028784707883323369349719179611292;
2617 wgauss->
ptr.
p_double[3] = 0.038799192569627049596801936446348;
2618 wgauss->
ptr.
p_double[4] = 0.048402672830594052902938140422808;
2619 wgauss->
ptr.
p_double[5] = 0.057493156217619066481721689402056;
2620 wgauss->
ptr.
p_double[6] = 0.065974229882180495128128515115962;
2621 wgauss->
ptr.
p_double[7] = 0.073755974737705206268243850022191;
2622 wgauss->
ptr.
p_double[8] = 0.080755895229420215354694938460530;
2623 wgauss->
ptr.
p_double[9] = 0.086899787201082979802387530715126;
2624 wgauss->
ptr.
p_double[10] = 0.092122522237786128717632707087619;
2625 wgauss->
ptr.
p_double[11] = 0.096368737174644259639468626351810;
2626 wgauss->
ptr.
p_double[12] = 0.099593420586795267062780282103569;
2627 wgauss->
ptr.
p_double[13] = 0.101762389748405504596428952168554;
2628 wgauss->
ptr.
p_double[14] = 0.102852652893558840341285636705415;
2629 x->
ptr.
p_double[0] = 0.999484410050490637571325895705811;
2630 x->
ptr.
p_double[1] = 0.996893484074649540271630050918695;
2631 x->
ptr.
p_double[2] = 0.991630996870404594858628366109486;
2632 x->
ptr.
p_double[3] = 0.983668123279747209970032581605663;
2633 x->
ptr.
p_double[4] = 0.973116322501126268374693868423707;
2634 x->
ptr.
p_double[5] = 0.960021864968307512216871025581798;
2635 x->
ptr.
p_double[6] = 0.944374444748559979415831324037439;
2636 x->
ptr.
p_double[7] = 0.926200047429274325879324277080474;
2637 x->
ptr.
p_double[8] = 0.905573307699907798546522558925958;
2638 x->
ptr.
p_double[9] = 0.882560535792052681543116462530226;
2639 x->
ptr.
p_double[10] = 0.857205233546061098958658510658944;
2640 x->
ptr.
p_double[11] = 0.829565762382768397442898119732502;
2641 x->
ptr.
p_double[12] = 0.799727835821839083013668942322683;
2642 x->
ptr.
p_double[13] = 0.767777432104826194917977340974503;
2643 x->
ptr.
p_double[14] = 0.733790062453226804726171131369528;
2644 x->
ptr.
p_double[15] = 0.697850494793315796932292388026640;
2645 x->
ptr.
p_double[16] = 0.660061064126626961370053668149271;
2646 x->
ptr.
p_double[17] = 0.620526182989242861140477556431189;
2647 x->
ptr.
p_double[18] = 0.579345235826361691756024932172540;
2648 x->
ptr.
p_double[19] = 0.536624148142019899264169793311073;
2649 x->
ptr.
p_double[20] = 0.492480467861778574993693061207709;
2650 x->
ptr.
p_double[21] = 0.447033769538089176780609900322854;
2651 x->
ptr.
p_double[22] = 0.400401254830394392535476211542661;
2652 x->
ptr.
p_double[23] = 0.352704725530878113471037207089374;
2653 x->
ptr.
p_double[24] = 0.304073202273625077372677107199257;
2654 x->
ptr.
p_double[25] = 0.254636926167889846439805129817805;
2655 x->
ptr.
p_double[26] = 0.204525116682309891438957671002025;
2656 x->
ptr.
p_double[27] = 0.153869913608583546963794672743256;
2657 x->
ptr.
p_double[28] = 0.102806937966737030147096751318001;
2658 x->
ptr.
p_double[29] = 0.051471842555317695833025213166723;
2659 x->
ptr.
p_double[30] = 0.000000000000000000000000000000000;
2660 wkronrod->
ptr.
p_double[0] = 0.001389013698677007624551591226760;
2661 wkronrod->
ptr.
p_double[1] = 0.003890461127099884051267201844516;
2662 wkronrod->
ptr.
p_double[2] = 0.006630703915931292173319826369750;
2663 wkronrod->
ptr.
p_double[3] = 0.009273279659517763428441146892024;
2664 wkronrod->
ptr.
p_double[4] = 0.011823015253496341742232898853251;
2665 wkronrod->
ptr.
p_double[5] = 0.014369729507045804812451432443580;
2666 wkronrod->
ptr.
p_double[6] = 0.016920889189053272627572289420322;
2667 wkronrod->
ptr.
p_double[7] = 0.019414141193942381173408951050128;
2668 wkronrod->
ptr.
p_double[8] = 0.021828035821609192297167485738339;
2669 wkronrod->
ptr.
p_double[9] = 0.024191162078080601365686370725232;
2670 wkronrod->
ptr.
p_double[10] = 0.026509954882333101610601709335075;
2671 wkronrod->
ptr.
p_double[11] = 0.028754048765041292843978785354334;
2672 wkronrod->
ptr.
p_double[12] = 0.030907257562387762472884252943092;
2673 wkronrod->
ptr.
p_double[13] = 0.032981447057483726031814191016854;
2674 wkronrod->
ptr.
p_double[14] = 0.034979338028060024137499670731468;
2675 wkronrod->
ptr.
p_double[15] = 0.036882364651821229223911065617136;
2676 wkronrod->
ptr.
p_double[16] = 0.038678945624727592950348651532281;
2677 wkronrod->
ptr.
p_double[17] = 0.040374538951535959111995279752468;
2678 wkronrod->
ptr.
p_double[18] = 0.041969810215164246147147541285970;
2679 wkronrod->
ptr.
p_double[19] = 0.043452539701356069316831728117073;
2680 wkronrod->
ptr.
p_double[20] = 0.044814800133162663192355551616723;
2681 wkronrod->
ptr.
p_double[21] = 0.046059238271006988116271735559374;
2682 wkronrod->
ptr.
p_double[22] = 0.047185546569299153945261478181099;
2683 wkronrod->
ptr.
p_double[23] = 0.048185861757087129140779492298305;
2684 wkronrod->
ptr.
p_double[24] = 0.049055434555029778887528165367238;
2685 wkronrod->
ptr.
p_double[25] = 0.049795683427074206357811569379942;
2686 wkronrod->
ptr.
p_double[26] = 0.050405921402782346840893085653585;
2687 wkronrod->
ptr.
p_double[27] = 0.050881795898749606492297473049805;
2688 wkronrod->
ptr.
p_double[28] = 0.051221547849258772170656282604944;
2689 wkronrod->
ptr.
p_double[29] = 0.051426128537459025933862879215781;
2690 wkronrod->
ptr.
p_double[30] = 0.051494729429451567558340433647099;
2696 for(i=n-1; i>=n/2; i--)
2704 for(i=n-1; i>=n/2; i--)
2712 for(i=ng-1; i>=0; i--)
2717 for(i=0; i<=n/2; i++)
2725 tagsort(x, n, &p1, &p2, _state);
2726 for(i=0; i<=n-1; i++)
2875 state->
alpha = alpha;
2963 alpha = state->
alpha;
2993 if( !autogk_autogkinternaliteration(&state->
internalstate, _state) )
3074 if( !autogk_autogkinternaliteration(&state->
internalstate, _state) )
3084 t =
ae_pow(x, 1/(1+alpha), _state);
3122 if( !autogk_autogkinternaliteration(&state->
internalstate, _state) )
3132 t =
ae_pow(x, 1/(1+beta), _state);
3166 state->
v = s*(v1+v2);
3233 static void autogk_autogkinternalprepare(
double a,
3356 for(i=0; i<=state->
n-1; i++)
3419 c1 = 0.5*(state->
b-state->
a);
3420 c2 = 0.5*(state->
b+state->
a);
3457 intk = intk*(state->
b-state->
a)*0.5;
3458 intg = intg*(state->
b-state->
a)*0.5;
3459 inta = inta*(state->
b-state->
a)*0.5;
3487 ta = state->
a+j*(state->
b-state->
a)/ns;
3488 tb = state->
a+(j+1)*(state->
b-state->
a)/ns;
3527 intk = intk*(tb-ta)*0.5;
3528 intg = intg*(tb-ta)*0.5;
3529 inta = inta*(tb-ta)*0.5;
3565 for(j=0; j<=state->
heapused-1; j++)
3674 static void autogk_mheappop(
ae_matrix* heap,
3689 for(i=0; i<=heapwidth-1; i++)
3696 while(2*p+1<heapsize-1)
3699 if( 2*p+2<heapsize-1 )
3708 for(i=0; i<=heapwidth-1; i++)
3724 static void autogk_mheappush(
ae_matrix* heap,
3745 for(i=0; i<=heapwidth-1; i++)
3761 static void autogk_mheapresize(
ae_matrix* heap,
3775 for(i=0; i<=*heapsize-1; i++)
3780 for(i=0; i<=*heapsize-1; i++)
3784 *heapsize = newheapsize;
void autogksmooth(double a, double b, autogkstate *state, ae_state *_state)
ae_bool _autogkinternalstate_init_copy(void *_dst, void *_src, ae_state *_state, ae_bool make_automatic)
struct alglib_impl::ae_state ae_state
ae_bool ae_fp_greater_eq(double v1, double v2)
void gqgenerategausshermite(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void gkqgeneraterec(ae_vector *alpha, ae_vector *beta, double mu0, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
ae_bool _autogkreport_init_copy(void *_dst, void *_src, ae_state *_state, ae_bool make_automatic)
alglib_impl::autogkreport * c_ptr()
void autogkintegrate(autogkstate &state, void(*func)(double x, double xminusa, double bminusx, double &y, void *ptr), void *ptr)
void gkqlegendrecalc(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
void gqgenerategausshermite(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void gqgeneraterec(ae_vector *alpha, ae_vector *beta, double mu0, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
double ae_fabs(double x, ae_state *state)
double ae_pow(double x, double y, ae_state *state)
void * ae_malloc(size_t size, ae_state *state)
ae_bool autogkiteration(autogkstate *state, ae_state *_state)
double beta(const double a, const double b)
void _autogkinternalstate_destroy(void *_p)
union alglib_impl::ae_matrix::@12 ptr
void ae_frame_make(ae_state *state, ae_frame *tmp)
_autogkreport_owner & operator=(const _autogkreport_owner &rhs)
ae_int_t & terminationtype
void gqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
double lngamma(const double x, double &sgngam)
_autogkstate_owner & operator=(const _autogkstate_owner &rhs)
void gkqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void autogksmoothw(double a, double b, double xwidth, autogkstate *state, ae_state *_state)
alglib_impl::autogkstate * p_struct
void gkqgenerategausslegendre(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
autogkinternalstate internalstate
void autogkresults(const autogkstate &state, double &v, autogkreport &rep)
void gkqgenerategaussjacobi(ae_int_t n, double alpha, double beta, ae_int_t *info, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, ae_state *_state)
void ae_state_clear(ae_state *state)
void autogksingular(const double a, const double b, const double alpha, const double beta, autogkstate &state)
ae_bool ae_fp_eq(double v1, double v2)
virtual ~_autogkstate_owner()
autogkreport & operator=(const autogkreport &rhs)
ae_bool ae_matrix_init_copy(ae_matrix *dst, ae_matrix *src, ae_state *state, ae_bool make_automatic)
void gqgenerategaussradaurec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
ae_bool ae_matrix_init(ae_matrix *dst, ae_int_t rows, ae_int_t cols, ae_datatype datatype, ae_state *state, ae_bool make_automatic)
void ae_matrix_destroy(ae_matrix *dst)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
autogkstate & operator=(const autogkstate &rhs)
void gqgenerategausslaguerre(const ae_int_t n, const double alpha, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void _rcommstate_destroy(rcommstate *p)
ae_int_t ae_v_len(ae_int_t a, ae_int_t b)
void ae_vector_destroy(ae_vector *dst)
ae_bool _rcommstate_init(rcommstate *p, ae_state *_state, ae_bool make_automatic)
bool autogkiteration(const autogkstate &state)
void tagsort(ae_vector *a, ae_int_t n, ae_vector *p1, ae_vector *p2, ae_state *_state)
ae_bool _rcommstate_init_copy(rcommstate *dst, rcommstate *src, ae_state *_state, ae_bool make_automatic)
void ae_v_move(double *vdst, ae_int_t stride_dst, const double *vsrc, ae_int_t stride_src, ae_int_t n)
void ae_vector_clear(ae_vector *dst)
ae_bool ae_fp_less(double v1, double v2)
void gqgenerategausslegendre(ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
ae_int_t ae_iceil(double x, ae_state *state)
ae_bool ae_fp_neq(double v1, double v2)
void _autogkinternalstate_clear(void *_p)
void _autogkstate_clear(void *_p)
void gqgenerategausslobattorec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const double b, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
void ae_touch_ptr(void *p)
void _autogkreport_clear(void *_p)
alglib_impl::autogkstate * c_ptr()
double ae_maxreal(double m1, double m2, ae_state *state)
void gkqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
ae_bool ae_vector_set_length(ae_vector *dst, ae_int_t newsize, ae_state *state)
void gqgenerategausslaguerre(ae_int_t n, double alpha, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void _autogkstate_destroy(void *_p)
double ae_log(double x, ae_state *state)
const alglib_impl::ae_vector * c_ptr() const
void autogksmoothw(const double a, const double b, const double xwidth, autogkstate &state)
double ae_minreal(double m1, double m2, ae_state *state)
void gkqlegendrecalc(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
void gqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &w)
struct alglib_impl::ae_matrix ae_matrix
ae_int_t ae_ifloor(double x, ae_state *state)
void gqgenerategaussjacobi(ae_int_t n, double alpha, double beta, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void ae_state_init(ae_state *state)
bool smatrixtdevd(real_1d_array &d, const real_1d_array &e, const ae_int_t n, const ae_int_t zneeded, real_2d_array &z)
void gkqlegendretbl(const ae_int_t n, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss, double &eps)
double ae_sqrt(double x, ae_state *state)
void ae_assert(ae_bool cond, const char *msg, ae_state *state)
union alglib_impl::ae_vector::@11 ptr
const char *volatile error_msg
double ae_atan(double x, ae_state *state)
#define ae_machineepsilon
double ae_exp(double x, ae_state *state)
void autogksmooth(const double a, const double b, autogkstate &state)
void gkqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss)
ae_bool _autogkstate_init(void *_p, ae_state *_state, ae_bool make_automatic)
alglib_impl::autogkreport * p_struct
void _rcommstate_clear(rcommstate *p)
ae_bool ae_vector_init(ae_vector *dst, ae_int_t size, ae_datatype datatype, ae_state *state, ae_bool make_automatic)
void autogksingular(double a, double b, double alpha, double beta, autogkstate *state, ae_state *_state)
ae_bool ae_isfinite(double x, ae_state *state)
double ae_sqr(double x, ae_state *state)
ae_bool _autogkreport_init(void *_p, ae_state *_state, ae_bool make_automatic)
void _autogkreport_destroy(void *_p)
void gqgenerategausslobattorec(ae_vector *alpha, ae_vector *beta, double mu0, double a, double b, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
void gqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w)
ae_bool ae_vector_init_copy(ae_vector *dst, ae_vector *src, ae_state *state, ae_bool make_automatic)
void gqgenerategaussradaurec(ae_vector *alpha, ae_vector *beta, double mu0, double a, ae_int_t n, ae_int_t *info, ae_vector *x, ae_vector *w, ae_state *_state)
ae_bool ae_fp_less_eq(double v1, double v2)
ae_bool _autogkstate_init_copy(void *_dst, void *_src, ae_state *_state, ae_bool make_automatic)
alglib_impl::ae_int_t ae_int_t
void ae_frame_leave(ae_state *state)
void ae_matrix_clear(ae_matrix *dst)
ae_bool ae_fp_greater(double v1, double v2)
ae_bool ae_matrix_set_length(ae_matrix *dst, ae_int_t rows, ae_int_t cols, ae_state *state)
void autogkresults(autogkstate *state, double *v, autogkreport *rep, ae_state *_state)
ae_bool _autogkinternalstate_init(void *_p, ae_state *_state, ae_bool make_automatic)
void gkqlegendretbl(ae_int_t n, ae_vector *x, ae_vector *wkronrod, ae_vector *wgauss, double *eps, ae_state *_state)