/* This program prints generators for the automorphism group of an n-vertex polygon, where n is a number supplied by the user. This version uses sparse form with dynamic allocation.
*/
/* SG_ALLOC makes sure that the v,d,e fields of a sparse graph structure point to arrays that are large enough. This only
works if the structure has been initialised. */
SG_ALLOC(sg,n,2*n,"malloc");
sg.nv = n; /* Number of vertices */
sg.nde = 2*n; /* Number of directed edges */
for (i = 0; i < n; ++i)
{
sg.v[i] = 2*i;
sg.d[i] = 2;
sg.e[2*i] = (i+n-1)%n; /* edge i->i-1 */
sg.e[2*i+1] = (i+n+1)%n; /* edge i->i+1 */
}
printf("Generators for Aut(C[%d]):\n",n);
sparsenauty(&sg,lab,ptn,orbits,&options,&stats,NULL);
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.