this part running painfully slow. its correct but if i handin this i will
lose all the pts in cpu speed contest
that's about 30 % of program of my grade. open for suggestion it is
basically initialize a double pointer to
take input. but it is tooo ooo slow , my instructor sean give zero for
that. and i can't think any improvement
. help man !!!!!!
istream & operator>> (istream &in, Grid &grid)
{
int x,edgesNum;
int i = 0 ;
while (in >> x)
{
in >> edgesNum; //the number of edges 1-5
grid.Vertices[x]->EdgeSize = edgesNum;
(grid.Vertices[x])->edges = new Edge *[edgesNum]; //2 nd edges is
while ( i<edgesNum)
{
grid.Vertices[x]->edges[i] = new Edge();
in >> grid.Vertices[x]->edges[i]->ToVertax;
in >> grid.Vertices[x]->edges[i]->Weight;
grid.Vertices[x]->edges[i]->FromVertax = x;
i++;
}
i = 0;
//might need a getline to go to next line for input
}
return in;
} // operator>>