MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

Commit 5b58d304 authored by THEBAULT Antoine's avatar THEBAULT Antoine
Browse files

Revert "Merge branch 'Sampler' into 'master'"

This reverts merge request !29
parent f946086d
Pipeline #179623 passed with stages
in 1 minute and 24 seconds
package Sampler;
import java.util.Random;
public class Sampler {
// class with main sampling functions
// uniform sampling with discrete set of values
// uniform sampling of continuous function
// Inverse transform sampling
Random r; // random number generator
long timeNow = System.currentTimeMillis();
r=new Random(timeNow);
* Sample discrete values within a given interval
* @param deb beginning of interval
* @param end end of interval
* @return
int discreteUniform(int deb, int end) {
double d = r.nextDouble();
// sample a value between 0 and 1
double dv= deb + (end-deb)*d;
return (int)Math.round(dv);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment