I have some problem where I need to define a one-to-one mapping from one variable to another. I am using a Dictionary like this:
mapping = Dict('I'=>1, 'V'=>5, 'X'=>10)
I also want to map it back, so at the moment I define a second Dict:
inverse_mapping = Dict(1=>'I', 5=>'V', 10=>'X')
Is there a better collection for this out there? something like a two way dictionary or maybe another kind of hash table?