[Nauty-list] Using combinatorial data

Elton Zhang eltonzhang2001 at yahoo.com.cn
Wed May 23 16:06:38 EST 2007


Dear Mckay and Gordon,
  Thanks for your quick reply!
   
  Zan-Bo Zhang

Brendan McKay <bdm at cs.anu.edu.au> 写道:
  I'll upgrade Gordon's code a little and add some comments.
Link this with gtools.o.


#include "gtools.h"

int
main(int argc, char *argv[])
{

graph *g;
int m,n;

int codetype;
FILE *infile;

infile = opengraphfile(NULL,&codetype,0,1);
/* Replace NULL by a filename if you want to read from a file.
Using NULL means you want to read from stdin. */

if (infile == NULL)
{
fprintf(stderr,"Error: Can't open input file\n");
exit(1);
}

while ((g = readg(infile,NULL,0,&m,&n)) != NULL)
{

//PUT YOUR CODE HERE
// To write g to stdout use writeg6(stdout,g,m,n);
// or writes6(stdout,g,m,n);
// To write to a file you need to first open the file
// yourself using fopen.

free(g); /* After you finished with the graph */
}
}

> On 23/05/2007, at 10:32 AM, Elton Zhang wrote:
> 
> >Dear all,
> >There are some combinatorial data on Professor Mckay's web pages. I 
> >am writing a program to use them. My target is that, from the 
> >collection of simple graphs, my program will pick up all those 
> >graphs having a certain property. So the action carried out will be 
> >accessing the data in some .g6 files, testing each graph for the 
> >property and then write the one with the answer "yes" to other .g6 
> >files.
> >
> >My question here is that whether there is a interface in the 
> >package of Nauty for reading and writing .g6 files? It would be 
> >appreciated if you could give me some advises on such works.
> >
> >Thank you for your attension!
> >
> >Best Regards,
> >Zan-Bo Zhang
> >

> >_______________________________________________
> >Nauty-list mailing list
> >Nauty-list at cs.anu.edu.au
> >http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list
> 
> --
> Associate Professor Gordon Royle
> Department of Computer Science & Software Engineering
> University of Western Australia
> http://people.csse.uwa.edu.au/gordon
> 
> 
> 
> 
> 
> _______________________________________________
> Nauty-list mailing list
> Nauty-list at cs.anu.edu.au
> http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list


       
---------------------------------
 雅虎免费邮箱3.5G容量,20M附件!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.anu.edu.au/mailman/private/nauty/attachments/20070523/3702e397/attachment.html 


More information about the Nauty mailing list