Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/07/17 09:34:44 (7 years ago)
Author:
bwerth
Message:

#2745 added LatinHyperCubeDesign as possible InitialSamplingPlan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/EgoUtilities.cs

    r14818 r14833  
    2525using System.Threading;
    2626using HeuristicLab.Common;
    27 using HeuristicLab.Core;
    2827using HeuristicLab.Data;
    2928using HeuristicLab.Encodings.RealVectorEncoding;
     
    7675      if (ex != null) throw ex;
    7776      return alg.Results;
    78     }
    79     public static RealVector[] GetUniformRandomDesign(int points, int dim, DoubleMatrix bounds, IRandom random) {
    80       var res = new RealVector[points];
    81       for (var i = 0; i < points; i++) {
    82         var r = new RealVector(dim);
    83         res[i] = r;
    84         for (var j = 0; j < dim; j++) {
    85           var b = j % bounds.Rows;
    86           r[j] = UniformRandom(bounds[b, 0], bounds[b, 1], random);
    87         }
    88       }
    89       return res;
    90     }
    91     public static double UniformRandom(double min, double max, IRandom rand) {
    92       return rand.NextDouble() * (max - min) + min;
    9377    }
    9478
Note: See TracChangeset for help on using the changeset viewer.