11export global_continuation, GlobalContinuationAlgorithm, continuation_series, stability_measures_along_continuation
2+ export PerParameterInitialConditions
23
34"""
45 GlobalContinuationAlgorithm
@@ -17,9 +18,22 @@ abstract type GlobalContinuationAlgorithm end
1718 global_continuation(gca::GlobalContinuationAlgorithm, pcurve, ics; kwargs...)
1819
1920Find and continue attractors (or representations of attractors)
20- and the fractions of their basins of attraction across a parameter range `pcurve`
21+ and the fractions of their basins of attraction across a parameter curve `pcurve`
2122by sampling given initial conditions `ics` according to algorithm `gca`.
2223
24+ Possible subtypes of a `GlobalContinuationAlgorithm` are:
25+
26+ - [`AttractorSeedContinueMatch`](@ref)
27+ - [`FeaturizeGroupAcrossParameter`](@ref)
28+
29+ `ics` are the initial conditions to use when sampling the state space.
30+ They can be specified in one of three ways:
31+
32+ 1. A set vector of initial conditions (vector of vectors).
33+ 2. A 0-argument function that generates random initial conditions.
34+ 3. The special type [`PerParameterInitialConditions`](@ref) that allows
35+ different initial conditions for different parameter values.
36+
2337Return:
2438
25391. `fractions_cont::Vector{Dict{Int, Float64}}`. The fractions of basins of attraction.
@@ -57,27 +71,31 @@ across the parameter range `prange`, for the parameter of the system with index
5771traditional continuation (see online Tutorial for a comparison), global continuation
5872can be performed over arbitrary user-defined curves in parameter space.
5973The second call signature with `pcurve` allows for this possibility. In this case
60- `pcurve` is a vector of iterables, where each itereable maps parameter indices
74+ `pcurve` is a vector of iterables, where each iterable maps parameter indices
6175to parameter values. These iterables can be dictionaries, named tuples, `Vector{Pair}`,
62- etc., and the sequence of the iterables defines a curve in parameter space.
76+ anything that can be given in `set_parameters!`.
77+ The sequence of the iterables defines a curve in parameter space.
6378In fact, the version with `prange, pidx` simply defines
6479`pcurve = [[pidx => p] for p in prange]` and calls the second method.
65-
66- `ics` are the initial conditions to use when globally sampling the state space.
67- Like in [`basins_fractions`](@ref) it can be either a set vector of initial conditions,
68- or a 0-argument function that generates random initial conditions.
69-
70- Possible subtypes of `GlobalContinuationAlgorithm` are:
71-
72- - [`AttractorSeedContinueMatch`](@ref)
73- - [`FeaturizeGroupAcrossParameter`](@ref)
7480"""
7581function global_continuation (alg:: GlobalContinuationAlgorithm , prange:: AbstractVector , pidx, sampler; kw... )
7682 # everything is propagated to the curve setting
7783 pcurve = [[pidx => p] for p in prange]
7884 return global_continuation (alg, pcurve, sampler; kw... )
7985end
8086
87+ """
88+ PerParameterInitialConditions(generator)
89+
90+ Wrapper around a function `generator`, to be called as
91+ `generator(parameter_pairs, N::Int)`.
92+ It inputs the current parameter(s) of a [`global_continuation`](@ref)
93+ (elements of `pcurve`), and generates a vector of `N` initial conditions.
94+ """
95+ struct PerParameterInitialConditions{F}
96+ generator:: F
97+ end
98+
8199
82100"""
83101 continuation_series(continuation_info, fillval = NaN)
0 commit comments