src/sat/fraig/fraigPrime.c File Reference

#include "fraigInt.h"
Include dependency graph for fraigPrime.c:

Go to the source code of this file.

Functions

unsigned int Cudd_PrimeFraig (unsigned int p)

Variables

int s_FraigPrimes [FRAIG_MAX_PRIMES]

Function Documentation

unsigned int Cudd_PrimeFraig ( unsigned int  p  ) 

FUNCTION DEFINITIONS ///Function********************************************************************

Synopsis [Returns the next prime >= p.]

Description [Copied from CUDD, for stand-aloneness.]

SideEffects [None]

SeeAlso []

Definition at line 115 of file fraigPrime.c.

00116 {
00117     int i,pn;
00118 
00119     p--;
00120     do {
00121         p++;
00122         if (p&1) {
00123             pn = 1;
00124             i = 3;
00125             while ((unsigned) (i * i) <= p) {
00126                 if (p % i == 0) {
00127                     pn = 0;
00128                     break;
00129                 }
00130                 i += 2;
00131             }
00132         } else {
00133             pn = 0;
00134         }
00135     } while (!pn);
00136     return(p);
00137 
00138 } /* end of Cudd_Prime */


Variable Documentation

int s_FraigPrimes[FRAIG_MAX_PRIMES]

CFile****************************************************************

FileName [fraigPrime.c]

PackageName [FRAIG: Functionally reduced AND-INV graphs.]

Synopsis [The table of the first 1000 primes.]

Author [Alan Mishchenko <alanmi@eecs.berkeley.edu>]

Affiliation [UC Berkeley]

Date [Ver. 2.0. Started - October 1, 2004]

Revision [

Id
fraigPrime.c,v 1.4 2005/07/08 01:01:32 alanmi Exp

] DECLARATIONS ///

Definition at line 27 of file fraigPrime.c.


Generated on Tue Jan 5 12:19:38 2010 for abc70930 by  doxygen 1.6.1