Matrices

Soldato
Joined
24 Nov 2002
Posts
16,378
Location
38.744281°N 104.846806°W
How would I go from:

a,b 1
a,c 2
a,d 3
b,c 4
b,d 5
c,d 6

to:

a 1 2 3
b 1 4 5
c 2 4 6
d 3 5 6

I.e. a 2d matrix whereby the first line would been "1 = a to b", "2 = a to c" and so on...

Any ideas?

php would be the nicest choice for me!
 
This isn't a programming problem, this is an algorithm program.

If you can write the algorithm in psuedocode, someone will help you put it into a specific language. Otherwise we are just solving the problem, rather than helping you.
 
Shoseki said:
This isn't a programming problem, this is an algorithm program.

If you can write the algorithm in psuedocode, someone will help you put it into a specific language. Otherwise we are just solving the problem, rather than helping you.


Hi, Cheers for looking.

Why pseudocode?

I was going to just read each line and create arrays....
 
Back
Top Bottom