Thread View: comp.hypercube
1 messages
1 total messages
Started by Wen-King
Tue, 14 Jul 1987 12:20
Re: T or routing (Grey Code ring in Binary N-cube)
Author: Wen-King
Date: Tue, 14 Jul 1987 12:20
Date: Tue, 14 Jul 1987 12:20
25 lines
1448 bytes
1448 bytes
In article <282@hubcap.UUCP> gdburns@TCGOULD.TN.CORNELL.EDU (Greg Burns) writes:
>I have a semi-interesting problem with routing on a loop that is actually
>threaded through a hypercube. Let's say that a loop is mapped onto
>a hypercube in the following way:
>
>000 001 011 010 110 111 101 100
Given that:
NODE = node number of this node.
MASK = (2**(dimension of cube)) - 1.
Using these routines:
bin_grey(n) int n; { return(n ^ (n >> 1)); }
grey_bin(n) int n; { int i; for(i = n; n >>= 1; i ^= n); return(i); }
To make a ring:
preceeding node = bin_grey( ( grey_bin(NODE) - 1 ) & MASK );
suceeding node = bin_grey( ( grey_bin(NODE) + 1 ) & MASK );
+--------------------------------------------------------------------------+
| Wen-King Su wen-king@vlsi.caltech.edu Caltech Corp of Cosmic Engineers |
+--------------------------------------------------------------------------+
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads