My Project
Loading...
Searching...
No Matches
Functions
cf_primes.cc File Reference
#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "cf_primes.h"
#include "cf_primetab.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ cf_getBigPrime()

int 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 cf_getNumBigPrimes ( )

Definition at line 45 of file cf_primes.cc.

46{
47 return NUMBIGPRIMES;
48}

◆ cf_getNumPrimes()

int 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 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 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 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}