[Yuima-commits] r549 - pkg/yuima/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 16 04:54:55 CET 2016


Author: yumauehara
Date: 2016-12-16 04:54:55 +0100 (Fri, 16 Dec 2016)
New Revision: 549

Removed:
   pkg/yuima/src/rpts.c
Log:
deleted

Deleted: pkg/yuima/src/rpts.c
===================================================================
--- pkg/yuima/src/rpts.c	2016-12-16 03:52:52 UTC (rev 548)
+++ pkg/yuima/src/rpts.c	2016-12-16 03:54:55 UTC (rev 549)
@@ -1,47 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <math.h>
-#include "R.h"
-#include "Mt.h"
-
-
-void rpts(int *x, double *alpha, double *a, double *b, double *rn);
-double rps(double *alpha, double *a, double *b);
-double rexp();
-
-void rpts(int *x, double *alpha, double *a, double *b, double *rn)
-{
-    int i=0;
-    double y;
-    init_genrand((unsigned)time(NULL));
-    while(i<*x){
-        y=rps(alpha,a,b); /* here input variables are pointa type*/
-        if(genrand_real3()<=exp(-(*b)*y))
-        {
-            rn[i]=y;
-            i++;
-        }
-        
-            }
-}
-
-
-
-double rps(double *alpha, double *a, double *b)
-{
-    double x1,y1,z1,uni;
-    uni=-M_PI/2.0+M_PI*genrand_real3();
-    x1=pow((*a)*tgamma(1.0-*alpha)*cos(M_PI*(*alpha)/(2.0))/(*alpha),1.0/(*alpha));
-    y1=sin((*alpha)*uni+M_PI*(*alpha)/2.0)/pow(cos(uni)*cos(M_PI*(*alpha)/2.0),1.0/(*alpha));
-    z1=pow(cos((1.0-*alpha)*uni-M_PI*(*alpha)/2.0)/rexp(),(1.0-*alpha)/(*alpha));
-    
-    return x1*y1*z1;
-}
-
-double rexp()
-{
-    return -log(genrand_real3());
-}
-
-



More information about the Yuima-commits mailing list