Skip to content

Commit dbc6067

Browse files
committed
The NestedAlgorithm abstract type now takes the type of the child algorithm as its only type parameter
1 parent 3f488fa commit dbc6067

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/AlgorithmsInterfaceExtensions/AlgorithmsInterfaceExtensions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ end
149149

150150
# ============================ NestedAlgorithm =============================================
151151

152-
abstract type NestedAlgorithm <: Algorithm end
152+
abstract type NestedAlgorithm{Child} <: Algorithm end
153153

154154
function nested_algorithm(f::Function, iterable; kwargs...)
155155
return DefaultNestedAlgorithm(f, iterable; kwargs...)
@@ -202,7 +202,7 @@ from a list of stored algorithms.
202202
ChildAlgorithm <: Algorithm,
203203
Algorithms <: AbstractVector{ChildAlgorithm},
204204
StoppingCriterion <: AI.StoppingCriterion,
205-
} <: NestedAlgorithm
205+
} <: NestedAlgorithm{ChildAlgorithm}
206206
algorithms::Algorithms
207207
stopping_criterion::StoppingCriterion = AI.StopAfterIteration(length(algorithms))
208208
end

0 commit comments

Comments
 (0)