Gred, thank you.
This is exactly want I looked for.

среда, 31 августа 2016 г., 4:26:02 UTC+3 пользователь Greg Plowman написал:
>
>
>> I could use an array, but one product can correspond to different number 
>> of bases.
>>
>> That's why I decided to use tuples.
>>
>> You could use an Array of (different length) Arrays, similar to Array of 
> Tuples.
>
>
> Another strategy might be to construct a vector of (Product, Base) pairs, 
> and then iterate over this vector:
>
> product_bases = Tuple{ProductType, BaseType}[]
>
> for k in Products, b in Bases
>     if accordance[k,b]
>         push!(product_bases, (k,b))
>     end
> end
>
> for (k,b) in product_bases
>     ...
> end
>
>
>

Reply via email to