Skip to content

Commit

Permalink
add ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
foolin committed May 15, 2020
1 parent e6ef993 commit 8281b20
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lcg.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ func (g *LCGRandom) Perm(n int) []int {
m := make([]int, n)
// In the following loop, the iteration when i=0 always swaps m[0] with m[0].
// A change to remove this useless iteration is to assign 1 to i in the init
// statement. But Perm also effects r. Making this change will affect
// the final state of r. So this change can't be made for compatibility
// reasons for Go 1.
// statement.
for i := 0; i < n; i++ {
j := g.Intn(i + 1)
m[i] = m[j]
Expand Down

0 comments on commit 8281b20

Please sign in to comment.