How can I construct adjacency matrix from input dataset graph file, which has the following data:
The first line of the dataset file, represents the number of nodes and edges resp. The following lines represent node1 and node2 denoting an edge existing between them For example: amazon.graph dataset file contains the following
Below is the file amazon.graph
4 6 // number of nodes and edges
0 1 // edge between node 0 and 1
1 3
2 3
1 2
0 2
0 3
This data is contained in a file named "amazon.graph". I need help with a matlab function that can read the file and build adjacency matrix from the dataset file