@jlchan wrote:
Is there a way to specify a type parameter in a way that depends on another type parameter?
For example, a StaticMatrix takes in types
{M,N,T,L}
, whereM,N
are dimensions andL
is the length of the array. Is there a way to setL=M*N
? For example, if I try to definestruct foo{N <: Integer} A::SMatrix{N,N,Float64,N*N} end
I get the error
ERROR: MethodError: no method matching *(::TypeVar, ::TypeVar)
Posts: 6
Participants: 4