[Nauty-list] accept only graphs with subgraphs isomorphic to predefined subset

Brendan McKay Brendan.McKay at anu.edu.au
Wed Oct 23 13:38:34 EST 2013


Hi Robert,

You can use the callgeng method as someone else suggested, but you
can also do it within the PRUNE function using static variables.

Inside your PRUNE function do this:

static boolean initialized = FALSE;
...
    if (!initialized)
    {
         --- read in the graphs
         initialized = TRUE;
    }

This will read the graphs in on the first time geng calls the PRUNE
function.  Make sure the data structure used to hold the graphs is
also declared static, so that it won't disappear when the function
returns.

Brendan.

On 23/10/13 6:03 AM, "Hoy, Robert" <rshoy at usf.edu> wrote:

>Hi, everybody.  I want to define a set G of about 1600 subgraphs at the m
>= 11 level such that the PRUNE function of geng rejects all n = 11
>subgraphs that are not isomorphic to any of the graphs in the set G.
>
>The (very) slow way to do this is to read the graphs in from a file each
>time PRUNE is called for n = 11, but obviously I don't want to do that.
>Instead I want to read them in only once, i.e. at the beginning of the
>geng program, e.g. something like
>
>geng.c:
>
>graph myset[1645];
>
>appropriategengfunction {
>/* fill myset by reading from file */
>}
>
>where "appropriategengfunction" is called when geng starts up, and
>prune.c can access my set via something
>
>extern graph myset[1645];
>
>(and then prune.c will do the appropriate pruning)
>
>=========
>
>Any tips on how to do this?  I'm not sure what the "appropriate" geng
>function would be, or even whether it's in geng.c rather than (say)
>nauty.c.
>
>Any help would be greatly appreciated.
>
>Thanks,
>Rob  
>  
>Robert Hoy
>Assistant Professor of Physics
>University of South Florida
>813-974-0063
>
>
>
>_______________________________________________
>Nauty-list mailing list
>Nauty-list at cs.anu.edu.au
>http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list
>






More information about the Nauty mailing list