linbox
PrimeStream< Element > Class Template Reference

Prime number stream. More...

#include <prime-stream.h>

Public Member Functions

 PrimeStream (Integer &start, bool move_up=true)
 Constructor.
 
 ~PrimeStream ()
 
Elementnext (Element &a)
 Get the next prime element.
 
PrimeStream< Element > & operator>> (Element &a)
 Operator form for getting the next prime element.
 

Detailed Description

template<class Element>
class LinBox::PrimeStream< Element >

Prime number stream.

Provides a source of prime numbers of given characteristics to use in parts of the library that need to reduce modulo one or more primes.

Constructor & Destructor Documentation

◆ PrimeStream()

template<class Element>
PrimeStream ( Integer & start,
bool move_up = true )
inline

Constructor.

Construct a PrimeStream object.

Parameters
startStarting point; need not be prime itself
move_uptrue if we should move up from the starting point, false otherwise

◆ ~PrimeStream()

template<class Element>
~PrimeStream ( )
inline

Member Function Documentation

◆ next()

template<class Element>
Element & next ( Element & a)
inline

Get the next prime element.

Parameters
aPlace to store the next prime element
Returns
Reference to next prime element

◆ operator>>()

template<class Element>
PrimeStream< Element > & operator>> ( Element & a)
inline

Operator form for getting the next prime element.


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