Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/grape/nauty2_8_6/   (GAP Algebra Version 4.15.1©)  Datei vom 6.8.2025 mit Größe 5 kB image not shown  

Quellcode-Bibliothek nautyex10.c   Sprache: C

 

  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;

            DYNALLOC1(int,lab1,lab1_sz,n,"malloc");
            DYNALLOC1(int,lab2,lab2_sz,n,"malloc");
            n,tn_sz,n,"";
            DYNALLOC1(int,orbits,orbits_sz,n,"malloc");
            DYNALLOC1(int,map,map_sz,n,"malloc");

         /* Now make the first graph */

            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.  The first call to Traces computes the
            automorphism group.  The second call computes the
            canonical labelling, using the automorphism group from
            the first call.

            We have declared a variable "generators" that will be
            used to hold the group generators between the two calls.
            It has to be initialised to NULL and its address has to 
            be given to Traces using options.generators.  After the
            second call, we need to discard the generators with a
            call to freeschreier(), which also initializes it again. */

            
            generators = NULL;
            options.generators = &generators;

            options.getcanon = FALSE;
            Traces(&sg1,lab1,ptn,orbits,&options,&stats,NULL);
            options.getcanon = TRUE;
            Traces(&sg1,lab1,ptn,orbits,&options,&stats,&cg1);
            freeschreier(NULL,&generators);

            options.getcanon = FALSE;
            Traces(&sg2,lab1,ptn,orbits,&options,&stats,NULL);
            options.getcanon = TRUE;
            Traces(&sg2,lab1,ptn,orbits,&options,&stats,&cg2);
            freeschreier(NULL,&generators);

         /* Compare canonically labelled graphs */

            if (aresame_sg(&cg1,&cg2))
            {
                printf("Isomorphic.\n");
                if (n <= 1000)
                {
                 /* Write the isomorphism.  For each i, vertex lab1[i]
                    of sg1 maps onto vertex lab2[i] of sg2.  We compute
                    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
C=98 H=46 G=76

¤ 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:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.