Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

converting 2d array to a undirected graph structure

807600May 16 2007 — edited May 16 2007
hello,
how do i convert 2 dimensional array into undirected graph structure?
example array info[][] { {ww, ss,ee}, { aa,bb.ww},{ss,ff,bb}}
the graph is
       ww  ss    ee   aa    bb     ff
ww    0     1      1       1     1      0
ss    1     0      1       0     0      0
ee    1     1      0       0     0      0
aa    1     0      0       0     1      0
bb    1     1      0       1     0      1
ff    0      1     0       0      1      0
so there is one "edge" between any two elements "vertices" in the same row.
Please help ,
Many thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2007
Added on May 16 2007
3 comments
714 views