I have data file with the following structure:
{{100, 201, value1}, {100, 301, value2}, {200, 301, value3}}
How to construct a function f[i_,j_]
so that
f[100,201]=value1, f[100,301]=value2, f[200,301]=value3
. For all other arguments which are not presented in a file one have to obtain zero, i.e. f[100,104]=0
?
P.S. This problem arises in connection with atomic physics. It is necessary to construct a function which calls the transitions rates between states i and j tabulated in a file. i=100 means 1S state of hydrogen for example, j=201 = 2p state and etc.