Is this what you are looking for?

   3 3<;._3]i.5 5

+--------+--------+--------+

| 0  1  2| 1  2  3| 2  3  4|

| 5  6  7| 6  7  8| 7  8  9|

|10 11 12|11 12 13|12 13 14|

+--------+--------+--------+

| 5  6  7| 6  7  8| 7  8  9|

|10 11 12|11 12 13|12 13 14|

|15 16 17|16 17 18|17 18 19|

+--------+--------+--------+

|10 11 12|11 12 13|12 13 14|

|15 16 17|16 17 18|17 18 19|

|20 21 22|21 22 23|22 23 24|

+--------+--------+--------+


On Sun, Feb 24, 2013 at 5:21 AM, alessandro codenotti <[email protected]>wrote:

>
> I had this network problem to solve and i wrote the code to do it,
> everything was fine until i noticed i wasn't able to compute the adjacency
> matric to work on!
>
> the network is a square network where every node is connected to is
> neighbours, for the 3x3 case it looks like this:
>
> A----B----C
> |      |     |
> D----E----F
> |      |     |
> G----H----I
>
> where A,B,C...,I are the 9 nodes and the corresponding adjacency matrix
> can be easily obtained by hand, however i have to work on different
> networks of different sizes, but they are all squares and all connected
> like that.
> My question then is more a maths question than a programming one (well, is
> there any J programmer that doesn't love maths?), if i need the adjacency
> matrich of such networks, is there an easy way to find it knowing the
> propertiese of the network given above? and how can i do it in J?
>
> thank in advice for the help!
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to