Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  numleaves.c

  Sprache: C
 

/* This is a sample function to show how copyg can be compiled
   as a filter.  This one defines the filter to be TRUE if
   the graph has between Qlo and Qhi leaves.  Outdegree=1 counts
   as a leaf in the case of digraphs.

   To compile this into a program "numleaves", use this:
     gcc -o numleaves -O3 -DFILTER=numleaves copyg.c numleaves.c nauty.a
   or similarly with a different compiler.

   At execution time, the interval [Qlo,Qhi] is taken from the -Q switch.
   A missing lower bound is indicated by Qlo = -NOLIMIT and a missing
   upper bound by Qhi = NOLIMIT.
*/


#include "gtools.h"

boolean
numleaves(graph *g, boolean digraph, long Qlo, long Qhi, int m, int n)
{
    int i,leaves;
    set *gi;

  /* If m=1, it would be more efficient to use the POPCOUNT
     macro in this funtion without calling setsize().  But
     we won't do that as it is just an example. */


    leaves = 0;
    for (i = 0, gi = g; i < n; ++i, gi += m)
        if (setsize(gi,m) == 1) ++leaves;

    return leaves >= Qlo && (Qhi == NOLIMIT || leaves <= Qhi);
}

Messung V0.5 in Prozent
C=97 H=72 G=85

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=492969
#Domains=607362