-#include <R.h>
-
-#define DINDEX(i, j) n*(i - 1) - i*(i - 1)/2 + j - i - 1
-/* works if i < j strictly, and i = 1, ...;
- see give_index() below */
-
-int give_index(int i, int j, int n)
-{
- if (i > j) return(DINDEX(j, i));
- else return(DINDEX(i, j));
-}