Changeset 881
- Timestamp:
- 12/01/08 13:47:10 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Evolutionary
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Evolutionary/CrossoverBase.cs
r108 r881 27 27 28 28 namespace HeuristicLab.Evolutionary { 29 /// <summary> 30 /// Base class for crossing over operators. 31 /// </summary> 29 32 public abstract class CrossoverBase : OperatorBase { 33 /// <summary> 34 /// Initializes a new instance of <see cref="CrossoverBase"/> with one variable info (<c>Random</c>). 35 /// </summary> 30 36 public CrossoverBase() 31 37 : base() { … … 33 39 } 34 40 41 /// <summary> 42 /// Replaces the parents (the sub scopes of the current <paramref name="scope"/>) with created children 43 /// by crossing over of two adjacent sub scopes. 44 /// </summary> 45 /// <exception cref="InvalidOperationException">Thrown when the size of the mating pool 46 /// is not even.</exception> 47 /// <param name="scope">The current scope whose sub scopes shall be parents.</param> 48 /// <returns><c>null</c>.</returns> 35 49 public override IOperation Apply(IScope scope) { 36 50 IRandom random = GetVariableValue<IRandom>("Random", scope, true); … … 53 67 } 54 68 69 /// <summary> 70 /// Performs a cross over of <paramref name="parent1"/> and <paramref name="parent2"/> 71 /// to create a new <paramref name="child"/>. 72 /// </summary> 73 /// <param name="scope">The current scope.</param> 74 /// <param name="random">A random number generator.</param> 75 /// <param name="parent1">The parent scope 1 to cross over.</param> 76 /// <param name="parent2">The parent scope 2 to cross over.</param> 77 /// <param name="child">The resulting child of the cross over.</param> 55 78 protected abstract void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child); 56 79 } -
trunk/sources/HeuristicLab.Evolutionary/HeuristicLabEvolutionaryPlugin.cs
r582 r881 26 26 27 27 namespace HeuristicLab.Evolutionary { 28 /// <summary> 29 /// Plugin class for HeuristicLab.Evolutionary plugin. 30 /// </summary> 28 31 [ClassInfo(Name = "HeuristicLab.Evolutionary-3.2")] 29 32 [PluginFile(Filename = "HeuristicLab.Evolutionary-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.Evolutionary/MultiCrossoverBase.cs
r108 r881 28 28 29 29 namespace HeuristicLab.Evolutionary { 30 /// <summary> 31 /// Base class for cross over operators that use more than two parents. 32 /// </summary> 30 33 public abstract class MultiCrossoverBase : OperatorBase { 34 /// <summary> 35 /// Initializes a new instance of <see cref="MultiCrossoverBase"/> with two variable infos 36 /// (<c>Parents</c> and <c>Random</c>). 37 /// </summary> 31 38 public MultiCrossoverBase() 32 39 : base() { … … 35 42 } 36 43 44 /// <summary> 45 /// Replaces the parents (sub scopes of the given <paramref name="scope"/>) with created children 46 /// by crossing over a specified number of parents. 47 /// </summary> 48 /// <remarks>Adds the children to the given <paramref name="scope"/> and removes the parents.</remarks> 49 /// <exception cref="InvalidOperationException">Thrown when the size of the mating pool and the 50 /// number of parents don't match.</exception> 51 /// <param name="scope">The scope whose sub scopes shall be crossed over.</param> 52 /// <returns><c>null</c>.</returns> 37 53 public override IOperation Apply(IScope scope) { 38 54 IRandom random = GetVariableValue<IRandom>("Random", scope, true); … … 57 73 return null; 58 74 } 59 75 /// <summary> 76 /// Performs a cross over of a number of <paramref name="parents"/> 77 /// to create a new <paramref name="child"/>. 78 /// </summary> 79 /// <param name="scope">The current scope.</param> 80 /// <param name="random">A random number generator.</param> 81 /// <param name="parents">The scopes to cross over.</param> 82 /// <param name="child">The result of the cross over.</param> 60 83 protected abstract void Cross(IScope scope, IRandom random, IScope[] parents, IScope child); 61 84 } -
trunk/sources/HeuristicLab.Evolutionary/SASEGASAReunificator.cs
r2 r881 27 27 28 28 namespace HeuristicLab.Evolutionary { 29 /// <summary> 30 /// Joins all sub sub scopes of a specified scope, reduces the number of sub 31 /// scopes by 1 and uniformly partitions the sub sub scopes again, maintaining the order. 32 /// </summary> 29 33 public class SASEGASAReunificator : OperatorBase { 34 /// <inheritdoc select="summary"/> 30 35 public override string Description { 31 36 get { return @"TODO\r\nOperator description still missing ..."; } 32 37 } 33 38 39 /// <summary> 40 /// Joins all sub sub scopes of the given <paramref name="scope"/>, reduces the number of sub 41 /// scopes by 1 and uniformly partitions the sub sub scopes again, maintaining the order. 42 /// </summary> 43 /// <exception cref="InvalidOperationException">Thrown when only 0 or 1 sub scope is available.</exception> 44 /// <param name="scope">The current scope whose sub scopes to reduce.</param> 45 /// <returns><c>null</c>.</returns> 34 46 public override IOperation Apply(IScope scope) { 35 47 int subScopes = scope.SubScopes.Count; -
trunk/sources/HeuristicLab.Evolutionary/SubScopesStorer.cs
r77 r881 28 28 29 29 namespace HeuristicLab.Evolutionary { 30 /// <summary> 31 /// Stores the sub scopes of the right sub scope until enough newly created child scopes are available 32 /// (for example to replace a generation). 33 /// </summary> 30 34 public class SubScopesStorer : OperatorBase { 35 /// <inheritdoc select="summary"/> 31 36 public override string Description { 32 37 get { return @"TODO\r\nOperator description still missing ..."; } 33 38 } 34 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="SubScopesStorer"/> with two variable infos 42 /// (<c>SubScopes</c> and <c>SubScopesStore</c>). 43 /// </summary> 35 44 public SubScopesStorer() 36 45 : base() { … … 39 48 } 40 49 50 /// <summary> 51 /// Stores all sub scopes of the right branch to get the required number of sub scopes. Shifts the left 52 /// branch one level up, if sub scopes are still missing (so that another selection and mutation circle 53 /// can take place). 54 /// </summary> 55 /// <param name="scope">The current scope whose sub scopes to store.</param> 56 /// <returns><c>null</c> if the required number of sub scopes is available, the next 57 /// <see cref="AtomicOperation"/> if sub scopes are still missing.</returns> 41 58 public override IOperation Apply(IScope scope) { 42 59 IntData subScopes = GetVariableValue<IntData>("SubScopes", scope, true); -
trunk/sources/HeuristicLab.Evolutionary/SuccessRuleMutationStrengthAdjuster.cs
r77 r881 27 27 28 28 namespace HeuristicLab.Evolutionary { 29 /// <summary> 30 /// Adjusts the mutation strength based on the ratio of successful offsprings. 31 /// </summary> 29 32 public class SuccessRuleMutationStrengthAdjuster : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"Adjusts the mutation strength based on the ratio of successful offsprings"; } 32 36 } 33 37 38 /// <summary> 39 /// Initializes a new instance of <see cref="SuccessRuleMutationStrengthAdjuster"/> with six variable 40 /// infos (<c>ShakingFactor</c>, <c>SuccessfulChild</c>, <c>TargetSuccessProbability</c>, 41 /// <c>SuccessProbability</c>, <c>LearningRate</c> and <c>DampeningFactor</c>). 42 /// </summary> 34 43 public SuccessRuleMutationStrengthAdjuster() { 35 44 AddVariableInfo(new VariableInfo("ShakingFactor", "The mutation strength to adjust", typeof(DoubleData), VariableKind.In | VariableKind.Out)); … … 41 50 } 42 51 52 /// <summary> 53 /// Adjusts the mutation strength based on the ratio of successful offsprings. 54 /// </summary> 55 /// <param name="scope">The current scope where to adjust the mutation strength.</param> 56 /// <returns><c>null</c>.</returns> 43 57 public override IOperation Apply(IScope scope) { 44 58 DoubleData shakingFactor = GetVariableValue<DoubleData>("ShakingFactor", scope, true); -
trunk/sources/HeuristicLab.Evolutionary/UnidirectionalRingMigrator.cs
r2 r881 27 27 28 28 namespace HeuristicLab.Evolutionary { 29 /// <summary> 30 /// Operator class that migrates one sub scope of each child to its left neighbour sub scope, like a ring. 31 /// </summary> 29 32 public class UnidirectionalRingMigrator : OperatorBase { 33 /// <inheritdoc select="summary"/> 30 34 public override string Description { 31 35 get { return @"TODO\r\nOperator description still missing ..."; } 32 36 } 33 37 38 /// <summary> 39 /// Migrates every first sub scope of each child to its left neighbour (like a ring). 40 /// <pre> 41 /// scope scope 42 /// / | \ / | \ 43 /// A B C => A B C 44 /// /|\ /|\ /|\ /|\ /|\ /|\ 45 /// G H I J K L M N O H I J K L M N O G 46 /// </pre> 47 /// </summary> 48 /// <param name="scope">The scope whose sub scopes of the children should migrate.</param> 49 /// <returns><c>null</c>.</returns> 34 50 public override IOperation Apply(IScope scope) { 35 51 IList<IScope> emigrantsList = new List<IScope>();
Note: See TracChangeset
for help on using the changeset viewer.