mirror of
https://github.com/gonum/gonum.git
synced 2025-10-06 07:37:03 +08:00
graph: replace custom reverse logic with slices.Reverse
This commit is contained in:

committed by
Dan Kortschak

parent
1f5b2b5b54
commit
b94e4828e9
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"reflect"
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/exp/rand"
|
||||
@@ -181,7 +182,7 @@ func (p allShortest) allBetween(from, to int, seen []bool, path []graph.Node, pa
|
||||
return paths
|
||||
}
|
||||
if !p.forward {
|
||||
ordered.Reverse(path)
|
||||
slices.Reverse(path)
|
||||
}
|
||||
return append(paths, path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user