Is there any function that receives a parametric type as input and returns the parameters? For example, does the function below exist?
julia> get_parameters(Array{Float64, 2})
(Float64, 2)
In case get_parameters
doesn’t exist, what are the alternatives?
I am asking this question because I am writing numerical algorithms with the fixed points of the FixedPointNumbers.jl package. When my function g()
receives a Fixed{T,f}
number, it needs to know the parameters T
and f
because they will determine the accuracy of my algorithm.
8 posts - 4 participants