Java ThreadLocalRandom generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit)

Here you can find the source of generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit)

Description

generate Random Double Vector

License

Open Source License

Declaration

public static double[] generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static double[] generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit) {
        double[] position = new double[dimension];

        for (int i = 0; i < dimension; i++) {
            position[i] = ThreadLocalRandom.current().nextDouble(bottomLimit, topLimit);
        }//  w w w . ja va  2s  .c om

        return position;
    }
}

Related

  1. createNewPin()
  2. createRandom(int number)
  3. createRandomName()
  4. createRandomNumbers(int length)
  5. generateDescription()
  6. generateRandomisedId()
  7. generateRandomSalt(int saltSize)
  8. generateString(int length)
  9. generateString(Random rng, String characters, int length)