Here you can find the source of generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit)
public static double[] generateRandomDoubleVector(int dimension, double bottomLimit, double topLimit)
//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; } }