Skip to content

Commit

Permalink
replace if-elseif by 2 if in accumulate_pvals!
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJereczek committed Oct 16, 2023
1 parent 15156be commit 3f6039b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/significance/surrogates_significance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,15 @@ end
function accumulate_pvals!(pval_right, pval_left, tail, c, change_dummy)
if tail == :both || tail == :right
pval_right .+= c .< change_dummy
elseif tail == :both || tail == :left
end
if tail == :both || tail == :left
pval_left .+= c .> change_dummy
end
end

function choose_pval!(pval, pval_right, pval_left, tail)
if tail == :both
println(pval_right, pval_left)
pval .= 2min.(pval_right, pval_left)
elseif tail == :right
pval .= pval_right
Expand Down

0 comments on commit 3f6039b

Please sign in to comment.