Skip to content

Commit

Permalink
correct usage of size
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Sep 22, 2024
1 parent 48f41d2 commit 20bab87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/corrsum_based/correlationsum_boxassisted.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exact to the original [`correlationsum`](@ref). For any other `P`, some
point pairs that should have been included may be skipped due to having smaller
distance in the remaining dimensions, but larger distance in the first `P` dimensions.
"""
function boxed_correlationsum(X; P = 2, kwargs...)
function boxed_correlationsum(X::AbstractStateSpaceSet; P = 2, kwargs...)
P = min(P, dimension(X))
r0, ε0 = estimate_r0_buenoorovio(X, P)
εs = 2.0 .^ range(log2(ε0), log2(r0); length = 16)
Expand All @@ -75,7 +75,7 @@ boxed_correlationsum(X, e::Real, r0 = e; kwargs...) = boxed_correlationsum(X, [e
function boxed_correlationsum(
X, εs, r0 = maximum(εs); q = 2, P = 2, kwargs...
)
P size(X, 2) || error("Prism dimension has to be ≤ than `X` dimension.")
P dimension(X) || error("Prism dimension has to be ≤ than `X` dimension.")
issorted(εs) || error("Sorted `εs` required for optimized version.")
if r0 < maximum(εs)
@warn("Box size `r0` has to be ≥ than `maximum(εs)`.")
Expand Down

0 comments on commit 20bab87

Please sign in to comment.