Changeset 3527
- Timestamp:
- 04/26/10 01:38:30 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/MultiBinaryVectorCrossover.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 76 77 } 77 78 } 79 80 public override IOperation Apply() { 81 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one binary vector crossover to choose from."); 82 return base.Apply(); 83 } 78 84 } 79 85 } -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 76 77 } 77 78 } 79 80 public override IOperation Apply() { 81 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one integer vector crossover to choose from."); 82 return base.Apply(); 83 } 78 84 } 79 85 } -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 76 77 } 77 78 } 79 80 public override IOperation Apply() { 81 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation crossover to choose from."); 82 return base.Apply(); 83 } 78 84 } 79 85 } -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/MultiPermutationManipulator.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 68 69 } 69 70 } 71 72 public override IOperation Apply() { 73 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation manipulator to choose from."); 74 return base.Apply(); 75 } 70 76 } 71 77 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 81 82 } 82 83 } 84 85 public override IOperation Apply() { 86 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one real vector crossover to choose from."); 87 return base.Apply(); 88 } 83 89 } 84 90 } -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MultiRealVectorManipulator.cs
r3445 r3527 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Collections; … … 74 75 } 75 76 } 77 78 public override IOperation Apply() { 79 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one real vector manipulator to choose from."); 80 return base.Apply(); 81 } 76 82 } 77 83 } -
trunk/sources/HeuristicLab.Operators/3.3/StochasticMultiOperator.cs
r3445 r3527 34 34 /// Base class for stochastic multi operators. 35 35 /// </summary> 36 [Item("StochasticMultiOperator ", "Base class for stochastic multi operators.")]36 [Item("StochasticMultiOperator<T>", "Base class for stochastic multi operators.")] 37 37 [StorableClass] 38 38 public abstract class StochasticMultiOperator<T> : MultiOperator<T> where T : class, IOperator { … … 58 58 protected StochasticMultiOperator(bool deserializing) : base(deserializing) { } 59 59 /// <summary> 60 /// Initializes a new instance of <see cref="StochasticMulti Branch"/> with two parameters60 /// Initializes a new instance of <see cref="StochasticMultiOperator"/> with two parameters 61 61 /// (<c>Probabilities</c> and <c>Random</c>). 62 62 /// </summary> … … 119 119 DoubleArray probabilities = ProbabilitiesParameter.ActualValue; 120 120 if(probabilities.Length != Operators.Count) { 121 throw new InvalidOperationException( "MultiCrossover: The list of probabilities has to match the number of operators");121 throw new InvalidOperationException(Name + ": The list of probabilities has to match the number of operators"); 122 122 } 123 123 double sum = 0;
Note: See TracChangeset
for help on using the changeset viewer.