Changeset 17262 for branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective/FastHyperVolumeTests.cs
- Timestamp:
- 09/17/19 17:28:33 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/Multi-objective/FastHyperVolumeTests.cs
r17261 r17262 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Optimization; 22 23 using Microsoft.VisualStudio.TestTools.UnitTesting; 23 24 24 namespace HeuristicLab. Problems.TestFunctions.MultiObjective.Tests {25 namespace HeuristicLab.Analysis.MultiObjective.Tests { 25 26 [TestClass] 26 27 public class FastHypervolumeTest { … … 38 39 /// </summary> 39 40 [TestMethod] 40 [TestCategory(" Problems.TestFunctions.MultiObjective")]41 [TestCategory("Analysis.MultiObjective")] 41 42 [TestProperty("Time", "short")] 42 43 public void FastHypervolumeTestSinglePoint() { … … 44 45 double[][] front = { point }; 45 46 double[] referencePoint = new double[] { 1, 1, 1 }; 46 double hv = Hypervolume .Calculate(front, referencePoint, new bool[3]);47 double hv = HypervolumeCalculator.CalculateHypervolume(front, referencePoint, new bool[3]); 47 48 Assert.AreEqual(0.125, hv); 48 49 } … … 56 57 /// +-----+ 57 58 /// 58 /// box between(0,0) and(1,1) with singular point pareto front at a random Location59 /// box between(0,0) and(1,1) with singular point Pareto front at a random Location 59 60 /// Sum of the Hypervolume to each of the corners should be 1; 60 61 /// 61 62 /// </summary> 62 63 [TestMethod] 63 [TestCategory(" Problems.TestFunctions.MultiObjective")]64 [TestCategory("Analysis.MultiObjective")] 64 65 [TestProperty("Time", "short")] 65 66 public void FastHypervolumeTestRandomSinglePoint() { … … 79 80 referencePoint[1] = 1; 80 81 referencePoint[2] = 1; 81 double hv = Hypervolume .Calculate(front, referencePoint, new bool[3]);82 double hv = HypervolumeCalculator.CalculateHypervolume(front, referencePoint, new bool[3]); 82 83 double hv2 = 1; 83 84 foreach (double d in point) { … … 95 96 /// +-----x 96 97 /// 97 /// box between(0,0,0) and(1,1,1) with three point ( pareto) front at (1,0,0), (0.5,0.5,0) and (0,1,0)98 /// box between(0,0,0) and(1,1,1) with three point (Pareto) front at (1,0,0), (0.5,0.5,0) and (0,1,0) 98 99 /// Hypervolume should be 0.25 99 100 /// </summary> 100 101 [TestMethod] 101 [TestCategory(" Problems.TestFunctions.MultiObjective")]102 [TestCategory("Analysis.MultiObjective")] 102 103 [TestProperty("Time", "short")] 103 104 public void FastHypervolumeTestDiagonalPoint() { … … 109 110 110 111 double[] referencePoint = new double[] { 1, 1, 1 }; 111 double hv = Hypervolume .Calculate(front, referencePoint, new bool[3]);112 double hv = HypervolumeCalculator.CalculateHypervolume(front, referencePoint, new bool[3]); 112 113 Assert.AreEqual(0.5, hv); 113 114 }
Note: See TracChangeset
for help on using the changeset viewer.