Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/19 17:28:33 (5 years ago)
Author:
mkommend
Message:

#2521: Adapted unit tests for multi-objective analysis.

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  
    2020#endregion
    2121using System;
     22using HeuristicLab.Optimization;
    2223using Microsoft.VisualStudio.TestTools.UnitTesting;
    2324
    24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
     25namespace HeuristicLab.Analysis.MultiObjective.Tests {
    2526  [TestClass]
    2627  public class FastHypervolumeTest {
     
    3839    /// </summary>
    3940    [TestMethod]
    40     [TestCategory("Problems.TestFunctions.MultiObjective")]
     41    [TestCategory("Analysis.MultiObjective")]
    4142    [TestProperty("Time", "short")]
    4243    public void FastHypervolumeTestSinglePoint() {
     
    4445      double[][] front = { point };
    4546      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]);
    4748      Assert.AreEqual(0.125, hv);
    4849    }
     
    5657    /// +-----+
    5758    ///
    58     /// box between(0,0) and(1,1) with singular point pareto front at a random Location
     59    /// box between(0,0) and(1,1) with singular point Pareto front at a random Location
    5960    /// Sum of the Hypervolume to each of the corners should be 1; 
    6061    ///
    6162    /// </summary>
    6263    [TestMethod]
    63     [TestCategory("Problems.TestFunctions.MultiObjective")]
     64    [TestCategory("Analysis.MultiObjective")]
    6465    [TestProperty("Time", "short")]
    6566    public void FastHypervolumeTestRandomSinglePoint() {
     
    7980      referencePoint[1] = 1;
    8081      referencePoint[2] = 1;
    81       double hv = Hypervolume.Calculate(front, referencePoint, new bool[3]);
     82      double hv = HypervolumeCalculator.CalculateHypervolume(front, referencePoint, new bool[3]);
    8283      double hv2 = 1;
    8384      foreach (double d in point) {
     
    9596    /// +-----x
    9697    ///
    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)
    9899    /// Hypervolume should be 0.25
    99100    /// </summary>
    100101    [TestMethod]
    101     [TestCategory("Problems.TestFunctions.MultiObjective")]
     102    [TestCategory("Analysis.MultiObjective")]
    102103    [TestProperty("Time", "short")]
    103104    public void FastHypervolumeTestDiagonalPoint() {
     
    109110
    110111      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]);
    112113      Assert.AreEqual(0.5, hv);
    113114    }
Note: See TracChangeset for help on using the changeset viewer.