[Nauty] merging graph files

Klas Markström klas.markstrom at umu.se
Fri Nov 1 21:19:06 AEDT 2019


Hi!
Assume that one has several files with graphs  in graph6 format,  each file produced by  running shortg on some input file  so each graph has its canonical labeling, and wish to merge  these files into a single file with only one graph from each isomorphism class.

This could  simply  be done  by

catg  files-*    | shortg  > outfile

but this seems wasteful  given that the graphs are already canonically labeled, and  I believe each of the files was already sorted when it was produced by shortg. 


Would a simple  

sort -u -m  files-*   > outfile  

work just as well and be faster than the first option? 


/Klas





More information about the Nauty mailing list