Given a fully connected graph of n nodes. The nodes are assigned indices i.n arbitrarily. D is a distance matrix. Eg. n =. 4 ] D =. 4 4 $ 0 1.5 2 2.5 1.5 0 1.5 2 2 1.5 0 1.5 2.5 2 1.5 0
I'm not claiming this matrix fits in Euclidean geometry. Nevertheless each element on the diagonal is 0 and the matrix is symmetrical. Can anyone suggest a more efficient way to create the matrix. Only (n * (n-1))%2 elements of D are unique. Each unique elecment should be needed only once to build the matrix. Thanks, Peter E. -- https://en.wikibooks.org/wiki/Medical_Machines Tel: +1 604 670 0140 Bcc: peter at easthope. ca ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
