@@ -206,10 +206,7 @@ function findtruncated_sorted(values::AbstractVector, strategy::TruncationKeepBe
206206end
207207function findtruncated_unsorted(values:: AbstractVector , strategy:: TruncationKeepBelow )
208208 atol = max(strategy. atol, strategy. rtol * maximum(values))
209- sorted = sortperm(values; by= abs, rev= true )
210- i = @something findfirst(≤ (atol), values[sorted]) length(values) + 1
211- ind = sorted[i: length(values)]
212- return ind # TODO : consider sort!(ind)
209+ return findall(≤ (atol), values)
213210end
214211
215212function findtruncated(values:: AbstractVector , strategy:: TruncationKeepAbove )
@@ -226,10 +223,7 @@ function findtruncated_sorted(values::AbstractVector, strategy::TruncationKeepAb
226223end
227224function findtruncated_unsorted(values:: AbstractVector , strategy:: TruncationKeepAbove )
228225 atol = max(strategy. atol, strategy. rtol * maximum(values))
229- sorted = sortperm(values; by= abs, rev= true )
230- i = @something findlast(≥ (atol), values[sorted]) 0
231- ind = sorted[1 : i]
232- return ind # TODO : consider sort!(ind)
226+ return findall(≥ (atol), values)
233227end
234228
235229function findtruncated(values:: AbstractVector , strategy:: TruncationIntersection )
0 commit comments