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


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
C=92 H=87 G=89

¤ Dauer der Verarbeitung: 0.14 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