Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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( );
 }
Exemplo n.º 3
0
            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;
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 7
0
 public HyperCubeOperations( IRandomNumberGeneratorFactory rng )
 {
     this.rng = rng;
 }
Exemplo n.º 8
0
 public IHyperCubeOperations CreateNew(IRandomNumberGeneratorFactory rng)
 {
     return(new HyperCubeOperations(rng.CreateFactory()));
 }
Exemplo n.º 9
0
 public WeibullGen(IRandomNumberGeneratorFactory rng, TSysConfig template)
 {
     this.template = template;
     random        = rng.CreateRandom();
 }
Exemplo n.º 10
0
 public LumpedAWBMFactory(RiverSystemScenario scenario, IRandomNumberGeneratorFactory rng)
 {
     this.scenario = scenario;
     this.random   = rng.CreateRandom();
     GetMetaParameterSet();
 }
 public IHyperCubeOperations CreateNew(IRandomNumberGeneratorFactory rng)
 {
     return(HcFactory.CreateNew(rng));
 }