- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Addition.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Addition", "Symbol that represents the + operator.")] 29 30 public sealed class Addition : Symbol { 30 31 [StorableConstructor] 32 private Addition(bool deserializing) : base(deserializing) { } 33 private Addition(Addition original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Addition(this, cloner); 38 } 31 39 public Addition() 32 40 : base("+", "Symbol that represents the + operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/And.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("And", "Symbol that represents the boolean AND operator.")] 29 30 public sealed class And : Symbol { 30 31 [StorableConstructor] 32 private And(bool deserializing) : base(deserializing) { } 33 private And(And original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new And(this, cloner); 38 } 31 39 public And() 32 40 : base("&&", "Symbol that represents the boolean AND operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Average.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Average", "Symbol that represents the average (arithmetic mean) function.")] 29 30 public sealed class Average : Symbol { 30 31 [StorableConstructor] 32 private Average(bool deserializing) : base(deserializing) { } 33 private Average(Average original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Average(this, cloner); 38 } 31 39 public Average() 32 40 : base("avg", "Symbol that represents the average (arithmetic mean) function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Constant.cs
r4089 r4722 78 78 } 79 79 #endregion 80 81 [StorableConstructor] 82 private Constant(bool deserializing) : base(deserializing) { } 83 private Constant(Constant original, Cloner cloner) 84 : base(original, cloner) { 85 minValue = original.minValue; 86 maxValue = original.maxValue; 87 manipulatorNu = original.manipulatorNu; 88 manipulatorSigma = original.manipulatorSigma; 89 } 90 public override IDeepCloneable Clone(Cloner cloner) { 91 return new Constant(this, cloner); 92 } 80 93 public Constant() 81 94 : base("Constant", "Represents a constant value.") { … … 89 102 return new ConstantTreeNode(this); 90 103 } 91 92 public override IDeepCloneable Clone(Cloner cloner) {93 Constant clone = (Constant)base.Clone(cloner);94 clone.minValue = minValue;95 clone.maxValue = maxValue;96 clone.manipulatorNu = manipulatorNu;97 clone.manipulatorSigma = manipulatorSigma;98 return clone;99 }100 104 } 101 105 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/ConstantTreeNode.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 39 40 } 40 41 41 private ConstantTreeNode() : base() { } 42 43 // copy constructor 44 private ConstantTreeNode(ConstantTreeNode original) 45 : base(original) { 46 constantValue = original.constantValue; 42 [StorableConstructor] 43 private ConstantTreeNode(bool deserializing) : base(deserializing) { } 44 private ConstantTreeNode(ConstantTreeNode original, Cloner cloner) 45 : base(original, cloner) { 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new ConstantTreeNode(this, cloner); 47 49 } 48 50 … … 67 69 } 68 70 69 public override object Clone() {70 return new ConstantTreeNode(this);71 }72 73 71 public override string ToString() { 74 72 return ";" + constantValue.ToString("E4"); -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Cosine.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Cosine", "Symbol that represents the cosine function.")] 29 30 public sealed class Cosine : Symbol { 30 31 [StorableConstructor] 32 private Cosine(bool deserializing) : base(deserializing) { } 33 private Cosine(Cosine original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Cosine(this, cloner); 38 } 31 39 public Cosine() 32 40 : base("cos", "Symbol that represents the cosine function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Division.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Division", "Symbol that represents the / operator.")] 29 30 public sealed class Division : Symbol { 30 31 [StorableConstructor] 32 private Division(bool deserializing) : base(deserializing) { } 33 private Division(Division original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Division(this, cloner); 38 } 31 39 public Division() 32 40 : base("/", "Symbol that represents the / operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Exponential.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Exponential", "Symbol that represents the exponential function.")] 29 30 public sealed class Exponential : Symbol { 30 31 [StorableConstructor] 32 private Exponential(bool deserializing) : base(deserializing) { } 33 private Exponential(Exponential original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Exponential(this, cloner); 38 } 31 39 public Exponential() 32 40 : base("exp", "Symbol that represents the exponential function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/GreaterThan.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("GreaterThan", "Symbol that represents a greater than relation.")] 29 30 public sealed class GreaterThan : Symbol { 30 31 [StorableConstructor] 32 private GreaterThan(bool deserializing) : base(deserializing) { } 33 private GreaterThan(GreaterThan original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new GreaterThan(this, cloner); 38 } 31 39 public GreaterThan() 32 40 : base(">", "Symbol that represents a greater than relation.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/IfThenElse.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("IfThenElse", "Symbol that represents a conditional operator.")] 29 30 public sealed class IfThenElse : Symbol { 30 31 [StorableConstructor] 32 private IfThenElse(bool deserializing) : base(deserializing) { } 33 private IfThenElse(IfThenElse original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new IfThenElse(this, cloner); 38 } 31 39 public IfThenElse() 32 40 : base("if", "Symbol that represents a conditional operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/LessThan.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("LessThan", "Symbol that represents a less than relation.")] 29 30 public sealed class LessThan : Symbol { 30 31 [StorableConstructor] 32 private LessThan(bool deserializing) : base(deserializing) { } 33 private LessThan(LessThan original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new LessThan(this, cloner); 38 } 31 39 public LessThan() 32 40 : base("<", "Symbol that represents a less than relation.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Logarithm.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Logarithm", "Symbol that represents the logarithm function.")] 29 30 public sealed class Logarithm : Symbol { 30 31 [StorableConstructor] 32 private Logarithm(bool deserializing) : base(deserializing) { } 33 private Logarithm(Logarithm original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Logarithm(this, cloner); 38 } 31 39 public Logarithm() 32 40 : base("ln", "Symbol that represents the logarithm function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Multiplication.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Multiplication", "Symbol that represents the * operator.")] 29 30 public sealed class Multiplication : Symbol { 30 31 [StorableConstructor] 32 private Multiplication(bool deserializing) : base(deserializing) { } 33 private Multiplication(Multiplication original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Multiplication(this, cloner); 38 } 31 39 public Multiplication() 32 40 : base("*", "Symbol that represents the * operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Not.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Not", "Symbol that represents the boolean NOT operator.")] 29 30 public sealed class Not : Symbol { 30 31 [StorableConstructor] 32 private Not(bool deserializing) : base(deserializing) { } 33 private Not(Not original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Not(this, cloner); 38 } 31 39 public Not() 32 40 : base("!", "Symbol that represents the boolean NOT operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Or.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Or", "Symbol that represents the boolean OR operator.")] 29 30 public sealed class Or : Symbol { 30 31 [StorableConstructor] 32 private Or(bool deserializing) : base(deserializing) { } 33 private Or(Or original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Or(this, cloner); 38 } 31 39 public Or() 32 40 : base("||", "Symbol that represents the boolean OR operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Sine.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Sine", "Symbol that represents the sine function.")] 29 30 public sealed class Sine : Symbol { 30 31 [StorableConstructor] 32 private Sine(bool deserializing) : base(deserializing) { } 33 private Sine(Sine original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Sine(this, cloner); 38 } 31 39 public Sine() 32 40 : base("sin", "Symbol that represents the sine function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Subtraction.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Subtraction", "Symbol that represents the - operator.")] 29 30 public sealed class Subtraction : Symbol { 30 31 [StorableConstructor] 32 private Subtraction(bool deserializing) : base(deserializing) { } 33 private Subtraction(Subtraction original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Subtraction(this, cloner); 38 } 31 39 public Subtraction() 32 40 : base("-", "Symbol that represents the - operator.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Tangent.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; … … 28 29 [Item("Tangent", "Symbol that represents the tangent trigonometric function.")] 29 30 public sealed class Tangent : Symbol { 30 31 [StorableConstructor] 32 private Tangent(bool deserializing) : base(deserializing) { } 33 private Tangent(Tangent original, Cloner cloner) 34 : base(original, cloner) { 35 } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new Tangent(this, cloner); 38 } 31 39 public Tangent() 32 40 : base("tan", "Symbol that represents the tangent trigonometric function.") { -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Variable.cs
r4089 r4722 91 91 } 92 92 #endregion 93 94 [StorableConstructor] 95 private Variable(bool deserializing) : base(deserializing) { } 96 private Variable(Variable original, Cloner cloner) 97 : base(original, cloner) { 98 weightNu = original.weightNu; 99 weightSigma = original.weightSigma; 100 variableNames = new List<string>(original.variableNames); 101 weightManipulatorNu = original.weightManipulatorNu; 102 weightManipulatorSigma = original.weightManipulatorSigma; 103 } 104 public override IDeepCloneable Clone(Cloner cloner) { 105 return new Variable(this, cloner); 106 } 107 93 108 public Variable() 94 109 : base("Variable", "Represents a variable value.") { … … 103 118 return new VariableTreeNode(this); 104 119 } 105 106 public override IDeepCloneable Clone(Cloner cloner) {107 Variable clone = (Variable)base.Clone(cloner);108 clone.weightNu = weightNu;109 clone.weightSigma = weightSigma;110 clone.variableNames = new List<string>(variableNames);111 clone.weightManipulatorNu = weightManipulatorNu;112 clone.weightManipulatorSigma = weightManipulatorSigma;113 return clone;114 }115 120 } 116 121 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/VariableTreeNode.cs
r4089 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; … … 47 48 private VariableTreeNode() { } 48 49 49 // copy constructor 50 private VariableTreeNode(VariableTreeNode original) 51 : base(original) { 50 [StorableConstructor] 51 private VariableTreeNode(bool deserializing) : base(deserializing) { } 52 private VariableTreeNode(VariableTreeNode original, Cloner cloner) 53 : base(original, cloner) { 52 54 weight = original.weight; 53 55 variableName = original.variableName; 56 } 57 public override IDeepCloneable Clone(Cloner cloner) { 58 return new VariableTreeNode(this, cloner); 54 59 } 55 60 … … 57 62 58 63 public override bool HasLocalParameters { 59 get { 60 return true; 61 } 64 get { return true; } 62 65 } 63 66 … … 77 80 } 78 81 79 80 public override object Clone() {81 return new VariableTreeNode(this);82 }83 84 82 public override string ToString() { 85 83 return ";" + variableName + ";" + weight.ToString("E4");
Note: See TracChangeset
for help on using the changeset viewer.