Changeset 2818 for trunk/sources/HeuristicLab.Random
- Timestamp:
- 02/17/10 05:24:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Random/3.3/RandomCreator.cs
r2794 r2818 60 60 61 61 public override IExecutionSequence Apply() { 62 bool setSeedRandomly = SetSeedRandomlyParameter.ActualValue == null ? true : SetSeedRandomlyParameter.ActualValue.Value; 62 if (SetSeedRandomlyParameter.ActualValue == null) SetSeedRandomlyParameter.ActualValue = new BoolData(true); 63 bool setSeedRandomly = SetSeedRandomlyParameter.ActualValue.Value; 64 if (SeedParameter.ActualValue == null) SeedParameter.ActualValue = new IntData(0); 63 65 IntData seed = SeedParameter.ActualValue; 64 IRandom random = RandomParameter.ActualValue;65 66 66 if (seed == null) seed = new IntData(0);67 67 if (setSeedRandomly) seed.Value = new System.Random().Next(); 68 68 RandomParameter.ActualValue = new MersenneTwister((uint)seed.Value);
Note: See TracChangeset
for help on using the changeset viewer.