Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PreCalculatedPrimeTable Class Reference

#include <prime_tables.h>

Inheritance diagram for PreCalculatedPrimeTable:
Inheritance graph
[legend]

Public Member Functions

 PreCalculatedPrimeTable (int max)
 
 ~PreCalculatedPrimeTable () override
 
bool IsPrime (int n) const override
 
int GetNextPrime (int p) const override
 
- Public Member Functions inherited from PrimeTable
virtual ~PrimeTable ()
 

Private Member Functions

void CalculatePrimesUpTo (int max)
 
void operator= (const PreCalculatedPrimeTable &rhs)
 

Private Attributes

const int is_prime_size_
 
bool *const is_prime_
 

Detailed Description

Definition at line 79 of file prime_tables.h.

Constructor & Destructor Documentation

PreCalculatedPrimeTable::PreCalculatedPrimeTable ( int  max)
inlineexplicit

Definition at line 82 of file prime_tables.h.

PreCalculatedPrimeTable::~PreCalculatedPrimeTable ( )
inlineoverride

Definition at line 86 of file prime_tables.h.

Member Function Documentation

bool PreCalculatedPrimeTable::IsPrime ( int  n) const
inlineoverridevirtual

Implements PrimeTable.

Definition at line 88 of file prime_tables.h.

int PreCalculatedPrimeTable::GetNextPrime ( int  p) const
inlineoverridevirtual

Implements PrimeTable.

Definition at line 92 of file prime_tables.h.

void PreCalculatedPrimeTable::CalculatePrimesUpTo ( int  max)
inlineprivate

Definition at line 101 of file prime_tables.h.

void PreCalculatedPrimeTable::operator= ( const PreCalculatedPrimeTable rhs)
private

Member Data Documentation

const int PreCalculatedPrimeTable::is_prime_size_
private

Definition at line 119 of file prime_tables.h.

bool* const PreCalculatedPrimeTable::is_prime_
private

Definition at line 120 of file prime_tables.h.


The documentation for this class was generated from the following file: