Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethinking the way the parameters are given to exported functions. #10

Open
fjfrancopelaez opened this issue May 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@fjfrancopelaez
Copy link
Owner

Functions such as (e.g.) DetectAnomalies_SelfConsis need that input data are provided by means of a long list, so several modes are defined:

DetectAnomalies_SelfConsis(DATA::Matrix{UInt32}, WordWidth::Int64, LN0::Int64, Operation::String, UsePseudoADD::Bool, KeepCycle::Bool, ϵ::AbstractFloat, LargestMCUSize::Int64)

but also:

DetectAnomalies_SelfConsis(DATA::Matrix{UInt32}, WordWidth::Int64, LN0::Int64, Operation::String, UsePseudoADD::Bool, KeepCycle::Bool)

So, if you want to change LargestMCUSize, you have to define ϵ to reach the position of this variable in the list. This is nonsense, since Julia allows the use of semicolon to divide input parameters into main and additional (see https://docs.julialang.org/en/v1/manual/functions/#Keyword-Arguments). Previous function should have been defined as

DetectAnomalies_SelfConsis(DATA::Matrix{UInt32}, WordWidth::Int64, LN0::Int64, Operation::String, UsePseudoADD::Bool, KeepCycle::Bool; ϵ::AbstractFloat, LargestMCUSize::Int64)`

A new method with this feature should be added at least to the exported functions.

@fjfrancopelaez fjfrancopelaez self-assigned this May 1, 2024
@fjfrancopelaez fjfrancopelaez added the enhancement New feature or request label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant