Swich to the system min and max functions and remove the version from obiutils

Former-commit-id: 8c4558921b0d0c266b070f16e83813de6e6d4a0f
This commit is contained in:
Eric Coissac
2024-05-30 08:27:24 +02:00
parent 98b3bc2a8c
commit dd9307a4cd
12 changed files with 58 additions and 145 deletions

View File

@ -6,7 +6,6 @@ import (
"sort"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
)
type Suffix struct {
@ -27,7 +26,7 @@ func SuffixLess(suffixarray SuffixArray) func(i, j int) bool {
sj := suffixarray.Suffixes[j]
bj := (*suffixarray.Sequences)[int(sj.Idx)].Sequence()[sj.Pos:]
l := obiutils.Min(len(bi), len(bj))
l := min(len(bi), len(bj))
p := 0
for p < l && bi[p] == bj[p] {
p++
@ -92,7 +91,7 @@ func (suffixarray *SuffixArray) CommonSuffix() []int {
si := suffixarray.Suffixes[i]
bi := (*suffixarray.Sequences)[int(si.Idx)].Sequence()[si.Pos:]
l := obiutils.Min(len(bi), len(bp))
l := min(len(bi), len(bp))
p := 0
for p < l && bi[p] == bp[p] {
p++