Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PreCalculatedPrimeTable Class Reference

#include <JETSCAPE/blob/main/external_packages/googletest/googletest/samples/prime_tables.h>

+ Inheritance diagram for PreCalculatedPrimeTable:
+ Collaboration diagram for PreCalculatedPrimeTable:

Public Member Functions

 PreCalculatedPrimeTable (int max)
 
virtual ~PreCalculatedPrimeTable ()
 
virtual bool IsPrime (int n) const
 
virtual int GetNextPrime (int p) const
 
- 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 80 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 80 of file prime_tables.h

Constructor & Destructor Documentation

PreCalculatedPrimeTable::PreCalculatedPrimeTable ( int  max)
inlineexplicit

Definition at line 83 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 83 of file prime_tables.h

References CalculatePrimesUpTo().

+ Here is the call graph for this function:

virtual PreCalculatedPrimeTable::~PreCalculatedPrimeTable ( )
inlinevirtual

Definition at line 87 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 87 of file prime_tables.h

References is_prime_.

Member Function Documentation

void PreCalculatedPrimeTable::CalculatePrimesUpTo ( int  max)
inlineprivate

Definition at line 102 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 102 of file prime_tables.h

References i, is_prime_, is_prime_size_, and j.

Referenced by PreCalculatedPrimeTable().

+ Here is the caller graph for this function:

virtual int PreCalculatedPrimeTable::GetNextPrime ( int  p) const
inlinevirtual

Implements PrimeTable.

Definition at line 93 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 93 of file prime_tables.h

References is_prime_, is_prime_size_, and n.

virtual bool PreCalculatedPrimeTable::IsPrime ( int  n) const
inlinevirtual

Implements PrimeTable.

Definition at line 89 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 89 of file prime_tables.h

References is_prime_, is_prime_size_, and n.

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

Member Data Documentation

bool* const PreCalculatedPrimeTable::is_prime_
private

Definition at line 117 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 117 of file prime_tables.h

Referenced by CalculatePrimesUpTo(), GetNextPrime(), IsPrime(), and ~PreCalculatedPrimeTable().

const int PreCalculatedPrimeTable::is_prime_size_
private

Definition at line 116 of file prime_tables.h.

View newest version in sPHENIX GitHub at line 116 of file prime_tables.h

Referenced by CalculatePrimesUpTo(), GetNextPrime(), and IsPrime().


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