Skip to content

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

@fjfrancopelaez

Description

@fjfrancopelaez

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.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions