File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121function MatrixAlgebraKit. findtruncated (
2222 values:: CuSectorVector , strategy:: MatrixAlgebraKit.TruncationByError
2323 )
24+ (isfinite (strategy. p) && strategy. p > 0 ) ||
25+ throw (ArgumentError (lazy " p-norm with p = $(strategy.p) is currently not supported." ))
2426 ϵᵖmax = max (strategy. atol^ strategy. p, strategy. rtol^ strategy. p * norm (values, strategy. p))
2527 ϵᵖ = similar (values, typeof (ϵᵖmax))
2628
Original file line number Diff line number Diff line change 221221# where k is determined by the cumulative truncation error of these values.
222222# The strategy is therefore to sort all values, and then use a logical array to indicate
223223# which ones to keep.
224- function MAK. findtruncated (values:: SectorVector , strategy:: MAK.TruncationByError )
224+ function MAK. findtruncated (values:: SectorVector , strategy:: TruncationByError )
225+ (isfinite (strategy. p) && strategy. p > 0 ) ||
226+ throw (ArgumentError (lazy " p-norm with p = $(strategy.p) is currently not supported." ))
225227 ϵᵖmax = max (strategy. atol^ strategy. p, strategy. rtol^ strategy. p * norm (values, strategy. p))
226228 ϵᵖ = similar (values, typeof (ϵᵖmax))
227229
You can’t perform that action at this time.
0 commit comments