So id like to create a function that would convert a table of numbers that is 2 columns by N rows, and output an adjacency table so take the following:

1 2

1 5

2 3

2 5

3 4

4 5

4 6

and output

2 5

1 3 5

2 4

3 5 6

1 2 4

4

where each row is a vector containing the numbers adjacent from the input (i.e 1 2; 1 5 becomes 2 5 on the first row)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.