Changeset 14243 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols
- Timestamp:
- 08/08/16 13:00:06 (8 years ago)
- Location:
- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariable.cs
r14242 r14243 29 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 30 30 [StorableClass] 31 [Item(" FactorVariable", "Represents a categorical variable (comparable to factors as in R).")]32 public class FactorVariable : VariableBase {31 [Item("BinaryFactorVariable", "Represents a categorical variable (comparable to factors as in R) and it's value.")] 32 public class BinaryFactorVariable : VariableBase { 33 33 34 34 private Dictionary<string, List<string>> variableValues; … … 47 47 48 48 [StorableConstructor] 49 protected FactorVariable(bool deserializing)49 protected BinaryFactorVariable(bool deserializing) 50 50 : base(deserializing) { 51 51 variableValues = new Dictionary<string, List<string>>(); 52 52 } 53 protected FactorVariable(FactorVariable original, Cloner cloner)53 protected BinaryFactorVariable(BinaryFactorVariable original, Cloner cloner) 54 54 : base(original, cloner) { 55 55 variableValues = 56 56 original.variableValues.ToDictionary(kvp => kvp.Key, kvp => new List<string>(kvp.Value)); 57 57 } 58 public FactorVariable() : this("FactorVariable", "Represents a categorical variable (comparable to factors as in R).") { }59 public FactorVariable(string name, string description)58 public BinaryFactorVariable() : this("BinaryFactorVariable", "Represents a categorical variable (comparable to factors as in R) and it's value.") { } 59 public BinaryFactorVariable(string name, string description) 60 60 : base(name, description) { 61 61 variableValues = new Dictionary<string, List<string>>(); … … 67 67 68 68 public override IDeepCloneable Clone(Cloner cloner) { 69 return new FactorVariable(this, cloner);69 return new BinaryFactorVariable(this, cloner); 70 70 } 71 71 -
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs
r14242 r14243 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 25 using HeuristicLab.Random; 27 26 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 28 27 [StorableClass] 29 public class FactorVariableTreeNode : VariableTreeNodeBase {30 public new FactorVariable Symbol {31 get { return ( FactorVariable)base.Symbol; }28 public class BinaryFactorVariableTreeNode : VariableTreeNodeBase { 29 public new BinaryFactorVariable Symbol { 30 get { return (BinaryFactorVariable)base.Symbol; } 32 31 } 33 32 … … 40 39 41 40 [StorableConstructor] 42 protected FactorVariableTreeNode(bool deserializing) : base(deserializing) { }43 protected FactorVariableTreeNode(FactorVariableTreeNode original, Cloner cloner)41 protected BinaryFactorVariableTreeNode(bool deserializing) : base(deserializing) { } 42 protected BinaryFactorVariableTreeNode(BinaryFactorVariableTreeNode original, Cloner cloner) 44 43 : base(original, cloner) { 45 44 variableValue = original.variableValue; 46 45 } 47 protected FactorVariableTreeNode() { }48 public FactorVariableTreeNode(FactorVariable variableSymbol) : base(variableSymbol) { }46 protected BinaryFactorVariableTreeNode() { } 47 public BinaryFactorVariableTreeNode(BinaryFactorVariable variableSymbol) : base(variableSymbol) { } 49 48 50 49 public override bool HasLocalParameters { … … 73 72 74 73 public override IDeepCloneable Clone(Cloner cloner) { 75 return new FactorVariableTreeNode(this, cloner);74 return new BinaryFactorVariableTreeNode(this, cloner); 76 75 } 77 76
Note: See TracChangeset
for help on using the changeset viewer.