hm… Vector{<:Real} not work because the each eltype could be different…
parametric type is fine, except when the number of (dynamically determined) types are unknown.
what I mean is, if the number is known, we can define like: (in this example, the number is 2)
struct Test2{S<:Real, T<:Real}
v1::S
v2::T
function Test2(a::SS, b::TT) where {SS<:Real, TT<:Real}
new{SS, TT}(a, b)
end
end
however, things get complicated when the “number” is not known, in such case rather than passing a and b, we would like to pass a Vector{Real} into the constructor, and the number of “parametric type” would equal the length of the vector… how to do that???