I have a composite type whose fields are all different suptypes of a supertype. Can this be expresses in a more elagnat way then shown below?
struct Operators{A<:AbstractArray{Float64,2}, L<:AbstractArray{Float64,2}, D<:AbstractArray{Float64,2}, AH<:AbstractArray{Float64,2}, LH<:AbstractArray{Float64,2}, DH<:AbstractArray{Float64,2},AE<:AbstractArray{Float64,2}, LE<:AbstractArray{Float64,2}, DE<:AbstractArray{Float64,2}}
π΄::A
π΄β::AE
π΄β::AH
π::L
πβ::LE
πβ::LH
π::D
πβ::DE
πβ::DH
end
end
I thout about someting like
struct Operators{A, L, D, AH, LH, DH, L, LE, DE} where {A, L, D, AH, LH, DH, L, LE, DE} <:AbstractArray{Float64,2}
π΄::A
π΄β::AE
π΄β::AH
π::L
πβ::LE
πβ::LH
π::D
πβ::DE
πβ::DH
end
Any suggestions about style and how to do better are welcome.