Closed annamariadziubyna closed 1 month ago
Is this what you need? https://github.com/euro-hpc-pl/SpinGlassEngine.jl/tree/lp/kwarg-constructors
Yes, this is exactly what we need.
Any others or only these two types?
Yes, in addition to MpsParameters
and SearchParameters
, we also want to refactor two other components: MpsContractor
and merge_branches
.
For the MpsContractor{T,R,S}( net, βs::Vector{S}, graduate_truncation::Symbol, params; onGPU = true, depth::Int = 0, )
, we suggest keeping net
and params
as positional arguments, but passing the rest through keyword arguments.
For the function merge_branches( ctr::MpsContractor{T}, merge_type::Symbol = :nofit, update_droplets = NoDroplets(), )
, we propose that ctr
remains as a positional argument, while the rest should be passed through keyword arguments.
The current constructors for classes such as MpsParameters and SearchParameters etc. utilize positional arguments. Can we use kwargs instead? This will improve readability and usability.