-
input file issue
I was wondering that
Do i have to pass only one file to the adjacency list. (Edge File)
or two files to make it.(Node File , Edge File)
Node File has just name of the vertices in the graphs.
EDGE file has [Vertex 1 - Vertex2].
can some put some tutorial link for some help with adjacency list.
thanks.
-
Why does one have anything to do with the other?
Sure, if the data is in two files, and it seems obvious from looking at the two files that you're meant to read from them alternately, then that is what you should do.
As for adjacency list, I would suggest you google, but you've already done that haven't you.
-
hey I goggled it before putting on the forum.
I have written my code (just one input file :Edge file).
My second problem, How i should define an edge between two vertices.
the structure `i use are :
Code:
struct adj_node // to make adjacency list
{
int *val1;
int *val2;
float *prob;
struct adj_node *adj_next;
};
struct node // the graph that is read in
{
int *val1;
int *val2;
float *prob;
struct adj_node *down;
struct node *next;
};
.
Thanks.