Free cookie consent management tool by TermsFeed Policy Generator

source: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.3/ConversionTests.cs @ 15632

Last change on this file since 15632 was 14492, checked in by abeham, 8 years ago

#2701:

  • Updated LLE encoding
    • Made folder for version 3.4
    • Added conversion from and to LLE-b representation (back-links)
    • Updated moves and movegenerator to replace bidirectionaldictionary with LLE-b representation
  • Updated MemPR (linear linkage)
    • Updated tabu walk
  • Added test for conversion between LLE-e and LLE and LLE-b and LLE
  • Updated test for move apply/undo and added test for applying in sequence
File size: 853 bytes
Line 
1using System;
2using System.Linq;
3using HeuristicLab.Encodings.LinearLinkageEncoding;
4using HeuristicLab.Random;
5using Microsoft.VisualStudio.TestTools.UnitTesting;
6
7namespace HeuristicLab.Tests.HeuristicLab.Encodings.LinearLinkageEncoding_3._3 {
8  [TestClass]
9  public class ConversionTests {
10    [TestMethod]
11    public void ConvertFromLLEtoLLEe() {
12      var random = new MersenneTwister(42);
13      var lle = MaxGroupsLinearLinkageCreator.Apply(random, 32, 8);
14      Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromEndLinks(lle.ToEndLinks())));
15    }
16
17    [TestMethod]
18    public void ConvertFromLLEtoLLEb() {
19      var random = new MersenneTwister(42);
20      var lle = MaxGroupsLinearLinkageCreator.Apply(random, 32, 8);
21      Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromBackLinks(lle.ToBackLinks())));
22    }
23  }
24}
Note: See TracBrowser for help on using the repository browser.