How to use the networkit.GEXFIO.GEXFReader function in networkit

To help you get started, we’ve selected a few networkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github networkit / networkit / networkit / graphio.py View on Github external
def getReader(fileformat, **kwargs):
	#define your [edgelist] reader here:
	readers =	{
			Format.METIS:			METISGraphReader(),
			Format.GraphML:			GraphMLReader(),
			Format.GEXF:			GEXFReader(),
			Format.SNAP:			EdgeListReader('\t',0,'#',False),
			Format.EdgeListCommaOne:	EdgeListReader(',',1,),
			Format.EdgeListSpaceOne:	EdgeListReader(' ',1),
			Format.EdgeListSpaceZero:	EdgeListReader(' ',0),
			Format.EdgeListTabOne:		EdgeListReader('\t',1),
			Format.EdgeListTabZero:		EdgeListReader('\t',0),
			Format.LFR:			EdgeListReader('\t',1),
			Format.KONECT:			KONECTGraphReader(' '),
			Format.GML:			GMLGraphReader(),
			Format.GraphToolBinary:		GraphToolBinaryReader(),
			Format.MAT:			MatReader()
			}

	try:
		# special case for custom Edge Lists
		if fileformat == Format.EdgeList: