Changeset 4722 for trunk/sources/HeuristicLab.Random/3.3/FastRandom.cs
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Random/3.3/FastRandom.cs
r4258 r4722 54 54 55 55 #region Constructors 56 /// <summary> 57 /// Used by HeuristicLab.Persistence to initialize new instances during deserialization. 58 /// </summary> 59 /// <param name="deserializing">true, if the constructor is called during deserialization.</param> 60 [StorableConstructor] 61 private FastRandom(bool deserializing) : base(deserializing) { } 62 63 /// <summary> 64 /// Initializes a new instance from an existing one (copy constructor). 65 /// </summary> 66 /// <param name="original">The original <see cref="FastRandom"/> instance which is used to initialize the new instance.</param> 67 /// <param name="cloner">A <see cref="Cloner"/> which is used to track all already cloned objects in order to avoid cycles.</param> 68 private FastRandom(FastRandom original, Cloner cloner) 69 : base(original, cloner) { 70 x = original.x; 71 y = original.y; 72 z = original.z; 73 w = original.w; 74 bitBuffer = original.bitBuffer; 75 bitMask = original.bitMask; 76 } 56 77 57 78 /// <summary> … … 71 92 Reinitialise(seed); 72 93 } 73 74 /// <summary>75 /// Used by HeuristicLab.Persistence to initialize new instances during deserialization.76 /// </summary>77 /// <param name="deserializing">true, if the constructor is called during deserialization.</param>78 [StorableConstructor]79 private FastRandom(bool deserializing) : base(deserializing) { }80 81 94 #endregion 82 95 … … 351 364 352 365 public override IDeepCloneable Clone(Cloner cloner) { 353 FastRandom clone = (FastRandom)base.Clone(cloner); 354 clone.x = x; 355 clone.y = y; 356 clone.z = z; 357 clone.w = w; 358 clone.bitBuffer = bitBuffer; 359 clone.bitMask = bitMask; 360 return clone; 366 return new FastRandom(this, cloner); 361 367 } 362 368 }
Note: See TracChangeset
for help on using the changeset viewer.