Package org.apache.commons.math.random

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


        DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
            new GaussNewtonOptimizer(true);
        JDKRandomGenerator g = new JDKRandomGenerator();
        g.setSeed(12373523445l);
        RandomVectorGenerator generator =
            new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
        MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
            new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                       10, generator);
        optimizer.setMaxIterations(100);
        optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
View Full Code Here


  @Override
  public Iterator<List<StoreFile>> iterator() {
    return new Iterator<List<StoreFile>>() {
      private GaussianRandomGenerator gen =
          new GaussianRandomGenerator(new MersenneTwister(random.nextInt()));
      private int count = 0;

      @Override
      public boolean hasNext() {
        return count < MAX_FILE_GEN_ITERS;
      }

      @Override
      public List<StoreFile> next() {
        count += 1;
        ArrayList<StoreFile> files = new ArrayList<StoreFile>(NUM_FILES_GEN);
        for (int i = 0; i < NUM_FILES_GEN; i++) {
          files.add(createMockStoreFile(
              (int) Math.ceil(Math.max(0, gen.nextNormalizedDouble() * 32 + 32)))
          );
        }

        return files;
      }
View Full Code Here

TOP

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

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.