/* This program prints generators for the automorphism group of an n-vertexpolygon,wherenisanumbersuppliedbytheuser.
Thisversionusesdynamicallocation.
*/
#include"nauty.h" /* MAXN=0 is defined by nauty.h, which implies dynamic allocation */
int
main(int argc, char *argv[])
{ /* DYNALLSTAT declares a pointer variable (to hold an array when it isallocated)andasizevariabletorememberhowbigthearrayis.
Nothing is allocated yet. */
/* Default options are set by the DEFAULTOPTIONS_GRAPH macro above. Herewechangethoseoptionsthatwewanttobedifferentfromthe
defaults. writeautoms=TRUE causes automorphisms to be written. */
options.writeautoms = TRUE;
while (1)
{
printf("\nenter n : "); if (scanf("%d",&n) == 1 && n > 0)
{
/* The nauty parameter m is a value such that an array of msetwordsissufficienttoholdnbits.Thetypesetword isdefinedinnauty.h.Thenumberofbitsinasetwordis WORDSIZE,whichis16,32or64.Herewecalculate
m = ceiling(n/WORDSIZE). */
m = SETWORDSNEEDED(n);
/* The following optional call verifies that we are linking
to compatible versions of the nauty routines. */
nauty_check(WORDSIZE,m,n,NAUTYVERSIONID);
/* Now that we know how big the graph will be, we allocate
* space for the graph and the other arrays we need. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.