Skip to content

Commit ef7f1bf

Browse files
authored
change Dataset name (#336)
* change Dataset name * fix wrong usage of size
1 parent 0ecb479 commit ef7f1bf

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ChaosTools"
22
uuid = "608a59af-f2a3-5ad4-90b4-758bdf3122a7"
33
repo = "https://github.com/JuliaDynamics/ChaosTools.jl.git"
4-
version = "3.2.0"
4+
version = "3.2.1"
55

66
[deps]
77
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"

src/chaosdetection/lyapunovs/local_growth_rates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export local_growth_rates
22

33
"""
4-
local_growth_rates(ds::DynamicalSystem, points::Dataset; kwargs...) → λlocal
4+
local_growth_rates(ds::DynamicalSystem, points::StateSpaceSet; kwargs...) → λlocal
55
66
Compute the local exponential growth rate(s) of perturbations of the dynamical system
77
`ds` for initial conditions given in `points`. For each initial condition `u ∈ points`,

src/chaosdetection/lyapunovs/lyapunov_from_data.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export lyapunov_from_data
88
export Euclidean, FirstElement
99

1010
"""
11-
lyapunov_from_data(R::Dataset, ks; kwargs...)
11+
lyapunov_from_data(R::StateSpaceSet, ks; kwargs...)
1212
1313
For the given dataset `R`, which is expected to represent a trajectory of a dynamical
1414
system, calculate and return `E(k)`, which is the average logarithmic
@@ -64,7 +64,7 @@ the absolute distance of *only the first elements* of the points of `R`
6464
6565
[^Kantz1994]: Kantz, H., Phys. Lett. A **185**, pp 77–87 (1994)
6666
"""
67-
function lyapunov_from_data(R::AbstractDataset{D, T}, ks;
67+
function lyapunov_from_data(R::AbstractStateSpaceSet{D, T}, ks;
6868
refstates = 1:(length(R) - ks[end]), w = 1,
6969
distance = FirstElement(), ntype = NeighborNumber(1),
7070
) where {D, T}

src/dimreduction/dyca.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ is projected onto.
4343
10.1109/mlsp.2018.8517024, 2018 IEEE 28th International Workshop on Machine Learning
4444
for Signal Processing (MLSP)
4545
"""
46-
dyca(A::AbstractDataset, e) = dyca(Matrix(A), e)
46+
dyca(A::AbstractStateSpaceSet, e) = dyca(Matrix(A), e)
4747

4848
function dyca(data, eig_threshold::AbstractFloat; norm_eigenvectors::Bool=false)
4949
derivative_data = matrix_gradient(data) #get the derivative of the data

src/periodicity/periodicorbits.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ a random permutation will be chosen for them, with `λ=0.001`.
3030
the next one is `≤ disttol` then it has converged to a fixed point.
3131
* `inftol = 10.0`: If a state reaches `norm(state) ≥ inftol` it is assumed that
3232
it has escaped to infinity (and is thus abandoned).
33-
* `abstol = 1e-8`: A detected fixed point isn't stored if it is in `abstol`
34-
neighborhood of some previously detected point. Distance is measured by
33+
* `abstol = 1e-8`: A detected fixed point isn't stored if it is in `abstol`
34+
neighborhood of some previously detected point. Distance is measured by
3535
euclidian norm. If you are getting duplicate fixed points, decrease this value.
3636
3737
## Description
@@ -78,7 +78,7 @@ function periodicorbits(
7878
Λ = lambdamatrix(λ, inds, sings)
7979
_periodicorbits!(FP, ds, o, ics, Λ, maxiters, disttol, inftol, abstol)
8080
end
81-
return Dataset(collect(FP))
81+
return StateSpaceSet(collect(FP))
8282
end
8383

8484
function periodicorbits(
@@ -99,7 +99,7 @@ function periodicorbits(
9999
FP = Set{type}()
100100
Λ = lambdamatrix(0.001, dimension(ds))
101101
_periodicorbits!(FP, ds, o, ics, Λ, maxiters, disttol, inftol, abstol)
102-
return Dataset(collect(FP))
102+
return StateSpaceSet(collect(FP))
103103
end
104104

105105
function _periodicorbits!(FP, ds, o, ics, Λ, maxiter, disttol, inftol, abstol)

test/rareevents/return_time_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function visual_guidance(ro, times, u0, diffeq, εs, crossing_method)
220220
step!(integ)
221221
push!(tr4, current_state(integ))
222222
end
223-
tr4 = Dataset(tr4)
223+
tr4 = StateSpaceSet(tr4)
224224
else
225225
tr4 = trajectory(ro, times[4], u0; diffeq)
226226
end

test/stability/fixedpoints.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ using ChaosTools, Test
1414

1515
@testset "J=$(J)" for J in (nothing, henon_jacob)
1616
fp, eigs, stable = fixedpoints(ds, box, J)
17-
@test size(fp) == (2,2)
17+
@test length(fp) == 2
18+
@test dimension(fp) == 2
1819
@test stable == [false, false]
1920
@test (henon_fp fp[1]) || (henon_fp fp[2])
2021
end

0 commit comments

Comments
 (0)