graph: replace custom reverse logic with slices.Reverse

This commit is contained in:
Jonathan Bluett-Duncan
2024-02-03 16:20:43 +00:00
committed by Dan Kortschak
parent 1f5b2b5b54
commit b94e4828e9
12 changed files with 33 additions and 38 deletions

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"math"
"reflect"
"slices"
"sort"
"testing"
@@ -608,7 +609,7 @@ func TestLouvainDirectedMultiplex(t *testing.T) {
}
// 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)
}
}