You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note: solving this issue should be done as the driver use case for issue #95.
Once upon a time in graphIO.c, the behavior of the adjacency list reader and writer were synchronized to ensure that a read followed by a write produced the same output result as the input. That synchrony must be preserved, but it has now become an issue that the adjacency list reader does not produce the adjacency nodes in the left-to-right order of the file according to the interpretation ofthe link[0] and link[1] data members that is imparted by imparted by, respectively, getFirstArc()/getNextArc() and getLastArc()/getPrevArc(). Therefore, methods like gp_CreateDFSTree() do not process the adjacency nodes in the same order that they occur in a natural reading of the input file.
The following items need to be changed to address this use case:
Change the link parameters in the call to gp_DynamicAddEdge() in _ReadAdjList() to cause adjacency nodes to be added in getFirstArc()/getNextArc()` traversal order.
In the else clause after the one containin the first invocation of gp_DynamicAddEdge() in _ReadAdjList(), amend the logic so that preexisting adjacency nodes from lower numbered vertices are also inserted in the correct location according to the getFirstArc()/getNextArc()` traversal order.
To maintain read/write synchrony, amend _WriteAdjList() to use getFirstArc()/getNextArc()traversal order rather than the currentgetLastArc()/getPrevArc()` traversal order.
Test to ensure that an adjacency list read then write produces the same output as the input.
Test to ensure that an adjacency list read followed by gp_CreateDFSTree(), gp_SortVertices(), and then gp_Write() produces the expected vertex re-ordering and adjacency list node neighbor field renumbering according to left-to-write file reading corresponding to getFirstArc()/getNextArc()traversal order and stack operations used bygp_CreateDFSTree()` to create depth-first indices.
Amend the link parameters in gp_DynamicAddEdge() invocations in other readers (adjacency matrix, LEDA, and g6) so that the natural read order of the respective file formats corresponds to the getFirstArc()/getNextArc()` traversal order.
Test that each amended reader is generating adjacency nodes in the correct order by performing a graph read with the reader then write to adjacency list using the planarity executable's transform feature.
The text was updated successfully, but these errors were encountered:
Please note: solving this issue should be done as the driver use case for issue #95.
Once upon a time in
graphIO.c
, the behavior of the adjacency list reader and writer were synchronized to ensure that a read followed by a write produced the same output result as the input. That synchrony must be preserved, but it has now become an issue that the adjacency list reader does not produce the adjacency nodes in the left-to-right order of the file according to the interpretation ofthelink[0]
andlink[1]
data members that is imparted by imparted by, respectively,getFirstArc()
/getNextArc()
andgetLastArc()
/getPrevArc()
. Therefore, methods likegp_CreateDFSTree()
do not process the adjacency nodes in the same order that they occur in a natural reading of the input file.The following items need to be changed to address this use case:
gp_DynamicAddEdge()
in_ReadAdjList()
to cause adjacency nodes to be added ingetFirstArc()/
getNextArc()` traversal order.else
clause after the one containin the first invocation ofgp_DynamicAddEdge()
in_ReadAdjList()
, amend the logic so that preexisting adjacency nodes from lower numbered vertices are also inserted in the correct location according to thegetFirstArc()/
getNextArc()` traversal order._WriteAdjList()
to usegetFirstArc()/
getNextArc()traversal order rather than the current
getLastArc()/
getPrevArc()` traversal order.gp_CreateDFSTree()
,gp_SortVertices()
, and thengp_Write()
produces the expected vertex re-ordering and adjacency list node neighbor field renumbering according to left-to-write file reading corresponding togetFirstArc()/
getNextArc()traversal order and stack operations used by
gp_CreateDFSTree()` to create depth-first indices.gp_DynamicAddEdge()
invocations in other readers (adjacency matrix, LEDA, and g6) so that the natural read order of the respective file formats corresponds to thegetFirstArc()/
getNextArc()` traversal order.planarity
executable's transform feature.The text was updated successfully, but these errors were encountered: