Examples of nextUniform()


Examples of cc.mallet.util.Randoms.nextUniform()

    List<Factor> factors = new ArrayList<Factor> (vars.size ());

    // node factors
    for (int i = 0; i < len; i++) {
      double u = r.nextUniform (-4.0, 4.0);
      factors.add (new BoltzmannUnaryFactor (vars.get (i), u));
    }

    // edge factors
    for (int i = 0; i < len-1; i++) {
View Full Code Here

Examples of org.apache.commons.math.random.RandomData.nextUniform()

    if (range.getMinimumNumber() instanceof Long && range.getMaximumNumber() instanceof Long) {
      result = randomData.nextLong(range.getMinimumLong(), range.getMaximumLong());
    }

    if (range.getMinimumNumber() instanceof Float && range.getMaximumNumber() instanceof Float) {
      result = randomData.nextUniform(range.getMinimumFloat(), range.getMaximumFloat());
    }

    if (range.getMinimumNumber() instanceof Double && range.getMaximumNumber() instanceof Double) {
      result = randomData.nextUniform(range.getMinimumDouble(), range.getMaximumDouble());
    }
View Full Code Here

Examples of org.apache.commons.math.random.RandomData.nextUniform()

    if (range.getMinimumNumber() instanceof Float && range.getMaximumNumber() instanceof Float) {
      result = randomData.nextUniform(range.getMinimumFloat(), range.getMaximumFloat());
    }

    if (range.getMinimumNumber() instanceof Double && range.getMaximumNumber() instanceof Double) {
      result = randomData.nextUniform(range.getMinimumDouble(), range.getMaximumDouble());
    }

    return result;
  }
View Full Code Here

Examples of org.apache.commons.math.random.RandomData.nextUniform()

    private double[] generateSample() {
        final RandomData randomData = new RandomDataImpl();
        final int sampleSize = randomData.nextInt(10,100);
        double[] out = new double[sampleSize];
        for (int i = 0; i < out.length; i++) {
            out[i] = randomData.nextUniform(-100, 100);
        }
        return out;
    }

    /**
 
View Full Code Here

Examples of org.apache.commons.math.random.RandomData.nextUniform()

    private double[] generateSample() {
        final RandomData randomData = new RandomDataImpl();
        final int sampleSize = randomData.nextInt(10,100);
        double[] out = new double[sampleSize];
        for (int i = 0; i < out.length; i++) {
            out[i] = randomData.nextUniform(-100, 100);
        }
        return out;    
    }
   
    /**
 
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextUniform()

        double[] permuted = new double[10];
        RandomDataImpl random = new RandomDataImpl();

        // Generate 10 distinct random values
        for (int i = 0; i < 10; i++) {
            original[i] = random.nextUniform(i + 0.5, i + 0.75);
        }

        // Generate a random permutation, making sure it is not the identity
        boolean isIdentity = true;
        do {
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextUniform()

    if (range.getMinimumNumber() instanceof Long && range.getMaximumNumber() instanceof Long) {
      result = randomData.nextLong(range.getMinimumLong(), range.getMaximumLong());
    }

    if (range.getMinimumNumber() instanceof Float && range.getMaximumNumber() instanceof Float) {
      result = randomData.nextUniform(range.getMinimumFloat(), range.getMaximumFloat());
    }

    if (range.getMinimumNumber() instanceof Double && range.getMaximumNumber() instanceof Double) {
      result = randomData.nextUniform(range.getMinimumDouble(), range.getMaximumDouble());
    }
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextUniform()

    if (range.getMinimumNumber() instanceof Float && range.getMaximumNumber() instanceof Float) {
      result = randomData.nextUniform(range.getMinimumFloat(), range.getMaximumFloat());
    }

    if (range.getMinimumNumber() instanceof Double && range.getMaximumNumber() instanceof Double) {
      result = randomData.nextUniform(range.getMinimumDouble(), range.getMaximumDouble());
    }

    return result;
  }
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextUniform()

        double[] permuted = new double[10];
        RandomDataImpl random = new RandomDataImpl();

        // Generate 10 distinct random values
        for (int i = 0; i < 10; i++) {
            original[i] = random.nextUniform(i + 0.5, i + 0.75);
        }

        // Generate a random permutation, making sure it is not the identity
        boolean isIdentity = true;
        do {
View Full Code Here

Examples of org.apache.commons.math.random.RandomDataImpl.nextUniform()

    private double[] generateSample() {
        final RandomData randomData = new RandomDataImpl();
        final int sampleSize = randomData.nextInt(10,100);
        double[] out = new double[sampleSize];
        for (int i = 0; i < out.length; i++) {
            out[i] = randomData.nextUniform(-100, 100);
        }
        return out;
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.