Changeset 9840 for trunk/sources
- Timestamp:
- 08/02/13 13:13:34 (11 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/Cloner.cs
r9456 r9840 67 67 } 68 68 69 /// <summary> 70 /// Returns the clone of an deeply cloned item, if it was already cloned. 71 /// </summary> 72 /// <param name="original">The original object.</param> 73 /// <returns>The clone of the given object, if it was already cloned; null otherwise</returns> 74 public IDeepCloneable GetClone(IDeepCloneable original) { 75 IDeepCloneable clone = null; 76 mapping.TryGetValue(original, out clone); 77 return clone; 78 } 79 69 80 } 70 81 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
r9456 r9840 49 49 var replacementValue = CalculateReplacementValue(regressionModel, node, regressionProblemData, rows); 50 50 var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue }; 51 51 52 var cloner = new Cloner(); 52 cloner.RegisterClonedObject(node, constantNode);53 53 var tempModel = cloner.Clone(regressionModel); 54 var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node); 55 56 var tempModelParentNode = tempModelNode.Parent; 57 int i = tempModelParentNode.IndexOfSubtree(tempModelNode); 58 tempModelParentNode.RemoveSubtree(i); 59 tempModelParentNode.InsertSubtree(i, constantNode); 54 60 55 61 var estimatedValues = tempModel.GetEstimatedValues(dataset, rows);
Note: See TracChangeset
for help on using the changeset viewer.