Skip to content

Commit 3460c22

Browse files
kellertuerlkdvos
andauthored
Update src/stopping_criterion.jl
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
1 parent badca09 commit 3460c22

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/stopping_criterion.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ when _all_ indicate to stop.
9999
"""
100100
struct StopWhenAll{TCriteria<:Tuple} <: StoppingCriterion
101101
criteria::TCriteria
102-
StopWhenAll(c::Vector{StoppingCriterion}) = new{typeof(tuple(c...))}(tuple(c...))
103-
StopWhenAll(c...) = new{typeof(c)}(c)
104102
end
105-
103+
StopWhenAll(c::AbstractVector{<:StoppingCriterion}) = StopWhenAll(Tuple(c))
104+
StopWhenAll(c...) = StopWhenAll(c)
106105
function indicates_convergence(sc::StopWhenAll)
107106
return any(indicates_convergence, sc.criteria)
108107
end

0 commit comments

Comments
 (0)