src/libs/elektra/opmphm.c
/* Prints the bipartite graph to a dot file, to draw it, for debug purpose. */
Prints the bipartite graph to a dot file, to draw it, for debug purpose.
Prints the bipartite graph to a dot file to draw it for debug purpose .
void opmphmPrintGraph (Edge * edges, void ** data, opmphmGetString fpOpmhpmGetString, size_t n)
{
	FILE * f = fopen ("opmphmGraph.dot", "wr");
	fprintf (f, "graph graphname {\n");
	for (size_t i = 0; i < n; ++i)
	{
		uint32_t h1 = edges[i].h[1];
		uint32_t h2 = edges[i].h[2];
		fprintf (f, "	%u -- %u [label=\"%s\"]\n", h1, h2, fpOpmhpmGetString (data[i]));
	}
	fprintf (f, "}\n");
	fclose (f);
}
void opmphmPrintGraph ( Edge * edges , void * * data , opmphmGetString fpOpmhpmGetString , size_t n ) { FILE * f = fopen ( " " , " " ) ; fprintf ( f , " \n " ) ; for ( size_t i = 0 ; i < n ; ++ i ) { uint32_t h1 = edges [ i ] . h [ 1 ] ; uint32_t h2 = edges [ i ] . h [ 2 ] ; fprintf ( f , " \" \" \n " , h1 , h2 , fpOpmhpmGetString ( data [ i ] ) ) ; } fprintf ( f , " \n " ) ; fclose ( f ) ; }
Prints the bipartite graph to a dot file, to draw it, for debug purpose.
Prints the bipartite graph to a dot file to draw it for debug purpose .