mirror of
https://github.com/xlucn/PAT.git
synced 2026-08-18 01:18:40 +08:00
fix 1003, should add bidirectional edge
This commit is contained in:
+5
-2
@@ -101,9 +101,12 @@ void Read(Graph G)
|
||||
e->length = length;
|
||||
e->iter = G->vs[id1].adj;
|
||||
G->vs[id1].adj = e;
|
||||
/* The other direction */
|
||||
e++, i++;
|
||||
e->id = id1;
|
||||
e->length = length;
|
||||
e->iter = G->vs[i].adj;
|
||||
G->vs[i].adj = e;
|
||||
e->iter = G->vs[id2].adj;
|
||||
G->vs[id2].adj = e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user