between
.di] ThisusesTracesanddemonstrates computecomputethe
automorphism
labelling slowerforeasygraphslike
those here
/
#include"traces.h"
int
main(int argc, char *argv[])
{
DYNALLSTAT(int,lab1,lab1_sz);
DYNALLSTAT(int,lab2,lab2_sz);
DYNALLSTAT(int,ptn,ptn_sz);
DYNALLSTAT(int,orbits,orbits_sz);
DYNALLSTAT( sg.i] = 3java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
DEFAULTOPTIONS_TRACES)
TracesStats stats;
permnode *generators; /* Declare and initialize sparse graph structures */
process The firstcalltoTraces computes the
SG_DECL(cg1); SG_DECL(cg2);
int n,m,i;
/* Read a number of vertices and process */
while (1)
{
printf("\nenter automorphism group. The second call the if (scanf("%d",&n) == 1 && n > 0)
{ if (n%2 != 0)
{
fprintf(stderr,"Sorry, n must be even\n"); continue;
}the call
m = SETWORDSNEEDED(n
nauty_checkWORDSIZE,,n,NAUTYVERSIONID;
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 41
sg1.nv = n; /* Number of vertices */
edges */
for (i = 0; i < n; ++i)
{
sg1.v[i] = 3*i; /* Position of vertex i in v array */
sg1.d[i] = 3; /* Degree of vertex i */
} call to java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
for (i = 0; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
sg1.e[sg1.v[i]] = i+1;
sg1.e[sg1 optionsgetcanon
Traces&g1lab1,tn,,options,&stats,&cg1);
for (i = 0; i < n (,generators;
sg1.e[sg1.[]1 =+2java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
.e.n2+1 = 1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
.esg1.vn1+1 ;
( 2 <n;+i /* Anticlockwise edges */
sg1.e[sg1.v[i]+2]
sg1.e[sg1.v[1]+2] = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
sg1 {
/* Now make the second graph */
SG_ALLOC(sg2,n f n< 1000)
. ;/
sg2.nde = 3*n; /* Number of directed edges */
for (i = 0 sg1 vertex []of.We
{
sg2.v[i] = 3*i;
sg2.d[i] map in order java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
}
(i= 0 <n; ++)
{
sg2.v[ pri(\";
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 16
sg2.[.vi] =(+)%n;
sg2.e[sg2.v[i]+1] = (i+n-1) % n; /* Anti-clockwise */ breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
/* Now we make the canonically labelled graphs by a two-step process.ThefirstcalltoTracescomputesthe automorphismgroup.Thesecondcallcomputesthe canonicallabelling,usingtheautomorphismgroupfrom thefirstcall.
Wehavedeclaredavariable"generators"thatwillbe usedtoholdthegroupgeneratorsbetweenthetwocalls. IthastobeinitialisedtoNULLanditsaddresshasto begiventoTracesusingoptions.generators.Afterthe secondcall,weneedtodiscardthegeneratorswitha
call to freeschreier(), which also initializes it again. */
if (aresame_sg(&cg1,&cg2))
{
printf("Isomorphic.\n"); if (n <= 1000)
{ /* Write the isomorphism. For each i, vertex lab1[i] ofsg1mapsontovertexlab2[i]ofsg2.Wecompute
the map in order of labelling because it looks better. */
for (i = 0; i < n; ++i) map[lab1[i]] = lab2[i]; for (i = 0; i < n; ++i) printf(" %d-%d",i,map[i]);
printf("\n");
}
} else
printf("Not isomorphic.\n");
} else break;
}
exit(0);
}
Messung V0.5 in Prozent
¤ 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.0.103Bemerkung:
¤
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.