n by n matrixR/disambr_utils.r
get_upper_triangle_index.Rdinspired from https://math.stackexchange.com/questions/2134011 but modified so index starts from 1 as the original answer was for index starting from 0
get_upper_triangle_index(i, j, n)row index
column index
the size of squared matrix
An index as integer number. Index starts from 1