Construct an unique index from two integer (Pairing Function)
R-bloggers 2013-04-04
Summary:
Recently, I need to construct an unique index from two integer. The best solution I found is the Pairing function. Pairing function is an one to one and onto function that map two integers to a single integer. The definition as follows: If ordering of x and y is not important, we can swap x [...]