- Timestamp:
- 01/04/19 11:41:42 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Random/3.3/RandomEnumerable.cs
r15583 r16496 202 202 var cur = list.First; 203 203 double ball = cur.Value.Item2, sum = random.NextDouble() * total; // assert: sum < total. When there is only one item remaining: sum < ball 204 while (ball < sum ) {204 while (ball < sum && cur.Next != null) { 205 205 cur = cur.Next; 206 206 ball += cur.Value.Item2;
Note: See TracChangeset
for help on using the changeset viewer.