Exemplo n.º 1
0
 private void CompareScoreMethods(VectorPicture vectorPicture, PolygonChanged mutation, Bitmap image)
 {
     var algorithm = new TestAlgorithm(image, vectorPicture, PictureMutationAlgorithm.ScoringMethodEnum.FullEvaluationScoring);
     var scores = new List<double>(scorers.Length);
     foreach (var scorer in scorers.Select(sf => sf(algorithm)))
     {
         algorithm.SetInitial();
         scorer.FoundBetter(vectorPicture);
         scores.Add(scorer.GetError(mutation));
     }
     Assert.IsTrue(scores.Distinct().Count() == 1);
 }