Exemplo n.º 1
0
double
rng_gaussian( const double sigma ) { 
  return gsl_ran_gaussian( r , sigma ) ; 
}
Exemplo n.º 2
0
/* Initialize particle positions by assigning them
   on a cubic grid, then scaling positions 
   to achieve a given box size and thereby, volume,
   and density */
void init ( double * rx, double * ry, double * rz,
	    double * vx, double * vy, double * vz,
	    int * ix, int * iy, int * iz,
	    int n, double L, gsl_rng * r, double T0,
	    double * KE, char * icf) {
  int i,iix,iiy,iiz;
  double cmvx=0.0,cmvy=0.0,cmvz=0.0;
  double T, fac;
  int n3=2;
  int vel_ok=0;
  
  /* If icf has a value, assume it is the name of a file containing
     the input configuration in XYZ format */
  if (icf) {
    FILE * fp = fopen(icf,"r");
    if (fp) vel_ok = xyz_in(fp,rx,ry,rz,vx,vy,vz,&n);
    else {
      fprintf(stderr,"# error: could not read %s\n",icf);
      exit(-1);
    }
  }
  /* Assign particles on a cubic lattice */
  else {

    /* Find the lowest perfect cube, n3, greater than or equal to the
       number of particles */
    while ((n3*n3*n3)<n) n3++;
  
    iix=iiy=iiz=0;
    /* Assign particle positions */
    for (i=0;i<n;i++) {
      rx[i] = ((double)iix+0.5)*L/n3;
      ry[i] = ((double)iiy+0.5)*L/n3;
      rz[i] = ((double)iiz+0.5)*L/n3;
      iix++;
      if (iix==n3) {
	iix=0;
	iiy++;
	if (iiy==n3) {
	  iiy=0;
	  iiz++;
	}
      }
    }
  }
  /* If no velocities yet assigned, randomly pick some */
  if (!vel_ok) {
    for (i=0;i<n;i++) {
      vx[i]=gsl_ran_gaussian(r,1.0);
      vy[i]=gsl_ran_gaussian(r,1.0);
      vz[i]=gsl_ran_gaussian(r,1.0);
    }
  }
  /* Take away any center-of-mass drift; compute initial KE */
  for (i=0;i<n;i++) {
    cmvx+=vx[i];
    cmvy+=vy[i];
    cmvz+=vz[i];
  }
  (*KE)=0;
  for (i=0;i<n;i++) {
    vx[i]-=cmvx/n;
    vy[i]-=cmvy/n;
    vz[i]-=cmvz/n;
    (*KE)+=vx[i]*vx[i]+vy[i]*vy[i]+vz[i]*vz[i];
  }
  (*KE)*=0.5;
  /* if T0 is specified, scale velocities */
  if (T0>0.0) {
    T=(*KE)/n*2./3.;
    fac=sqrt(T0/T);
    (*KE)=0;
    for (i=0;i<n;i++) {
      vx[i]*=fac;
      vy[i]*=fac;
      vz[i]*=fac;
      (*KE)+=vx[i]*vx[i]+vy[i]*vy[i]+vz[i]*vz[i];
    }
    (*KE)*=0.5;
  }
  /* Initialize periodic boundary crossing counter arrays */
  memset(ix,0,n*sizeof(int));
  memset(iy,0,n*sizeof(int));
  memset(iz,0,n*sizeof(int));
}
Exemplo n.º 3
0
int main ( int argc, char * argv[] ) {

  double * rx, * ry, * rz;
  double * vx, * vy, * vz;
  double * fx, * fy, * fz;
  int * ix, * iy, * iz;
  int N=216,c,a;
  double L=0.0;
  double rho=0.5, Tb = 1.0, nu=1.0, rc2 = 1.e20;
  double vir, vir_sum, pcor, V;
  double PE, KE, TE, ecor, ecut, T0=0.0, TE0;
  double rr3,dt=0.001, dt2, sigma;
  int i,j,s;
  int nSteps = 10, fSamp=100;
  int short_out=0;
  int use_e_corr=0;
  int unfold = 0;

  char fn[20];
  FILE * out;
  char * wrt_code_str = "w";
  char * init_cfg_file = NULL;

  gsl_rng * r = gsl_rng_alloc(gsl_rng_mt19937);
  unsigned long int Seed = 23410981;

  /* Here we parse the command line arguments;  If
   you add an option, document it in the usage() function! */
  for (i=1;i<argc;i++) {
    if (!strcmp(argv[i],"-N")) N=atoi(argv[++i]);
    else if (!strcmp(argv[i],"-rho")) rho=atof(argv[++i]);
    else if (!strcmp(argv[i],"-nu")) nu=atof(argv[++i]);
    else if (!strcmp(argv[i],"-dt")) dt=atof(argv[++i]);
    else if (!strcmp(argv[i],"-rc")) rc2=atof(argv[++i]);
    else if (!strcmp(argv[i],"-ns")) nSteps = atoi(argv[++i]);
    else if (!strcmp(argv[i],"-so")) short_out=1;
    else if (!strcmp(argv[i],"-T0")) T0=atof(argv[++i]);
    else if (!strcmp(argv[i],"-Tb")) Tb=atof(argv[++i]);
    else if (!strcmp(argv[i],"-fs")) fSamp=atoi(argv[++i]);
    else if (!strcmp(argv[i],"-sf")) wrt_code_str = argv[++i];
    else if (!strcmp(argv[i],"-icf")) init_cfg_file = argv[++i];
    else if (!strcmp(argv[i],"-ecorr")) use_e_corr = 1;
    else if (!strcmp(argv[i],"-seed")) Seed = (unsigned long)atoi(argv[++i]);
    else if (!strcmp(argv[i],"-uf")) unfold = 1;
    else if (!strcmp(argv[i],"-h")) {
      usage(); exit(0);
    }
    else {
      fprintf(stderr,"Error: Command-line argument '%s' not recognized.\n",
	      argv[i]);
      exit(-1);
    }
  }

  /* Compute the side-length */
  L = pow((V=N/rho),0.3333333);

  /* Compute the tail-corrections; assumes sigma and epsilon are both 1 */
  rr3 = 1.0/(rc2*rc2*rc2);
  ecor = use_e_corr?8*M_PI*rho*(rr3*rr3*rr3/9.0-rr3/3.0):0.0;
  pcor = use_e_corr?16.0/3.0*M_PI*rho*rho*(2./3.*rr3*rr3*rr3-rr3):0.0;
  ecut = 4*(rr3*rr3*rr3*rr3-rr3*rr3);

  /* Compute the *squared* cutoff, reusing the variable rc2 */
  rc2*=rc2;

  /* compute the squared time step */
  dt2=dt*dt;

  /* Compute sigma */
  sigma = sqrt(Tb);

  /* Output some initial information */
  fprintf(stdout,"# Andersen-Thermostat MD Simulation"
	  " of a Lennard-Jones fluid\n");
  fprintf(stdout,"# L = %.5lf; rho = %.5lf; N = %i; rc = %.5lf\n",
	  L,rho,N,sqrt(rc2));
  fprintf(stdout,"# nSteps %i, seed %d, dt %.5lf, T0 %.5lf, nu %.5lf\n",
	  nSteps,Seed,dt,T0,nu);
  
  /* Seed the random number generator */
  gsl_rng_set(r,Seed);
  
  /* Allocate the position arrays */
  rx = (double*)malloc(N*sizeof(double));
  ry = (double*)malloc(N*sizeof(double));
  rz = (double*)malloc(N*sizeof(double));

  /* Allocate the boundary crossing counter arrays */
  ix = (int*)malloc(N*sizeof(int));
  iy = (int*)malloc(N*sizeof(int));
  iz = (int*)malloc(N*sizeof(int));

  /* Allocate the velocity arrays */
  vx = (double*)malloc(N*sizeof(double));
  vy = (double*)malloc(N*sizeof(double));
  vz = (double*)malloc(N*sizeof(double));

  /* Allocate the force arrays */
  fx = (double*)malloc(N*sizeof(double));
  fy = (double*)malloc(N*sizeof(double));
  fz = (double*)malloc(N*sizeof(double));

  /* Generate initial positions on a cubic grid, 
     and measure initial energy */
  init(rx,ry,rz,vx,vy,vz,ix,iy,iz,N,L,r,T0,&KE,init_cfg_file);
  sprintf(fn,"%i.xyz",0);
  out=fopen(fn,"w");
  xyz_out(out,rx,ry,rz,vx,vy,vz,ix,iy,iz,L,N,16,1,unfold);
  fclose(out);

  PE = total_e(rx,ry,rz,fx,fy,fz,N,L,rc2,ecor,ecut,&vir);
  TE0=PE+KE;
  
  fprintf(stdout,"# step PE KE TE drift T P\n");

  for (s=0;s<nSteps;s++) {

    /* First integration half-step */
    for (i=0;i<N;i++) {
      rx[i]+=vx[i]*dt+0.5*dt2*fx[i];
      ry[i]+=vy[i]*dt+0.5*dt2*fy[i];
      rz[i]+=vz[i]*dt+0.5*dt2*fz[i];
      vx[i]+=0.5*dt*fx[i];
      vy[i]+=0.5*dt*fy[i];
      vz[i]+=0.5*dt*fz[i];
      /* Apply periodic boundary conditions */
      if (rx[i]<0.0) { rx[i]+=L; ix[i]--; }
      if (rx[i]>L)   { rx[i]-=L; ix[i]++; }
      if (ry[i]<0.0) { ry[i]+=L; iy[i]--; }
      if (ry[i]>L)   { ry[i]-=L; iy[i]++; }
      if (rz[i]<0.0) { rz[i]+=L; iz[i]--; }
      if (rz[i]>L)   { rz[i]-=L; iz[i]++; }
    }
    /* Calculate forces */
    PE = total_e(rx,ry,rz,fx,fy,fz,N,L,rc2,ecor,ecut,&vir);
      
    /* Second integration half-step */
    KE = 0.0;
    for (i=0;i<N;i++) {
      vx[i]+=0.5*dt*fx[i];
      vy[i]+=0.5*dt*fy[i];
      vz[i]+=0.5*dt*fz[i];
      KE+=vx[i]*vx[i]+vy[i]*vy[i]+vz[i]*vz[i];
    }
    KE*=0.5;
    /* Andersen thermostat */
    KE = 0.0;
    for (i=0;i<N;i++) {
      if (gsl_rng_uniform(r) < nu*dt) {
	vx[i]=gsl_ran_gaussian(r,sigma);
	vy[i]=gsl_ran_gaussian(r,sigma);
	vz[i]=gsl_ran_gaussian(r,sigma);
      }
      KE+=vx[i]*vx[i]+vy[i]*vy[i]+vz[i]*vz[i];
    }
    KE*=0.5;
    TE=PE+KE;
    fprintf(stdout,"%i %.5lf %.5lf %.5lf %.5lf %.5le %.5lf %.5lf\n",
	    s,s*dt,PE,KE,TE,(TE-TE0)/TE0,KE*2/3./N,rho*KE*2./3./N+vir/3.0/V);
    if (!(s%fSamp)) {
      sprintf(fn,"%i.xyz",!strcmp(wrt_code_str,"a")?0:s);
      out=fopen(fn,wrt_code_str);
      xyz_out(out,rx,ry,rz,vx,vy,vz,ix,iy,iz,L,N,16,1,unfold);
      fclose(out);
    }
  }
}
Exemplo n.º 4
0
 void Individual1::calcAdGenVal(Parameters& p,Individual1& s,Individual1& d){
   for(unsigned short i=0;i<p.getNumTraits();++i){
     mSampling[i]=gsl_ran_gaussian(prand,sqrt((0.5-0.25*(s.getInbreedingCoef()+d.getInbreedingCoef()))*p.getGenAdCov(i,i)));
     adGenVal[i]=0.5*(s.getAdGenVal(i)+d.getAdGenVal(i))+mSampling[i];
   }
 }
Exemplo n.º 5
0
 void Individual::calcPhenVal(Parameters& p){    
   for(unsigned short i=0;i<p.getNumTraits();++i){
     envDevVal[i] = gsl_ran_gaussian(prand, sqrt(p.getGenAdCov(i,i)*(1/p.getHeritability(i)-1)));    //generating environment deviates;
     phenVal[i]=p.getTraitMeans(i)+adGenVal[i]+envDevVal[i];
   }   
 }
Exemplo n.º 6
0
 void Individual1::calcAdGenVal(Parameters& p){
   for(unsigned short i=0;i<p.getNumTraits();++i){
     adGenVal[i]=gsl_ran_gaussian(prand,sqrt(p.getGenAdCov(i,i)));
   }
 }
Exemplo n.º 7
0
Arquivo: ridge.c Projeto: alisw/gsl
int
main()
{
  const size_t n = N;
  const size_t p = 2;
  size_t i;
  gsl_rng *r = gsl_rng_alloc(gsl_rng_default);
  gsl_matrix *X = gsl_matrix_alloc(n, p);
  gsl_vector *y = gsl_vector_alloc(n);

  for (i = 0; i < n; ++i)
    {
      /* generate first random variable u */
      double ui = gsl_ran_gaussian(r, 1.0);

      /* set v = u + noise */
      double vi = ui + gsl_ran_gaussian(r, 0.001);

      /* set y = u + v + noise */
      double yi = ui + vi + gsl_ran_gaussian(r, 1.0);

      /* since u =~ v, the matrix X is ill-conditioned */
      gsl_matrix_set(X, i, 0, ui);
      gsl_matrix_set(X, i, 1, vi);

      /* rhs vector */
      gsl_vector_set(y, i, yi);
    }

  {
    gsl_multifit_linear_workspace *w =
      gsl_multifit_linear_alloc(n, p);
    gsl_vector *c = gsl_vector_alloc(p);
    gsl_vector *c_ridge = gsl_vector_alloc(p);
    gsl_matrix *cov = gsl_matrix_alloc(p, p);
    double chisq;

    /* unregularized (standard) least squares fit, lambda = 0 */
    gsl_multifit_linear_ridge(0.0, X, y, c, cov, &chisq, w);

    fprintf(stderr, "=== Unregularized fit ===\n");
    fprintf(stderr, "best fit: y = %g u + %g v\n",
      gsl_vector_get(c, 0), gsl_vector_get(c, 1));
    fprintf(stderr, "chisq/dof = %g\n", chisq / (n - p));

    /* regularize with lambda = 1 */
    gsl_multifit_linear_ridge(1.0, X, y, c_ridge, cov, &chisq, w);

    fprintf(stderr, "=== Regularized fit ===\n");
    fprintf(stderr, "best fit: y = %g u + %g v\n",
      gsl_vector_get(c_ridge, 0), gsl_vector_get(c_ridge, 1));
    fprintf(stderr, "chisq/dof = %g\n", chisq / (n - p));

    gsl_multifit_linear_free(w);
    gsl_matrix_free(cov);
    gsl_vector_free(c);
    gsl_vector_free(c_ridge);
  }

  gsl_rng_free(r);
  gsl_matrix_free(X);
  gsl_vector_free(y);

  return 0;
}
Exemplo n.º 8
0
void ParticleFilter::predict_with_simple_model()
{
    float x, y, s;
    float TRANS_X_STD = mParams.TRANS_X_STD;
    float TRANS_Y_STD = mParams.TRANS_Y_STD;
    float TRANS_SCALE_STD = mParams.TRANS_SCALE_STD;
    float A1 = mParams.DYNAMICS_A1;
    float A2 = mParams.DYNAMICS_A2;
    float B0 = mParams.DYNAMICS_B0;

    if(mReinit)
    {
        TRANS_X_STD=200.0;
        TRANS_Y_STD=200.0;
        TRANS_SCALE_STD=1.0;
        mReinit=false;
    }

    static Particle p;
    for(int i=0; i<mParams.NUMBER_OF_PARTICLES; ++i)
    {
//        x = A1 * ( mParticles[i].x -  mParticles[i].x0 ) + A2 * ( mParticles[i].xp - mParticles[i].x0 ) +
//                B0 * gsl_ran_gaussian( rng, TRANS_X_STD ) + mParticles[i].x0;
//        p.x = MAX( 0.0, MIN( (float) 640 , x ) );
//        y = A1 * ( mParticles[i].y - mParticles[i].y0 ) + A2 * ( mParticles[i].yp - mParticles[i].y0 ) +
//                B0 * gsl_ran_gaussian( rng, TRANS_Y_STD ) + mParticles[i].y0;
//        p.y = MAX( 0.0, MIN( (float) 480 , y ) );
//        s = A1 * ( mParticles[i].s - mParticles[i].s0 ) + A2 * ( mParticles[i].sp - mParticles[i].s0  ) +
//                B0 * gsl_ran_gaussian( rng, TRANS_SCALE_STD ) + mParticles[i].s0;
//        p.s = 1.0;//MAX( 0.0, MIN( (float)1.0 - 1.0, s ) );

        //std::cout << "Rand TRANS_X_STD " << TRANS_X_STD << " " << gsl_ran_gaussian( rng, TRANS_X_STD ) << std::endl;
        x= mParticles[i].x + gsl_ran_gaussian( rng, TRANS_X_STD );
        p.x = MAX( 0.0, MIN( (float) 640 , x ) );
        y = mParticles[i].y + gsl_ran_gaussian( rng, TRANS_Y_STD );
        p.y = MAX( 0.0, MIN( (float) 480 , y ) );
        s = A1 * ( mParticles[i].s - mParticles[i].s0 ) + A2 * ( mParticles[i].sp - mParticles[i].s0  ) +
                B0 * gsl_ran_gaussian( rng, TRANS_SCALE_STD ) + mParticles[i].s0;
        p.s = 1.0;//MAX( 0.0, MIN( (float)1.0 - 1.0, s ) );

        p.xp = mParticles[i].x;
        p.yp = mParticles[i].y;
        p.sp = mParticles[i].s;

        p.x0 = mParticles[i].x0;
        p.y0 = mParticles[i].y0;
        p.s0 = mParticles[i].s0;
        p.w = 0;

        mParticles[i].x = p.x;
        mParticles[i].y = p.y;
        mParticles[i].s = p.s;

        mParticles[i].xp = p.xp;
        mParticles[i].yp = p.yp;
        mParticles[i].sp = p.sp;

        mParticles[i].x0 = p.x0;
        mParticles[i].y0 = p.y0;
        mParticles[i].s0 = p.s0;

        mParticles[i].x_velocity = mParticles[i].x - mParticles[i].xp;
        mParticles[i].y_velocity = mParticles[i].y - mParticles[i].yp;
        mParticles[i].s_velocity = mParticles[i].s - mParticles[i].sp;
        mParticles[i].w = p.w;

        //std::cout << "particle " << i << " " << mParticles[i].x << " " << mParticles[i].y << " " << mParticles[i].s << std::endl;

    }
}
scalar sasfit_ff_RNDMultiLamellarVesicle2(scalar q, sasfit_param * param)
{
	scalar sum, sumt;
	scalar Delta_s, DRi, Fi, Fj, rij;
	scalar xc, yc, zc;
	scalar t_sh, s_tsh, R_c, s_Rc, n, s_n, t_sol, s_tsol, Dt_sol, Delta_eta;
	int i, j, N, p, Nav = 200;
	static int idum = -1;
	static gsl_rng * r; 
	static const gsl_rng_type * T;
//	static float o_R_c=-1., o_t_sh=-1., o_t_sol=-1., o_Dt_sol=-1.,o_n=-1.;
	static scalar r_i[100][3], R_i[100], tsh_i[100];
	sasfit_param subParam;

	SASFIT_ASSERT_PTR(param);

	sasfit_get_param(param, 10, &t_sh, &s_tsh, &R_c, &s_Rc, &n, &s_n, &t_sol, &s_tsol, &Dt_sol, &Delta_eta);

	SASFIT_CHECK_COND1((q < 0.0), param, "q(%lg) < 0",q);
	SASFIT_CHECK_COND1((R_c <= 0.0), param, "R_c(%lg) <= 0",R_c);
	SASFIT_CHECK_COND1((s_Rc < 0.0), param, "s_Rc(%lg) < 0",s_Rc);
	SASFIT_CHECK_COND1((t_sol < 0.0), param, "t_sol(%lg) < 0",t_sol);
	SASFIT_CHECK_COND1((s_tsol < 0.0), param, "s_tsol(%lg) < 0",s_tsol);
	SASFIT_CHECK_COND1((t_sh < 0.0), param, "t_sh(%lg) < 0",t_sh);
	SASFIT_CHECK_COND1((s_tsh < 0.0), param, "s_tsh(%lg) < 0",s_tsh);
	SASFIT_CHECK_COND1((n < 1.0), param, "n(%lg) < 1",n);
	SASFIT_CHECK_COND1((n > 100), param, "n(%lg) > 100",n);
	SASFIT_CHECK_COND1((s_n < 0.0), param, "s_n(%lg) < 0",s_n);

	if (idum < 0) 
	{
		idum = 1;
		gsl_rng_env_setup();
		T = gsl_rng_default;
		r = gsl_rng_alloc(T);
	}
	if (20 < sasfit_eps_get_iter_4_mc()) 
	{
		Nav = sasfit_eps_get_iter_4_mc();
	} else {
		Nav =20;
	}

	sasfit_init_param( &subParam );
	sumt = 0.0;

	for (p=0; p < Nav ;p++) 
	{
		//  do {
		//	  N = (int) (gsl_ran_gaussian (r,s_n)+n);
		//  } while ((N>n+3*s_n) || (N<1));
		if (s_n== 0.0) {
			N = (int) n;
		} else {
			do {
				N = (int) gsl_ran_lognormal(r,log(n),s_n);
			} 
			while ((N>200) || (N<1));
		}
		r_i[0][0] = 0.0;
		r_i[0][1] = 0.0;
		r_i[0][2] = 0.0;

		for (i=0; i < N ;i++) 
		{
			if (s_tsh == 0.0) {
				tsh_i[i] = t_sh;
			} else {
				do {
					tsh_i[i] = gsl_ran_gaussian(r,s_tsh)+t_sh;
				} 
				while (tsh_i[i] <= 0);
			}
		}

		//	  do {
		//		  R_i[0] = gsl_ran_gaussian(r,s_Rc)+R_c;
		//	  } while (R_i[0] <= 0);
		if (s_Rc == 0.0) {
			R_i[0] = R_c;
		} else {
			do {
				R_i[0] = gsl_ran_lognormal(r,log(R_c),s_Rc);
			} 
			while (R_i[0] <= 0);
		}
		for (i=1; i < N ;i++) 
		{
			gsl_ran_dir_3d(r,&xc,&yc,&zc);
			if (s_tsol == 0.0) {
				DRi = t_sol;
			} else {
				do {
					DRi = gsl_ran_gaussian(r,s_tsol)+t_sol;
				} 
				while (DRi < 0);
			}
			R_i[i] = R_i[i-1]+tsh_i[i-1]+DRi;
			if (Dt_sol <= 0) {
				Delta_s = Dt_sol*DRi;
			} else {
				do {
					Delta_s = Dt_sol*DRi*gsl_rng_uniform(r);
				} 
				while (Delta_s < 0);
			}
			r_i[i][0] = r_i[i-1][0] + Delta_s*xc;
			r_i[i][1] = r_i[i-1][1] + Delta_s*yc;
			r_i[i][2] = r_i[i-1][2] + Delta_s*zc; 
		}
		sum=0.0;
		for (i=0; i < N ;i++) 
		{
			/*
			Fi =  K(interp,q,R_i[i]			,-Delta_eta,error)
				+ K(interp,q,R_i[i]+tsh_i[i], Delta_eta,error);
				*/
			subParam.p[0] = R_i[i];
			subParam.p[3] = -Delta_eta;
			Fi = sasfit_ff_sphere_f(q, &subParam);

			subParam.p[0] = R_i[i] + tsh_i[i];
			subParam.p[3] = Delta_eta;
			Fi += sasfit_ff_sphere_f(q, &subParam);

			sum = sum + Fi*Fi;
			for (j=i+1; j < N ;j++) 
			{
				/*
				Fj =  K(interp,q,R_i[j]			,-Delta_eta,error)
					+ K(interp,q,R_i[j]+tsh_i[j], Delta_eta,error);
				*/
				subParam.p[0] = R_i[j];
				subParam.p[3] = -Delta_eta;
				Fj = sasfit_ff_sphere_f(q, &subParam);
				
				subParam.p[0] = R_i[j] + tsh_i[j];
				subParam.p[3] = Delta_eta;
				Fj += sasfit_ff_sphere_f(q, &subParam);

				rij = sqrt( pow(r_i[i][0]-r_i[j][0],2)
					       +pow(r_i[i][1]-r_i[j][1],2)
					       +pow(r_i[i][2]-r_i[j][2],2)
						  );
				if (rij == 0) 
				{
					sum = sum + 2.0*Fi*Fj;
				} else 
				{
					sum = sum + 2.0*Fi*Fj*sin(q*rij)/(q*rij);
				}
			}
		}
		sumt = sumt+sum;
	}
	SASFIT_CHECK_SUB_ERR(param, subParam);

	return sumt/Nav;
}
Exemplo n.º 10
0
Arquivo: test.c Projeto: CNMAT/gsl
double
test_gaussian (void)
{
  return gsl_ran_gaussian (r_global, 3.0);
}