private static double[] randomReals(int size) { var random = Accord.Math.Random.Generator.Random; double[] result = new double[size]; for (int i = 0; i < result.Length; i++) result[i] = random.NextDouble() * 2 - 1; return result; }