亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? random.src

?? 沒有說明
?? SRC
字號:
/*
**  random.src - pseudo-random number generators
**
** (C) Copyright 1988-1998 by Aptech Systems, Inc.
** All Rights Reserved.
**
** This Software Product is PROPRIETARY SOURCE CODE OF APTECH
** SYSTEMS, INC.    This File Header must accompany all files using
** any portion, in whole or in part, of this Source Code.   In
** addition, the right to create such files is strictly limited by
** Section 2.A. of the GAUSS Applications License Agreement
** accompanying this Software Product.
**
** If you wish to distribute any portion of the proprietary Source
** Code, in whole or in part, you must first obtain written
** permission from Aptech Systems.
*/

#ifDLLCALL

/*
**  Format                   Purpose                                      Line
** ----------------------------------------------------------------------------
**    x = rndgam(r,c,alpha);     Gamma pseudo-random numbers                31
**    x = rndp(r,c,l);           Poisson pseudo-random numbers             104
**    x = rndnb(r,c,k,p);        Negative binomial pseudo-random numbers   165
**    x = rndbeta(r,c,a,b);      Beta pseudo-random numbers                260
**    x = rndvm(r,c,a,b);        von Mises pseudo-random numbers           355
**
**
**> rndgam
**
**  Purpose:  Computes Gamma pseudo-random numbers.
**
**  Format:  x = rndgam(r,c,alpha);
**
**  Input:  r      scalar, number of rows of resulting matrix.
**
**          c      scalar, number of columns of resulting matrix.
**
**          alpha  rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                 shape argument for gamma distribution.
**
**  Output:  x     rxc matrix, gamma distributed random numbers.
**
**
**  Remarks:  The properties of the pseudo-random numbers in x are -
**
**            E(x) = alpha, Var(x) = alpha
**            x > 0,  alpha > 0.
**
**  To generate gamma(alpha,theta) pseudo-random numbers where theta
**  is a scale parameter, multiply the result of rndgam by theta.
**  Thus
**           z = theta * rndgam(1,1,alpha);
**
**  has the properties
**
**            E(z) = alpha * theta, Var(z) = alpha * theta ^ 2
**            z > 0, alpha > 0, theta > 0.
*/


proc rndgam(rows_x,cols_x,a);

   local x,rows_a,cols_a,ret,seed;

   x = zeros(rows_x,cols_x);
   rows_a = rows(a);
   cols_a = cols(a);

   if rows_a /= 1 and rows_a /= rows_x;
       if not trapchk(1);
           errorlog "rndgam: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_a /= 1 and cols_a /= cols_x;
       if not trapchk(1);
           errorlog "rndgam: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (a > 0) and not trapchk(1);
       errorlog "rndgam:  parameter out of bounds";
       end;
   endif;

   seed = sysstate(28,0);
   dllcall rndgamdll(seed,x,rows_x,cols_x,a,rows_a,cols_a);
   call sysstate(28,seed);

   retp(x);
endp;


/*
**> rndp
**
**  Purpose:  Computes Poisson pseudo-random numbers
**
**  Format:  x = rndp(r,c,lambda);
**
**  Input:  r        scalar, number of rows of resulting matrix.
**
**          c        scalar, number of columns of resulting matrix.
**
**          lambda   rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                   shape argument for Poisson distribution.
**
**  Output:  x       rxc matrix, Poisson distributed random numbers.
**
**  Remarks:  The properties of the pseudo-random numbers in x are -
**
**            E(x) = lambda, Var(x) = lambda
**            x = 0, 1, ....,  lambda > 0.
*/


proc rndp(rows_x,cols_x,l);
   local x,rows_l,cols_l,seed;

   x = zeros(rows_x,cols_x);
   rows_l = rows(l);
   cols_l = cols(l);

   if rows_l /= 1 and rows_l /= rows_x;
       if not trapchk(1);
           errorlog "rndp: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_l /= 1 and cols_l /= cols_x;
       if not trapchk(1);
           errorlog "rndp: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (l > 0) and not trapchk(1);
       errorlog "rndgam:  parameter out of bounds";
       end;
   endif;

   seed = sysstate(28,0);
   dllcall rndpdll(seed,x,rows_x,cols_x,l,rows_l,cols_l);
   call sysstate(28,seed);

   retp(x);
endp;


/*
**> rndnb
**
**  Purpose:  Computes negative binomial pseudo-random numbers.
**
**  Format:  x = rndnb(r,c,k,p);
**
**  Input:   r    scalar, number of rows of resulting matrix.
**
**           c    scalar, number of columns of resulting matrix.
**
**           k    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                "event" argument for negative binomial distribution.
**
**           p    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                "probability" argument for negative binomial distribution.
**
**  Output:  x    rxc matrix, negative binomial distributed random numbers.
**
**
**  Remarks:  The properties of the pseudo-random numbers in x are -
**
**                      k * p                  k * p
**             E(x) = --------- , Var(x) = -----------
**                     (1 - p)              (1 - p)^2
**
**             x = 0, 1, ...,   k > 0,  0 < p < 1
*/



proc rndnb(rows_x,cols_x,k,p);
   local x,rows_k,cols_k,rows_p,cols_p,seed;

   x = zeros(rows_x,cols_x);
   rows_k = rows(k);
   cols_k = cols(k);
   rows_p = rows(p);
   cols_p = cols(p);

   if rows_k /= 1 and rows_k /= rows_x;
       if not trapchk(1);
           errorlog "rndnb: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_k /= 1 and cols_k /= cols_x;
       if not trapchk(1);
           errorlog "rndnb: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (k > 0) and not trapchk(1);
       errorlog "rndnb:  parameter out of bounds";
       end;
   endif;


   if rows_p /= 1 and rows_p /= rows_x;
       if not trapchk(1);
           errorlog "rndnb: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_p /= 1 and cols_p /= cols_x;
       if not trapchk(1);
           errorlog "rndnb: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (p > 0) and not (p < 1) and not trapchk(1);
       errorlog "rndnb:  parameter out of bounds";
       end;
   endif;

   seed = sysstate(28,0);
   dllcall rndnbdll(seed,x,rows_x,cols_x,k,rows_k,cols_k,p,rows_p,cols_p);
   call sysstate(28,seed);

   retp(x);
endp;


/*
**> rndbeta
**
**  Purpose:  Computes beta pseudo-random numbers.
**
**  Format:  x = rndbeta(r,c,a,b);
**
**  Input:   r    scalar, number of rows of resulting matrix.
**
**           c    scalar, number of columns of resulting matrix.
**
**           a    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                first shape argument for beta distribution.
**
**           b    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                second shape argument for beta distribution.
**
**  Output:  x    rxc matrix, beta distributed random numbers.
**
**
**  Remarks:  The properties of the pseudo-random numbers in x are -
**
**                       a                      (a * b)
**             E(x) = ------- ,   Var(x) = -------------------------
**                     a + b                (a + b + 1) * (a + b)^2
**
**             0 < x < 1,  a > 0,  b > 0
*/



proc rndbeta(rows_x,cols_x,a,b);
   local x,rows_a,cols_a,rows_b,cols_b,seed;

   x = zeros(rows_x,cols_x);
   rows_a = rows(a);
   cols_a = cols(a);
   rows_b = rows(b);
   cols_b = cols(b);

   if rows_a /= 1 and rows_a /= rows_x;
       if not trapchk(1);
           errorlog "rndbeta: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_a /= 1 and cols_a /= cols_x;
       if not trapchk(1);
           errorlog "rndbeta: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (a > 0) and not trapchk(1);
       errorlog "rndbeta:  parameter out of bounds";
       end;
   endif;


   if rows_b /= 1 and rows_b /= rows_x;
       if not trapchk(1);
           errorlog "rndbeta: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_b /= 1 and cols_b /= cols_x;
       if not trapchk(1);
           errorlog "rndbeta: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (b > 0) and not (b < 1) and not trapchk(1);
       errorlog "rndbeta:  parameter out of bounds";
       end;
   endif;

   seed = sysstate(28,0);
   dllcall rndbetadll(seed,x,rows_x,cols_x,a,rows_a,cols_a,b,rows_b,cols_b);
   call sysstate(28,seed);

   retp(x);
endp;


/*
**> rndvm
**
**  Purpose:  Computes von Mises pseudo-random numbers.
**
**  Format:  x = rndvm(r,c,m,k);
**
**  Input:   r    scalar, number of rows of resulting matrix.
**
**           c    scalar, number of columns of resulting matrix.
**
**           a    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                means for vm distribution.
**
**           b    rxc matrix, or rx1 vector, or 1Xc vector, or scalar,
**                shape argument for vm distribution.
**
**  Output:  x    rxc matrix, von Mises distributed random numbers.
**
*/



proc rndvm(rows_x,cols_x,a,b);
   local x,rows_a,cols_a,rows_b,cols_b,seed;

   x = zeros(rows_x,cols_x);
   rows_a = rows(a);
   cols_a = cols(a);
   rows_b = rows(b);
   cols_b = cols(b);

   if rows_a /= 1 and rows_a /= rows_x;
       if not trapchk(1);
           errorlog "rndvm: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_a /= 1 and cols_a /= cols_x;
       if not trapchk(1);
           errorlog "rndvm: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (a > 0) and not trapchk(1);
       errorlog "rndvm:  parameter out of bounds";
       end;
   endif;


   if rows_b /= 1 and rows_b /= rows_x;
       if not trapchk(1);
           errorlog "rndvm: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if cols_b /= 1 and cols_b /= cols_x;
       if not trapchk(1);
           errorlog "rndvm: parameter matrix not conformable";
           end;
       else;
           retp(error(0));
       endif;
   endif;

   if not (b > 0) and not (b < 1) and not trapchk(1);
       errorlog "rndvm:  parameter out of bounds";
       end;
   endif;

   seed = sysstate(28,0);
   dllcall rndvmdll(seed,x,rows_x,cols_x,a,rows_a,cols_a,b,rows_b,cols_b);
   call sysstate(28,seed);

   retp(x);
endp;

#else

/*
**  rndp
**
**  Format      y = rndp(r,c,l);
**
**  Input       r   scalar, number of rows.
**              c   scalar, number of columns.
**
**              l   expected value(s) of Poisson variates.
**                  if 1x1 scalar, used for all variates.
**                  if rx1 vector, row of l used for each row of result.
**                  if cx1 vector, col of l used for each col of result.
**                  if rxc matrix, element of l used for each element of result.
**
**   Output     y   RxC matrix of random poisson numbers with parameters l.
*/


proc rndp(r,c,l);
    local i,j,z,l0;
    z = zeros(r,c);
    i = 1;
    do until i > r;
        j = 1;
        do until j > c;
            if cols(l) == c and rows(l) == r;
                l0 = l[i,j];
            elseif rows(l) == r;
                l0 = l[i,.];
            elseif cols(l) == c;
                l0 = l[.,j];
            else;
                l0 = l[1,1];
            endif;
            z[i,j] = _rndp(l0);
            j = j + 1;
       endo;
       i = i + 1;
    endo;
    retp(z);
endp;

proc _rndp(l);
    local x,r,r0;
    x = 0;
    r0 = rndu(1,1);
    r = exp(-l);
    do while r < R0;
       r0 = r0 - r;
       x = x + 1;
       r = r*l/x;
    endo;
    retp(x);
endp;

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品亚洲国内自在自线福利| 久久精品视频免费观看| **欧美大码日韩| 国产98色在线|日韩| 亚洲精品在线免费播放| 美女一区二区三区| 欧美一区二区黄色| 日韩av中文字幕一区二区| 欧美午夜精品久久久久久孕妇 | 日韩福利视频网| 欧美日产在线观看| 视频在线观看一区二区三区| 欧美日韩精品一二三区| 亚洲成人综合在线| 精品视频在线免费看| 亚洲高清一区二区三区| 欧美三区在线观看| 日韩有码一区二区三区| 56国语精品自产拍在线观看| 日本一道高清亚洲日美韩| 国产精品精品国产色婷婷| 国产欧美日韩视频在线观看| 高清av一区二区| 国产精品亲子伦对白| 99精品热视频| 亚洲黄色免费网站| 精品视频免费在线| 免费黄网站欧美| 精品国产伦一区二区三区观看体验 | 日本电影欧美片| 亚洲国产cao| 日韩一区二区三区在线视频| 精品在线免费视频| 久久久亚洲综合| 99久久精品国产一区| 一区二区三区四区不卡在线 | 一本久久综合亚洲鲁鲁五月天| 亚洲免费视频中文字幕| 欧美日韩精品一区视频| 免费成人在线视频观看| xfplay精品久久| heyzo一本久久综合| 亚洲一二三四区| 日韩欧美一二三| 丁香六月综合激情| 亚洲一区二区免费视频| 日韩免费视频一区| 不卡的av网站| 亚欧色一区w666天堂| 欧美精品一区二区三区一线天视频 | 欧美三级电影在线看| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久婷婷国产综合精品青草| 99精品视频在线观看| 图片区小说区国产精品视频| 久久免费的精品国产v∧| 成人三级伦理片| 亚洲成在人线在线播放| 久久综合国产精品| 色婷婷综合久久久久中文| 奇米色777欧美一区二区| 国产亚洲污的网站| 色婷婷av一区二区三区之一色屋| 人人精品人人爱| 国产精品传媒入口麻豆| 欧美顶级少妇做爰| 国产精品夜夜爽| 亚洲一区二区三区美女| 久久久亚洲精品石原莉奈| 久久综合九色综合97婷婷| 亚洲超丰满肉感bbw| 国产午夜精品一区二区| 欧美综合久久久| 国产尤物一区二区在线| 一区二区三区不卡在线观看 | 国产高清不卡一区| 午夜久久久久久久久久一区二区| 国产清纯白嫩初高生在线观看91| 欧美午夜精品一区二区三区| 国产v日产∨综合v精品视频| 天涯成人国产亚洲精品一区av| 国产精品三级视频| 日韩欧美精品在线视频| 91久久精品国产91性色tv| 国产剧情一区在线| 亚洲成人1区2区| 国产精品乱码妇女bbbb| 欧美大白屁股肥臀xxxxxx| 91国产免费看| 岛国一区二区在线观看| 美女任你摸久久| 亚洲一级片在线观看| 国产精品美女久久久久久 | 欧美一级理论片| 色狠狠色噜噜噜综合网| 国产一区二区0| 午夜在线电影亚洲一区| 国产精品久久久久aaaa| 精品国产成人在线影院| 欧美群妇大交群中文字幕| 99久久精品免费看| 国产成人综合在线播放| 久久国产婷婷国产香蕉| 亚洲sss视频在线视频| 亚洲婷婷综合色高清在线| 国产亚洲短视频| 欧美r级电影在线观看| 欧美日韩1区2区| 欧美日韩在线观看一区二区 | 成人黄色小视频在线观看| 蜜臂av日日欢夜夜爽一区| 亚洲国产va精品久久久不卡综合| 亚洲精品一二三| 国产精品视频第一区| 国产日韩视频一区二区三区| 精品福利一二区| 精品欧美乱码久久久久久 | 国产精品久久看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 欧美一激情一区二区三区| 91视频www| 99精品久久99久久久久| 不卡影院免费观看| 成人av在线观| 成人黄动漫网站免费app| 国产成人久久精品77777最新版本| 激情伊人五月天久久综合| 美女性感视频久久| 精品中文字幕一区二区| 久久精品免费观看| 蜜臂av日日欢夜夜爽一区| 美女性感视频久久| 精品亚洲porn| 国产伦精品一区二区三区视频青涩| 蜜臀久久99精品久久久画质超高清| 亚洲bt欧美bt精品777| 亚洲国产毛片aaaaa无费看| 一区二区三区成人| 亚洲 欧美综合在线网络| 日本女优在线视频一区二区| 欧美aa在线视频| 精品中文av资源站在线观看| 国模套图日韩精品一区二区| 国产精品一区二区三区网站| 国产jizzjizz一区二区| 丁香一区二区三区| 99re视频精品| 一本久道久久综合中文字幕| 欧美自拍丝袜亚洲| 91精品国产欧美一区二区18 | 欧洲激情一区二区| 欧美日韩午夜精品| 欧美一区二区三区白人| 日韩精品一区二区三区在线观看 | 777午夜精品免费视频| 日韩一区二区在线看| 欧美本精品男人aⅴ天堂| 精品久久国产字幕高潮| 国产清纯在线一区二区www| 亚洲欧美日韩中文播放| 亚洲午夜成aⅴ人片| 美女一区二区视频| 大胆亚洲人体视频| 91福利在线观看| 欧美一级久久久| 国产人成亚洲第一网站在线播放| 亚洲视频香蕉人妖| 亚洲少妇最新在线视频| 午夜精品福利一区二区蜜股av| 日产欧产美韩系列久久99| 蜜桃久久精品一区二区| 国产99精品视频| 欧美色成人综合| 久久久精品日韩欧美| 中文字幕中文字幕一区二区| 亚洲一卡二卡三卡四卡| 国产在线播精品第三| 色综合久久久久综合| 欧美一级日韩不卡播放免费| 国产欧美日韩在线看| 伊人一区二区三区| 蜜桃视频在线观看一区| 成人av在线网| 欧美一二三区精品| 中文字幕一区二区三区在线不卡| 亚洲va韩国va欧美va精品| 国产在线视频一区二区| 色妞www精品视频| 欧美高清视频一二三区| 日韩欧美123| 中文字幕欧美日本乱码一线二线| 亚洲图片欧美色图| 国产乱子伦一区二区三区国色天香| 91无套直看片红桃| 日韩无一区二区| 亚洲精品成人少妇| 国产一区二区美女诱惑| 91国内精品野花午夜精品| 国产亚洲午夜高清国产拍精品| 亚洲午夜精品久久久久久久久|