public Engine(ExperimentParameters experimentParameters, IBenchmark benchmark, ConstraintsBuilderBase constraintsBuilder, IProcessor <Point[]> pointsNormalizer, IProcessor <Constraint[]> redundantConstraintsRemover, IAngleCalculator meanAngleCalculator, Stopwatch stoper) { Parameters = experimentParameters; Benchmark = benchmark; _constraintsBuilder = constraintsBuilder; _redundantConstraintsRemover = redundantConstraintsRemover; _stoper = stoper; _meanAngleCalculator = meanAngleCalculator; _pointsNormalizer = pointsNormalizer; Statistics = new Statistics(); EvolutionSteps = new List <IList <Constraint> >(); NormalizedEvolutionSteps = new List <IList <Constraint> >(); MersenneTwister.Initialize(experimentParameters.Seed); //var normalDis = new NormalDistribution(); //const int count = int.MaxValue / 1000; //var values = new double[count]; //////var sum = 0.0; //for (int i = 0; i < count; i++) //{ // values[i] = MersenneTwister.Instance.NextGaussian(); //} ////values = normalDis.Generate(count); //var mean = values.Mean(); //var stdDev = values.StandardDeviation(); }
public Evaluator(Point[] positivePoints, Point[] negativePoints, ConstraintsBuilderBase constraintsBuilder) { _positivePoints = positivePoints; _negativePoints = negativePoints; _constraintsBuilder = constraintsBuilder; }
public SeedingProcessor(EvaluatorBase evaluator, ConstraintsBuilderBase constraintsBuilder, IList <Point> positivePoints) { _evaluator = evaluator; _constraintsBuilder = constraintsBuilder; _positivePoints = positivePoints.ToArray(); }