My Project
Loading...
Searching...
No Matches
Functions
cf_primes.h File Reference

access to prime tables More...

#include "globaldefs.h"

Go to the source code of this file.

Functions

int FACTORY_PUBLIC cf_getPrime (int i)
 
int FACTORY_PUBLIC cf_getNumPrimes ()
 
int FACTORY_PUBLIC cf_getSmallPrime (int i)
 
int FACTORY_PUBLIC cf_getNumSmallPrimes ()
 
int FACTORY_PUBLIC cf_getBigPrime (int i)
 
int FACTORY_PUBLIC cf_getNumBigPrimes ()
 

Detailed Description

access to prime tables

Definition in file cf_primes.h.

Function Documentation

◆ cf_getBigPrime()

int FACTORY_PUBLIC cf_getBigPrime ( int  i)

Definition at line 39 of file cf_primes.cc.

40{
41 ASSERT( i >= 0 && i < NUMBIGPRIMES, "index to primes too high" );
42 return bigprimes[i];
43}
int i
Definition: cfEzgcd.cc:132
#define ASSERT(expression, message)
Definition: cf_assert.h:99
static const int bigprimes[]
Definition: cf_primetab.h:601
#define NUMBIGPRIMES
Definition: cf_primetab.h:9

◆ cf_getNumBigPrimes()

int FACTORY_PUBLIC cf_getNumBigPrimes ( )

Definition at line 45 of file cf_primes.cc.

46{
47 return NUMBIGPRIMES;
48}

◆ cf_getNumPrimes()

int FACTORY_PUBLIC cf_getNumPrimes ( )

Definition at line 23 of file cf_primes.cc.

24{
25 return NUMPRIMES;
26}
#define NUMPRIMES
Definition: cf_primetab.h:10

◆ cf_getNumSmallPrimes()

int FACTORY_PUBLIC cf_getNumSmallPrimes ( )

Definition at line 34 of file cf_primes.cc.

35{
36 return NUMSMALLPRIMES;
37}
#define NUMSMALLPRIMES
Definition: cf_primetab.h:8

◆ cf_getPrime()

int FACTORY_PUBLIC cf_getPrime ( int  i)

Definition at line 14 of file cf_primes.cc.

15{
16 ASSERT( i >= 0 && i < NUMPRIMES, "index to primes too high" );
17 if ( i >= NUMSMALLPRIMES )
19 else
20 return smallprimes[i];
21}
static const int smallprimes[]
Definition: cf_primetab.h:12

◆ cf_getSmallPrime()

int FACTORY_PUBLIC cf_getSmallPrime ( int  i)

Definition at line 28 of file cf_primes.cc.

29{
30 ASSERT( i >= 0 && i < NUMSMALLPRIMES, "index to primes too high" );
31 return smallprimes[i];
32}