Search code examples
julia-jump

Set indexed over another set in Julia


If I have sets:

set F := G1 G2; and set PR[G1] := p1 p2; set PR[G2] := p3 p4;

how to make the set PR in Julia. For each element of F a specific set of elements belong to PR. Thank you! Nikola


Solution

  • Use something like

    F = [:G1, :G1]
    PR = Dict(:G1 => [:p1, :p2], :G2 => [:p3, :p4])
    

    To help more, you will need to provide more information.