Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  callgeng.c   Sprache: C

 
/* This is a sample of how to call geng as a procedure rather than
 * running it as a separate process.  The basic idea is to construct
 * an argument list for geng's main() function.  At compile time,
 * assign a name to the macros OUTPROC and GENG_MAIN.  A typical
 * Unix-style compilation command would be:
     gcc -o callgeng -O3 -DMAXN=WORDSIZE -DOUTPROC=myoutproc -DGENG_MAIN=geng_main \
       callgeng.c geng.c nauty.a
 * You will get best performance if you add machine-specific optimization arguments
 * such as -march=native.
 */


#include "gtools.h"

static unsigned long counter;

void
OUTPROC(FILE *outfile, graph *g, int n)
{
 /* This will be called for each graph. */

    ++counter;
}

int
GENG_MAIN(int argc, char *argv[]);

int
main(int argc, char *argv[])
{
    int n,geng_argc;
    char nstring[6]; /* string to put n into */
    char *geng_argv[6]; /* At least one bigger than geng_argc. */

  /* Set up geng argument list.  The 0-th argument is the command name.
   * There must be a NULL at the end.  This example is for connected
   * bipartite graphs of maximum degree at most 4 for 3-10 vertices. */


    for (n = 3; n <= 10; ++n)
    {
        sprintf(nstring,"%d",n);
        geng_argv[0] = "geng";
        geng_argv[1] = "-q";    /* stops geng writing stuff to stderr */
        geng_argv[2] = "-cb";
        geng_argv[3] = "-D4";
        geng_argv[4] = nstring;
        geng_argv[5] = NULL;
        geng_argc = 5;

        counter = 0;
        GENG_MAIN(geng_argc,geng_argv);
        printf("Number of graphs with %d vertices = %lu.\n",n,counter);
    }

    exit(0);
}

Messung V0.5
C=95 H=87 G=90

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge