I have a struct such as below. I want to know how to declare the type of the field somedict.
The keys of somedict will be tuples. Each key will be a tuple of two tuples, first one of length size1 and second one of length size2. When I create the struct instance, I want to pass the values of size1 and size2. Is this possible to do? If yes, can you please give an example. If not, I would appreciate knowing that too, so that I don’t spend too much time looking for it.
Thank you.
mutable struct Example
size1::Int64
size2::Int64
somedict:: ## Dict{(Tuple of size1, Tuple of size2), Float64}
end
Awesome! This seems like it will work. When I create the instance, it figures out the size of the tuple and the type of contents. I thought this would not be the case since we don’t specify the size and type of the content when declaring struct. Thank you!!