Package org.apache.commons.math.random

Examples of org.apache.commons.math.random.RandomGenerator


//    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(0.5,3);//seems good
    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(power,powerCoefficient);
    //define partition prior
    FragmentPartitionPrior fragPrior = new FragmentPartitionPrior(fragmentPenalty);
    //define tuning distribution
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    common.TuningDistribution tuningDistribution = new PoissonTuningDistribution(rng,poisson);
    //initial jumping weights
    double[] initJumpWeight = new double[n];
    java.util.Arrays.fill(initJumpWeight, 10);
View Full Code Here


public class Test {
  public static void main(String[] args) throws MathException {
    int[][] grid = new int[5][5];
    double[][] data = new double[5][5];
    RandomGenerator rg = new Well44497b(20111013);
    RandomDataImpl rng = new RandomDataImpl(rg);
    initializeGrid2(grid);
    initializeData(data, rng);
    printGrid(grid);
//    System.out.println(rng.nextInt(0, 4));
View Full Code Here

import org.apache.commons.math.random.Well44497b;

public class RunMCMC {
  public static void main(String[] args){
    //-------------- random number generator -----------------
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    //--------------- initial data points ----------------
   
    //-----initial currentPartition and proposedPartition---------
   
View Full Code Here

    SizePenalty sizePenalty = new LinearSizePenalty(0);
    //define partition prior
//    PartitionPrior partitionPrior = new DistPartitionPrior(locs,3,fragmentPenalty,sizePenalty);
    PartitionPrior fragPrior = new FragmentPartitionPrior(fragmentPenalty);
    //define tuning distribution
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    TuningDistribution tuningDistribution = new PoissonTuningDistribution(rng,1);
    //initial jumping weights
    double[] initJumpWeight = new double[n];
    java.util.Arrays.fill(initJumpWeight, 10);
View Full Code Here

//    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(0.5,3);//seems good
    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(power,powerCoefficient);
    //define partition prior
    FragmentPartitionPrior fragPrior = new FragmentPartitionPrior(fragmentPenalty);
    //define tuning distribution
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    common.TuningDistribution tuningDistribution = new PoissonTuningDistribution(rng,poisson);
    //initial jumping weights
    double[] initJumpWeight = new double[n];
    java.util.Arrays.fill(initJumpWeight, 10);
View Full Code Here

//    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(0.5,3);//seems good
    FragmentPenalty fragmentPenalty = new PowerFragmentPenalty(power,powerCoefficient);
    //define partition prior
    FragmentPartitionPrior fragPrior = new FragmentPartitionPrior(fragmentPenalty);
    //define tuning distribution
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    common.TuningDistribution tuningDistribution = new PoissonTuningDistribution(rng,poisson);
    //initial jumping weights
    double[] initJumpWeight = new double[n];
    java.util.Arrays.fill(initJumpWeight, 10);
View Full Code Here

import dclong.stat.Combination;
import dclong.util.Timer;

public class TestSPTsRep {
  public static void main(String[] args) throws IOException{
    RandomGenerator rg = new Well44497b(31);
    RandomDataImpl rng = new RandomDataImpl(rg);
    int sizeOfEachDataSet = 26;
    int sizeOfFirstGroup = 5;
    int numberOfTests = 12625;
    Combination comb = new Combination(sizeOfEachDataSet,sizeOfFirstGroup);
View Full Code Here

import dclong.stat.Combination;
import dclong.util.Timer;

public class TestSPTsImpl {
  public static void main(String[] args) throws IOException{
    RandomGenerator rg = new Well44497b(31);
    RandomDataImpl rng = new RandomDataImpl(rg);
//    int sizeOfEachDataSet = 16;
    int sizeOfEachDataSet = 26;
//    int sizeOfFirstGroup = 8;
    int sizeOfFirstGroup = 5;
View Full Code Here

import dclong.stat.Combination;
import dclong.util.Timer;

public class TestSPTsRunnable {
  public static void main(String[] args) throws IOException{
    RandomGenerator rg = new Well44497b(31);
    RandomDataImpl rng = new RandomDataImpl(rg);
//    int numberOfTests = 12625;
    int numberOfTests = 10000;
//    int sizeOfEachDataSet = 26;
    int sizeOfEachDataSet = 16;
View Full Code Here

import dclong.stat.Combination;
import dclong.util.Timer;

public class TestSPTsSimulation {
  public static void main(String[] args) throws IOException {
    RandomGenerator rg = new Well44497b(31);
    RandomDataImpl rng = new RandomDataImpl(rg);
    // warm up RNG to avoid overlap of the Table-2 job
    Timer timer = new Timer();
    int upperBound = Combination.choose(26, 5).intValue() - 1;
    for (int i = 0; i < 130000000; ++i) {
View Full Code Here

TOP

Related Classes of org.apache.commons.math.random.RandomGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.