Loading...
Searching...
No Matches
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.

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

## cf_getNumBigPrimes()

int FACTORY_PUBLIC cf_getNumBigPrimes | ( |  | ) |

Definition at line 45 of file cf_primes.cc.

{
return NUMBIGPRIMES;
}

## cf_getNumPrimes()

int FACTORY_PUBLIC cf_getNumPrimes | ( |  | ) |

Definition at line 23 of file cf_primes.cc.

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

## cf_getNumSmallPrimes()

int FACTORY_PUBLIC cf_getNumSmallPrimes | ( |  | ) |

Definition at line 34 of file cf_primes.cc.

{
return NUMSMALLPRIMES;
}
NUMSMALLPRIMES
#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.

{
ASSERT( i >= 0 && i < NUMPRIMES, "index to primes too high" );
if ( i >= NUMSMALLPRIMES )
return bigprimes[i-NUMSMALLPRIMES];
else
return smallprimes[i];
}
smallprimes
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.

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