Changeset 3061
- Timestamp:
- 03/16/10 11:37:25 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3.sln
r3053 r3061 55 55 {BB994448-2B21-4564-BB2E-38D8FFF8CF18} = {BB994448-2B21-4564-BB2E-38D8FFF8CF18} 56 56 {C49CB749-8B24-4628-8003-E86475749410} = {C49CB749-8B24-4628-8003-E86475749410} 57 {BB6D334A-4BB6-4674-9883-31A6EBB32CAB} = {BB6D334A-4BB6-4674-9883-31A6EBB32CAB} 57 58 {2C36CD4F-E5F5-43A4-801A-201EA895FE17} = {2C36CD4F-E5F5-43A4-801A-201EA895FE17} 58 59 {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} = {3BD61258-31DA-4B09-89C0-4F71FEF5F05A} 59 60 {C664305E-497C-4533-A140-967DEDB05C19} = {C664305E-497C-4533-A140-967DEDB05C19} 61 {6F18ED66-2333-4B5C-B882-AC99FB3CDCE5} = {6F18ED66-2333-4B5C-B882-AC99FB3CDCE5} 60 62 {56F9106A-079F-4C61-92F6-86A84C2D84B7} = {56F9106A-079F-4C61-92F6-86A84C2D84B7} 63 {30D6606B-96E7-436C-B5D7-EA1455848E37} = {30D6606B-96E7-436C-B5D7-EA1455848E37} 61 64 {DC3D7072-7999-4719-B65D-3997744D5DC1} = {DC3D7072-7999-4719-B65D-3997744D5DC1} 62 65 {F42F3576-7233-4B28-90F7-36AE15F30F92} = {F42F3576-7233-4B28-90F7-36AE15F30F92} … … 64 67 {57F38579-409D-4DD8-AB19-3F2C4A665126} = {57F38579-409D-4DD8-AB19-3F2C4A665126} 65 68 {4ABA047D-46DD-4608-9E4A-41C5F92FDBB1} = {4ABA047D-46DD-4608-9E4A-41C5F92FDBB1} 69 {8FA6898D-E4B0-4E08-A6D6-F9F520E7959F} = {8FA6898D-E4B0-4E08-A6D6-F9F520E7959F} 66 70 {BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {BF7D9494-A586-457B-8DF9-ED599F9E6A71} 67 71 {600287A3-8714-453E-B875-A05F3EB72315} = {600287A3-8714-453E-B875-A05F3EB72315} … … 71 75 {958B43BC-CC5C-4FA2-8628-2B3B01D890B6} = {958B43BC-CC5C-4FA2-8628-2B3B01D890B6} 72 76 {AB687BBE-1BFE-476B-906D-44237135431D} = {AB687BBE-1BFE-476B-906D-44237135431D} 77 {66D249C3-A01D-42A8-82A2-919BC8EC3D83} = {66D249C3-A01D-42A8-82A2-919BC8EC3D83} 73 78 {4C3305C4-E440-4EAD-B218-68D77AE51543} = {4C3305C4-E440-4EAD-B218-68D77AE51543} 74 79 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C} = {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C} … … 77 82 {EE2034D9-6E27-48A1-B855-42D45F69A4FC} = {EE2034D9-6E27-48A1-B855-42D45F69A4FC} 78 83 {1B3063DB-D71C-4A6A-A359-883E8F53A140} = {1B3063DB-D71C-4A6A-A359-883E8F53A140} 84 {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} = {DDFB14DD-2A85-493C-A52D-E69729BBAEB0} 79 85 {35A42EE0-A896-4D7A-A99F-8ED9E925F320} = {35A42EE0-A896-4D7A-A99F-8ED9E925F320} 80 86 {AE5B1CE5-9862-4D6F-A700-D72CD9AEA295} = {AE5B1CE5-9862-4D6F-A700-D72CD9AEA295} -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs
r3055 r3061 47 47 : base() { 48 48 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 49 Parameters.Add(new LookupParameter< IntArray>("BinaryVector", "The vector which should be manipulated."));49 Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The vector which should be manipulated.")); 50 50 Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector.")); 51 51 } -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs
r3055 r3061 47 47 : base() { 48 48 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators.")); 49 Parameters.Add(new SubScopesLookupParameter< IntArray>("Parents", "The parent vectors which should be crossed."));50 Parameters.Add(new LookupParameter< IntArray>("Child", "The child vector resulting from the crossover."));49 Parameters.Add(new SubScopesLookupParameter<BinaryVector>("Parents", "The parent vectors which should be crossed.")); 50 Parameters.Add(new LookupParameter<BinaryVector>("Child", "The child vector resulting from the crossover.")); 51 51 } 52 52 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs
r3055 r3061 44 44 : base() { 45 45 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 46 Parameters.Add(new LookupParameter< IntArray>("BinaryVector", "The vector which should be manipulated."));46 Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The vector which should be manipulated.")); 47 47 } 48 48 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs
r3053 r3061 20 20 #endregion 21 21 22 using HeuristicLab.Data;23 22 using HeuristicLab.Common; 23 using HeuristicLab.Encodings.BinaryVectorEncoding; 24 24 25 25 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests { 26 26 public static class Auxiliary { 27 public static bool B oolVectorIsEqualByPosition(BoolArray p1, BoolArrayp2) {27 public static bool BinaryVectorIsEqualByPosition(BinaryVector p1, BinaryVector p2) { 28 28 bool equal = (p1.Length == p2.Length); 29 29 if (equal) { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs
r3053 r3061 20 20 #endregion 21 21 22 using HeuristicLab.Data;23 22 using HeuristicLab.Common; 23 using HeuristicLab.Encodings.IntegerVectorEncoding; 24 24 25 25 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests { 26 26 public static class Auxiliary { 27 public static bool Int VectorIsEqualByPosition(IntArray p1, IntArrayp2) {27 public static bool IntegerVectorIsEqualByPosition(IntegerVector p1, IntegerVector p2) { 28 28 bool equal = (p1.Length == p2.Length); 29 29 if (equal) { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs
r3059 r3061 76 76 exceptionFired = false; 77 77 try { 78 Int Arrayactual;78 IntegerVector actual; 79 79 actual = target.Cross(random, parents); 80 80 } catch (System.ArgumentException) { … … 99 99 expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 }); 100 100 actual = DiscreteCrossover.Apply(random, parent1, parent2); 101 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(actual, expected));101 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected)); 102 102 103 103 // The following test is not based on published examples -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
r3059 r3061 111 111 expected = new IntegerVector(new int[] { 2, 2, 3, 2, 8 }); 112 112 actual = SinglePointCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs
r3059 r3061 95 95 max = new IntValue(7); 96 96 UniformOnePositionManipulator.Apply(random, parent, min, max); 97 Assert.IsTrue(Auxiliary.Int VectorIsEqualByPosition(expected, parent));97 Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent)); 98 98 } 99 99 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/Auxiliary.cs
r3060 r3061 20 20 #endregion 21 21 22 using HeuristicLab.Data;23 22 using HeuristicLab.Common; 23 using HeuristicLab.Encodings.RealVectorEncoding; 24 24 25 25 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests { 26 26 public static class Auxiliary { 27 public static bool DoubleArrayIsAlmostEqualByPosition(DoubleArray p1, DoubleArrayp2) {27 public static bool RealVectorIsAlmostEqualByPosition(RealVector p1, RealVector p2) { 28 28 bool equal = (p1.Length == p2.Length); 29 29 if (equal) { -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaBetaCrossoverTest.cs
r3060 r3061 114 114 expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 }); 115 115 actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta); 116 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));116 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 117 117 // The following test is not based on published examples 118 118 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaCrossoverTest.cs
r3060 r3061 112 112 expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 }); 113 113 actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha); 114 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));114 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 115 115 // The following test is not based on published examples 116 116 random.Reset(); … … 121 121 expected = new RealVector(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 }); 122 122 actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha); 123 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));123 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 124 124 // The following test is not based on published examples 125 125 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs
r3060 r3061 101 101 expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 }); 102 102 actual = DiscreteCrossover.Apply(random, parents); 103 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));103 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 104 104 // The following test is not based on published examples 105 105 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/HeuristicCrossoverTest.cs
r3060 r3061 111 111 expected = new RealVector(new double[] { 0.14, 0.23, 0.3, 0.59, -0.11 }); 112 112 actual = HeuristicCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/LocalCrossoverTest.cs
r3060 r3061 111 111 expected = new RealVector(new double[] { 0.34, 0.11, 0.3, 0.32, 0.639 }); 112 112 actual = LocalCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs
r3060 r3061 100 100 maximumGenerations = new IntValue(4); 101 101 MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency); 102 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(expected, parent));102 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); 103 103 // The following test is not based on published examples 104 104 exceptionFired = false; -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs
r3060 r3061 101 101 maximumGenerations = new IntValue(4); 102 102 MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, min, max, currentGeneration, maximumGenerations, generationsDependency); 103 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(expected, parent));103 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); 104 104 // The following test is not based on published examples 105 105 exceptionFired = false; -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialAllPositionManipulatorTest.cs
r3060 r3061 96 96 maxManipulation = new DoubleValue(0.2); 97 97 PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation); 98 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(expected, parent));98 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); 99 99 // The following test is not based on published examples 100 100 exceptionFired = false; -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialOnePositionManipulatorTest.cs
r3060 r3061 97 97 maxManipulation = new DoubleValue(0.7); 98 98 PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation); 99 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(expected, parent));99 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); 100 100 // The following test is not based on published examples 101 101 exceptionFired = false; -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/RandomConvexCrossoverTest.cs
r3060 r3061 111 111 expected = new RealVector(new double[] { 0.34, 0.13, 0.3, 0.29, 0.59 }); 112 112 actual = RandomConvexCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs
r3060 r3061 113 113 expected = new RealVector(new double[] { 1.11032829834638, -0.0145477755417797, 0.3, 0.5, 0.1 }); 114 114 actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity); 115 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));115 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 116 116 // The following test is not based on published examples 117 117 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
r3060 r3061 111 111 expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.2, 0.8 }); 112 112 actual = SinglePointCrossover.Apply(random, parent1, parent2); 113 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(actual, expected));113 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected)); 114 114 // The following test is not based on published examples 115 115 random.Reset(); -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs
r3060 r3061 96 96 max = new DoubleValue(0.7); 97 97 UniformOnePositionManipulator.Apply(random, parent, min, max); 98 Assert.IsTrue(Auxiliary. DoubleArrayIsAlmostEqualByPosition(expected, parent));98 Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent)); 99 99 } 100 100
Note: See TracChangeset
for help on using the changeset viewer.