We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to create an neighbor list for points in a nodal graph(set of points). Each point will have certain set of neighbor points. I'm trying to create this using arraylist of integer arraylist. I can declare one of the arraylist as objects of a class and use it to create a 2 dimensional array list. I have provided a sample of points below which expalins how the neighbor list looks like. Also i need to have flag array for each row of arraylist(0,1,2..) which will keep track of the points when i try to pick one of the neighbors from the list and use them to connect a line. and the same node should not be connected.
0 -> 1 4 5 6
1 -> 0 2 3 7
2 -> 4 3 5 9 11 12
3 -> ....................
Say, If 0 is connected to 1, 1 can't connect to zero and 1 should connect to some other points from the 2nd arraylist of neighbors ( 2 , 3 or 7).
Can you guys please help me provide a sample code using class objects and arraylist in java for the above scenario. It would be real helpful. Please. Thanks in advance