Changeset 3286 for trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
- Timestamp:
- 04/08/10 02:21:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
r3283 r3286 126 126 runs = new RunCollection(); 127 127 } 128 internal Algorithm(Algorithm algorithm, Cloner cloner)129 : base(algorithm.Name, algorithm.Description, (ParameterCollection)cloner.Clone(algorithm.Parameters)) {130 executionState = algorithm.executionState;131 executionTime = algorithm.executionTime;132 problem = (IProblem)cloner.Clone(algorithm.problem);133 runsCounter = algorithm.runsCounter;134 runs = (RunCollection)cloner.Clone(algorithm.runs);135 Initialize();136 }137 128 [StorableConstructor] 138 129 protected Algorithm(bool deserializing) : base(deserializing) { } … … 154 145 return clone; 155 146 } 147 protected virtual void Clone(IDeepCloneable clone, Cloner cloner) { 148 Algorithm algorithm = clone as Algorithm; 149 if (algorithm != null) { 150 algorithm.name = name; 151 algorithm.description = description; 152 foreach (IParameter param in Parameters) 153 algorithm.Parameters.Add((IParameter)cloner.Clone(param)); 154 algorithm.executionState = executionState; 155 algorithm.executionTime = executionTime; 156 algorithm.problem = (IProblem)cloner.Clone(problem); 157 algorithm.runsCounter = runsCounter; 158 algorithm.runs = (RunCollection)cloner.Clone(runs); 159 algorithm.Initialize(); 160 } 161 } 156 162 157 163 public virtual void Prepare() {
Note: See TracChangeset
for help on using the changeset viewer.