@@ -470,7 +470,7 @@ in order to replicate the output of different versions:
470470* `rqa(NamedTuple, R...)` to obtain the output of the older version (as in 1.3).
471471* `rqa(Dict, R...)` to obtain the output of the planned future version.
472472* `rqa(RQA, R...)` to obtain the default current output (same as `rqa(R...)`)
473-
473+ * `rqa(DT,R...)` to obtain the output as `DT` which is a subtype of `AbstractDict` (e.g. `rqa(OrderedDict,R...)` returns an `OrderedDict`)
474474"""
475475rqa (R; kwargs... ) = rqa (RQA, R; kwargs... )
476476
@@ -479,15 +479,15 @@ function rqa(::Type{RQA}, R; kwargs...)
479479 RQA (rqa_dict)
480480end
481481
482- function rqa (:: Type{Dict } , R; onlydiagonal= false , kwargs... )
482+ function rqa (:: Type{DT } , R; onlydiagonal= false , kwargs... ) where {DT <: AbstractDict }
483483 # Parse arguments for diagonal and vertical structures
484484 kw_d = Dict (kwargs)
485485 haskey (kw_d, :theilerdiag ) && (kw_d[:theiler ] = kw_d[:theilerdiag ])
486486 haskey (kw_d, :lmindiag ) && (kw_d[:lmin ] = kw_d[:lmindiag ])
487487 dhist = diagonalhistogram (R; kw_d... )
488488 rr_d = recurrencerate (R; kw_d... )
489489 if onlydiagonal
490- return Dict {Symbol, Float64} (
490+ return DT {Symbol, Float64} (
491491 :RR => recurrencerate (R; kwargs... ),
492492 :DET => _determinism (dhist, rr_d* _rrdenominator (R; kw_d... )),
493493 :L => _dl_average (dhist),
@@ -501,7 +501,7 @@ function rqa(::Type{Dict}, R; onlydiagonal=false, kwargs...)
501501 haskey (kw_v, :lminvert ) && (kw_v[:lmin ] = kw_v[:lminvert ])
502502 vhist, rthist = verticalhistograms (R; kw_v... )
503503 rr_v = recurrencerate (R; kw_v... )
504- rqa_dict = Dict {Symbol, Float64} (
504+ rqa_dict = DT {Symbol, Float64} (
505505 :RR => rr_d,
506506 :DET => _determinism (dhist, rr_d* _rrdenominator (R; kw_v... )),
507507 :L => _dl_average (dhist),
0 commit comments