This is a simple class which is a wrapper for computing the smallest prime number greater or equal to the given integer. More...
#include <integer.h>
Public Member Functions | |
primeint (int_t k=0) | |
The constructor which computes the smallest prime number greater than or equal to the given one. | |
primeint & | operator= (const primeint &p) |
The assignment operator. | |
primeint & | operator= (int_t k) |
The assignment operator which also rounds up to the nearest prime number. | |
operator int_t () const | |
The conversion operator to an integer number which extracts the prime number. | |
Private Attributes | |
int_t | n |
The actual prime number stored in this class. |
This is a simple class which is a wrapper for computing the smallest prime number greater or equal to the given integer.
Definition at line 60 of file integer.h.
chomp::homology::primeint::primeint | ( | int_t | k = 0 |
) |
The constructor which computes the smallest prime number greater than or equal to the given one.
chomp::homology::primeint::operator int_t | ( | ) | const [inline] |
The assignment operator which also rounds up to the nearest prime number.
int_t chomp::homology::primeint::n [private] |
The actual prime number stored in this class.
Definition at line 80 of file integer.h.
Referenced by operator int_t(), and operator=().