public UniformRandomSampling(IClonableObjectiveEvaluator <T> evaluator, IRandomNumberGeneratorFactory rng, T template, int numShuffle, IDictionary <string, string> tags = null) { this.evaluator = evaluator; this.populationInitializer = new UniformRandomSamplingFactory <T>(rng, template); this.numShuffle = numShuffle; this.logTags = tags; }
public UniformRandomSamplingFactory(IRandomNumberGeneratorFactory rng, TSysConfig template) { this.rng = rng; if (!template.SupportsThreadSafeCloning) { throw new ArgumentException("This URS factory requires cloneable and thread-safe system configurations"); } this.template = template; this.hcOps = CreateIHyperCubeOperations( ); }
private void initString(IRandomNumberGeneratorFactory rng, int length) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < length; i++) { sb.Append(Convert.ToChar(rng.Next() % 128)); vector[i] = (rng.Next() % 2) * 2 - 1; // -1 or 1 } this.best = sb.ToString(); }
public LatinHypercubeSampling(IRandomNumberGeneratorFactory rng, TSysConfig template, int nDiv = 5) { this.rng = rng; this.rand = rng.CreateRandom(); if (!template.SupportsThreadSafeCloning) { throw new ArgumentException("This URS factory requires cloneable and thread-safe system configurations"); } this.template = template; this.hcOps = new HyperCubeOperations(rng.CreateFactory()); this.nDiv = nDiv; }
public StringFinder(IObjectiveEvaluator <StringSpecification> objEval, int strLength, IRandomNumberGeneratorFactory rng) { this.objEval = objEval; this.strLength = strLength; vector = new int[strLength]; initString(rng, strLength); }
public HyperCubeOperations(IRandomNumberGeneratorFactory rng) { this.rng = rng; }
public HyperCubeOperations( IRandomNumberGeneratorFactory rng ) { this.rng = rng; }
public IHyperCubeOperations CreateNew(IRandomNumberGeneratorFactory rng) { return(new HyperCubeOperations(rng.CreateFactory())); }
public WeibullGen(IRandomNumberGeneratorFactory rng, TSysConfig template) { this.template = template; random = rng.CreateRandom(); }
public LumpedAWBMFactory(RiverSystemScenario scenario, IRandomNumberGeneratorFactory rng) { this.scenario = scenario; this.random = rng.CreateRandom(); GetMetaParameterSet(); }
public IHyperCubeOperations CreateNew(IRandomNumberGeneratorFactory rng) { return(HcFactory.CreateNew(rng)); }