When INTY
is a scalar Float64
, here’s a no issues run…
julia> IMG_BOU
2-element Vector{Float64}:
0.019607843137254943
1.0
julia> INTY
0.5529411764705883
julia> N_INTEN
4
and here is the call
julia> INSIDE_WHICH_INTVAL(INTY, IMG_BOU, 4)
IVL_NUM = 3
3
When I run with INTY_ARRAY
a vector say, defined as
julia> INTY
11-element Vector{Float64}:
0.45882352941176474
0.5529411764705883
0.6313725490196078
0.7019607843137254
0.7568627450980392
0.8196078431372549
0.8509803921568627
0.9254901960784314
1.0
1.0
1.0
julia> IVL_VEC = INSIDE_WHICH_INTVAL.(INTY, Ref(IMG_BOU), Ref(N_INTEN))
IVL_NUM = 2
IVL_NUM = 3
IVL_NUM = 3
IVL_NUM = 3
IVL_NUM = 4
IVL_NUM = 4
IVL_NUM = 4
IVL_NUM = 4
It hangs after! To test with any other data, just note 0.0 < INTY < 1.0
, INT_BOU
is a 2- element vector with elements in (0.0,1.0)
, N_INTEN
is an I64
scalar >0
that specifies the number of intervals within one of which INTY
lies.
Regarding suggestion on style, appearance, kindly bear with me. I’ve been coding in this caps- dominant style for decades, across many languages from Ada 2012 thru MATLAB and now Julia 1.10.4. Indeed I find it lot easier to comprehend and extend a longer set made up of multiple short lines of code than a shorter set with longer lines that’ve lots of nesting and associations. Surely will think over style once I’ve got seasoned enough with Julia.