Changeset 9126 for branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols
- Timestamp:
- 01/08/13 15:36:13 (12 years ago)
- Location:
- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Property svn:ignore
-
old new 1 *.user 2 Plugin.cs 1 3 bin 2 *.user3 HeuristicLabProblemsDataAnalysisSymbolicPlugin.cs4 4 obj 5 *.vs10x6 Plugin.cs
-
- Property svn:ignore
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedSymbol.cs
r5809 r9126 1 using HeuristicLab.Common; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Core; 3 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; -
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariable.cs
r7259 r9126 27 27 [StorableClass] 28 28 [Item("LaggedVariable", "Represents a variable value with a time offset.")] 29 public sealedclass LaggedVariable : Variable {29 public class LaggedVariable : Variable { 30 30 [Storable] 31 31 private int minLag; … … 41 41 } 42 42 [StorableConstructor] 43 pr ivateLaggedVariable(bool deserializing) : base(deserializing) { }44 pr ivateLaggedVariable(LaggedVariable original, Cloner cloner)43 protected LaggedVariable(bool deserializing) : base(deserializing) { } 44 protected LaggedVariable(LaggedVariable original, Cloner cloner) 45 45 : base(original, cloner) { 46 46 minLag = original.minLag; 47 47 maxLag = original.maxLag; 48 48 } 49 public LaggedVariable() 50 : base("LaggedVariable", "Represents a variable value with a time offset.") { 51 minLag = -1; maxLag = -1; 49 public LaggedVariable() : this("LaggedVariable", "Represents a variable value with a time offset.") { } 50 protected LaggedVariable(string name, string description) 51 : base(name, description) { 52 MinLag = -1; 53 MaxLag = -1; 52 54 } 53 55 -
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LaggedVariableTreeNode.cs
r7259 r9126 37 37 } 38 38 39 public override bool HasLocalParameters { 40 get { return true; } 41 } 42 39 43 [StorableConstructor] 40 44 private LaggedVariableTreeNode(bool deserializing) : base(deserializing) { } … … 43 47 lag = original.lag; 44 48 } 45 private LaggedVariableTreeNode() { }46 49 47 50 public LaggedVariableTreeNode(LaggedVariable variableSymbol) : base(variableSymbol) { } 48 51 49 public override bool HasLocalParameters {50 get {51 return true;52 }53 }54 52 55 53 public override void ResetLocalParameters(IRandom random) { -
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Variable.cs
r7259 r9126 101 101 } 102 102 103 private List<string> allVariableNames; 104 [Storable] 105 public IEnumerable<string> AllVariableNames { 106 get { return allVariableNames; } 107 set { 108 if (value == null) throw new ArgumentNullException(); 109 allVariableNames.Clear(); 110 allVariableNames.AddRange(value); 111 } 112 } 113 114 public override bool Enabled { 115 get { 116 if (variableNames.Count == 0) return false; 117 return base.Enabled; 118 } 119 set { 120 if (variableNames.Count == 0) base.Enabled = false; 121 else base.Enabled = value; 122 } 123 } 124 103 125 private const int minimumArity = 0; 104 126 private const int maximumArity = 0; … … 112 134 #endregion 113 135 136 [StorableHook(HookType.AfterDeserialization)] 137 private void AfterDeserialization() { 138 if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) { 139 allVariableNames = variableNames; 140 } 141 } 142 114 143 [StorableConstructor] 115 144 protected Variable(bool deserializing) 116 145 : base(deserializing) { 117 146 variableNames = new List<string>(); 147 allVariableNames = new List<string>(); 118 148 } 119 149 protected Variable(Variable original, Cloner cloner) … … 122 152 weightSigma = original.weightSigma; 123 153 variableNames = new List<string>(original.variableNames); 154 allVariableNames = new List<string>(original.allVariableNames); 124 155 weightManipulatorMu = original.weightManipulatorMu; 125 156 weightManipulatorSigma = original.weightManipulatorSigma; … … 135 166 multiplicativeWeightManipulatorSigma = 0.03; 136 167 variableNames = new List<string>(); 137 } 138 139 protected override void OnChanged(EventArgs e) { 140 if (@Fixed) { 141 weightManipulatorMu = 1; 142 weightManipulatorSigma = 0; 143 weightMu = 1; 144 weightSigma = 0; 145 multiplicativeWeightManipulatorSigma = 0; 146 } 147 base.OnChanged(e); 168 allVariableNames = new List<string>(); 148 169 } 149 170 -
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs
r7671 r9126 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 86 86 set { 87 87 if (value == null) throw new ArgumentNullException(); 88 variableNames = new List<string>(value); 88 variableNames.Clear(); 89 variableNames.AddRange(value); 89 90 OnChanged(EventArgs.Empty); 91 } 92 } 93 94 private List<string> allVariableNames; 95 [Storable] 96 public IEnumerable<string> AllVariableNames { 97 get { return allVariableNames; } 98 set { 99 if (value == null) throw new ArgumentNullException(); 100 allVariableNames.Clear(); 101 allVariableNames.AddRange(value); 102 VariableNames = value; 90 103 } 91 104 } … … 151 164 152 165 #region persistence and cloning 166 [StorableHook(HookType.AfterDeserialization)] 167 private void AfterDeserialization() { 168 if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) { 169 allVariableNames = variableNames; 170 } 171 } 172 153 173 [StorableConstructor] 154 private VariableCondition(bool deserializing) : base(deserializing) { } 174 private VariableCondition(bool deserializing) 175 : base(deserializing) { 176 variableNames = new List<string>(); 177 allVariableNames = new List<string>(); 178 } 155 179 private VariableCondition(VariableCondition original, Cloner cloner) 156 180 : base(original, cloner) { … … 161 185 162 186 variableNames = new List<string>(original.variableNames); 187 allVariableNames = new List<string>(original.allVariableNames); 163 188 164 189 slopeInitializerMu = original.slopeInitializerMu; … … 181 206 182 207 variableNames = new List<string>(); 208 allVariableNames = new List<string>(); 183 209 184 210 slopeInitializerMu = 0.0; -
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableConditionTreeNode.cs
r7671 r9126 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.