mirror of
https://github.com/gonum/gonum.git
synced 2025-10-25 16:20:25 +08:00
graph: replace custom reverse logic with slices.Reverse
This commit is contained in:
committed by
Dan Kortschak
parent
1f5b2b5b54
commit
b94e4828e9
@@ -7,6 +7,7 @@ package community
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"slices"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
@@ -631,7 +632,7 @@ func testModularizeDirected(t *testing.T, test communityDirectedQTest, g graph.D
|
||||
}
|
||||
|
||||
// Recovery of Q values is reversed.
|
||||
if reverse(qs); !sort.Float64sAreSorted(qs) {
|
||||
if slices.Reverse(qs); !sort.Float64sAreSorted(qs) {
|
||||
t.Errorf("Q values not monotonically increasing: %.5v", qs)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user