Package org.jamesii.core.math.random.distributions

Examples of org.jamesii.core.math.random.distributions.UniformDistribution


  }

  /** Applies test to a constant sample and a random sample. */
  public void testConstantVsRandomSample() {
    List<Double> constantSample =
        getRandomSample(new UniformDistribution(random, 1.0, 1.0));
    List<Double> randomSample =
        getRandomSample(new UniformDistribution(random, 0.0, 1.0));
    checkTestResult(constantSample, randomSample);
  }
View Full Code Here


      numOfAlgo = (int) (991 * rng.nextDouble() + 10);
    }
    if (numOfProb == 0) {
      numOfProb = (int) (991 * rng.nextDouble() + 10);
    }
    UniformDistribution u =
        new UniformDistribution(rng, minPerformance, maxPerformance + 1);
    Double[][] matrix = new Double[numOfAlgo][numOfProb];
    for (Double[] mat : matrix) {
      for (int i = 0; i < mat.length; i++) {
        mat[i] = u.getRandomNumber();
      }
    }
    return matrix;
  }
View Full Code Here

  /**
   * Uses uniform distributions with degree [1,10], labels [0,1].
   */
  public RandomGraphGenerator() {
    UniformDistribution dis =
        new UniformDistribution(SimSystem.getRNGGenerator().getNextRNG());
    dis.setLowerBorder(1d);
    dis.setUpperBorder(10d);
    degDistri = dis;
    nlDistri = dis.getSimilar(dis.getRandom());
    elDistri = dis.getSimilar(dis.getRandom());
  }
View Full Code Here

    }
  }

  private void populatePool(int numOfIndividuals,
      AbstractIndividualFactory indFactory) {
    UniformDistribution portfolioSize =
        new UniformDistribution(rng, problem.getMinSize(),
            problem.getMaxSize() + 1);
    individuals = new IIndividual[numOfIndividuals];
    for (int i = 0; i < numOfIndividuals; i++) {
      individuals[i] =
          indFactory.createRandomIndividual(rng,
              problem.getPerformanceData()[0].performances.length,
              (int) portfolioSize.getRandomNumber());
    }
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.math.random.distributions.UniformDistribution

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.