public double[,] BuildModel() { var precedenceMatrixModel = new PrecedenceMatrixModel(Random, ParameterSet); for (int i = 0; i < Chromosomes.Count; i++) { precedenceMatrixModel.Add(Chromosomes[i]); } return(precedenceMatrixModel.PrecedenceMatrix); }
public List <IChromosome> GetSamples() { var result = new List <IChromosome>(); var precedenceMatrixModel = new PrecedenceMatrixModel(Random, ParameterSet); for (int i = 0; i < Chromosomes.Count; i++) { precedenceMatrixModel.Add(Chromosomes[i]); var chromosome = precedenceMatrixModel.GetSample(); result.Add(chromosome); } return(result); }
public PermutationOperatorBenchmarks() { var conflictDetectors = new List <IConflictDetector>() { AllRightConflictDetector.Instance }; var chromosomeCreator = new PermutationRandomCreator(Size, Random, conflictDetectors); PrebuildModel = new PrecedenceMatrixModel(Random, ParameterSet, null); for (int i = 0; i < Count; i++) { Chromosomes.Add(chromosomeCreator.Create()); } PrebuildModel.Add(chromosomeCreator.Create()); }