koleti has asked for the wisdom of the Perl Monks concerning the following question:
I have file that contains two columns id1 and id2 as shown below id1 id2 208 10000 207 10000 8517 1147 3551 1147
Now i want to convert it into an adjacency matrix
as shown below
10000 1147
208 1 0
207 1 0
8517 0 1
3551 0 1
what i want to do is give 1 if id1 and id2 are there
else i want to give a 0
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to convert two lists into adjacency matrix
by kennethk (Abbot) on Apr 13, 2009 at 22:02 UTC | |
by QM (Parson) on Apr 14, 2009 at 19:38 UTC | |
by jaybode (Initiate) on Nov 06, 2009 at 14:00 UTC | |
by jaybode (Initiate) on Nov 06, 2009 at 13:59 UTC | |
|
Re: how to convert two lists into adjacency matrix
by linuxer (Curate) on Apr 13, 2009 at 21:59 UTC | |
|
Re: how to convert two lists into adjacency matrix
by metaperl (Curate) on Nov 06, 2009 at 14:33 UTC |