Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/06/15 13:28:55 (9 years ago)
Author:
mkommend
Message:

#2282: Moved PPP into the trunk.

Location:
trunk/sources/HeuristicLab.Tests
Files:
1 added
1 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/EnumerableBoolEqualityComparerTest.cs

    r11935 r11939  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Collections.Generic;
     23using System.Linq;
     24using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
     25using HeuristicLab.Random;
    226using Microsoft.VisualStudio.TestTools.UnitTesting;
    3 using HeuristicLab.Random;
    4 using System.Collections.Generic;
    5 using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
    6 using System.Linq;
    727
    828namespace ParameterlessPopulationPyramid.Test {
     
    1838    }
    1939    [TestMethod]
     40    [TestProperty("Time", "short")]
     41    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    2042    public void EnumerableBoolEqualsTest() {
    2143      bool[] array = new bool[10];
     
    2345      randFill(array, rand);
    2446      Assert.IsTrue(compare.Equals(array, array));
    25      
     47
    2648      // Clones equal
    2749      var another = (bool[])array.Clone();
    2850      Assert.IsTrue(compare.Equals(array, another));
    29      
     51
    3052      // Flipping a bit makes unequal
    31       int flip = rand.Next(array.Length-1);
     53      int flip = rand.Next(array.Length - 1);
    3254      another[flip] = !another[flip];
    3355      Assert.IsFalse(compare.Equals(array, another));
     
    4062
    4163    [TestMethod]
     64    [TestProperty("Time", "short")]
     65    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    4266    public void EnumerableBoolHashCollisionTest() {
    4367      int collisions = 0;
     
    4670      randFill(array, rand);
    4771      int original = compare.GetHashCode(array);
    48      
     72
    4973      bool[] another = (bool[])array.Clone();
    5074      // Perform random walk around string checking for hash collisions
     
    7094
    7195    [TestMethod]
     96    [TestProperty("Time", "short")]
     97    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    7298    public void EnumerableBoolHashSetTest() {
    7399      HashSet<bool[]> set = new HashSet<bool[]>(compare);
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/LinkageTreeTest.cs

    r11935 r11939  
    1 using System;
    2 using System.Collections.Generic;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
    322using System.Linq;
    423using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
     
    3049
    3150    [TestMethod]
     51    [TestProperty("Time", "short")]
     52    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    3253    public void LinkageTreeTestAdd() {
    3354      MersenneTwister rand = new MersenneTwister();
     
    4465
    4566    [TestMethod]
     67    [TestProperty("Time", "short")]
     68    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    4669    public void LinkageTreeTestEntropyDistance() {
    4770      MersenneTwister rand = new MersenneTwister();
     
    6588
    6689    [TestMethod]
     90    [TestProperty("Time", "short")]
     91    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    6792    public void LinkageTreeTestRebuild() {
    6893      // The seed matters as equal sized clusters can appear in any order
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs

    r11935 r11939  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
    23 using Microsoft.VisualStudio.TestTools.UnitTesting;
     23using System.Threading;
    2424using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
    2525using HeuristicLab.Common;
     26using Microsoft.VisualStudio.TestTools.UnitTesting;
    2627
    2728namespace ParameterlessPopulationPyramid.Test {
     
    3839      PrivateObject hidden = new PrivateObject(solver);
    3940      try {
    40         hidden.Invoke("Run");
     41        hidden.Invoke("Run", new CancellationToken());
    4142      }
    4243      catch (OperationCanceledException) {
     
    4546
    4647      Assert.AreEqual(maximumEvaluations, hidden.GetProperty("ResultsEvaluations"), "Total Evaluations");
    47       double foundQuality =  (double)hidden.GetProperty("ResultsBestQuality");
     48      double foundQuality = (double)hidden.GetProperty("ResultsBestQuality");
    4849      Assert.IsTrue(foundQuality.IsAlmost(bestQuality), string.Format("Expected <{0}> Actual <{1}>", bestQuality, foundQuality));
    4950      Assert.AreEqual(foundOn, hidden.GetProperty("ResultsBestFoundOnEvaluation"), "Found On");
     
    5152      return hidden;
    5253    }
    53    
     54
    5455    [TestMethod]
     56    [TestProperty("Time", "medium")]
     57    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    5558    public void P3DeceptiveTrap() {
    5659      var problem = new DeceptiveTrapProblem();
     
    6669    // Unlike DeceptiveTrap, DeceptiveStepTrap likely contains neutral (fitness equal) modifications.
    6770    [TestMethod]
     71    [TestProperty("Time", "medium")]
     72    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    6873    public void P3DeceptiveStepTrap() {
    6974      var problem = new DeceptiveStepTrapProblem();
     
    8085    // Unlike the Trap tests, HIFF uses higher order linkage learning.
    8186    [TestMethod]
     87    [TestProperty("Time", "medium")]
     88    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
    8289    public void P3HIFF() {
    8390      var problem = new HIFFProblem();
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r11916 r11939  
    131131    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
    132132      <HintPath>..\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
     133      <Private>False</Private>
     134    </Reference>
     135    <Reference Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     136      <SpecificVersion>False</SpecificVersion>
     137      <HintPath>..\bin\HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.dll</HintPath>
    133138      <Private>False</Private>
    134139    </Reference>
     
    411416    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessFunctionsTest.cs" />
    412417    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessRegressionTest.cs" />
     418    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\EnumerableBoolEqualityComparerTest.cs" />
     419    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\LinkageTreeTest.cs" />
     420    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\ParameterlessPopulationPyramidTest.cs" />
    413421    <Compile Include="HeuristicLab.Analysis-3.3\BonferroniHolmUnitTests.cs" />
    414422    <Compile Include="HeuristicLab.Analysis-3.3\ConfidenceIntervalsTests.cs" />
Note: See TracChangeset for help on using the changeset viewer.