- Timestamp:
- 07/16/09 14:23:36 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs
r1618 r2166 44 44 GetVariableInfo(VALUE).Local = true; 45 45 46 ConstrainedDoubleData valueData = new ConstrainedDoubleData();46 DoubleData valueData = new DoubleData(); 47 47 // initialize a default range for the contant value 48 valueData.AddConstraint(new DoubleBoundedConstraint(-20.0, 20.0));49 48 HeuristicLab.Core.Variable value = new HeuristicLab.Core.Variable(VALUE, valueData); 50 49 AddVariable(value); -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/ModelAnalyzerExporter.cs
r1529 r2166 120 120 121 121 public static string ExportToHL2(this Constant constant, IFunctionTree tree) { 122 double value = (( ConstrainedDoubleData)tree.GetLocalVariable(Constant.VALUE).Value).Data;122 double value = ((DoubleData)tree.GetLocalVariable(Constant.VALUE).Value).Data; 123 123 return "[T]Constant(" + value.ToString("r") + ";0;0)"; 124 124 } … … 129 129 130 130 public static string ExportToHL2(this Differential differential, IFunctionTree tree) { 131 double weight = (( ConstrainedDoubleData)tree.GetLocalVariable(Differential.WEIGHT).Value).Data;131 double weight = ((DoubleData)tree.GetLocalVariable(Differential.WEIGHT).Value).Data; 132 132 double index = ((ConstrainedIntData)tree.GetLocalVariable(Differential.INDEX).Value).Data; 133 133 double offset = ((ConstrainedIntData)tree.GetLocalVariable(Differential.OFFSET).Value).Data; … … 177 177 178 178 public static string ExportToHL2(this Variable variable, IFunctionTree tree) { 179 double weight = (( ConstrainedDoubleData)tree.GetLocalVariable(Variable.WEIGHT).Value).Data;179 double weight = ((DoubleData)tree.GetLocalVariable(Variable.WEIGHT).Value).Data; 180 180 double index = ((ConstrainedIntData)tree.GetLocalVariable(Variable.INDEX).Value).Data; 181 181 double offset = ((ConstrainedIntData)tree.GetLocalVariable(Variable.OFFSET).Value).Data; -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Variable.cs
r2165 r2166 64 64 GetVariableInfo(MANIPULATION).Local = false; 65 65 66 ConstrainedDoubleData weight = new ConstrainedDoubleData(); 67 // initialize a totally arbitrary range for the weight = [-1.0, 1.0] 68 weight.AddConstraint(new DoubleBoundedConstraint(-1.0, 1.0)); 66 DoubleData weight = new DoubleData(); 69 67 AddVariable(new HeuristicLab.Core.Variable(WEIGHT, weight)); 70 68
Note: See TracChangeset
for help on using the changeset viewer.