linbox
PrimeSequence< IteratorT, UniqueTrait > Class Template Reference

Adaptor class to make a fixed-length sequence behave like a PrimeIterator. More...

#include <random-prime.h>

Public Types

using Prime_Type = typename std::remove_cv<typename std::remove_reference<decltype(*_cur)>::type>::type
 
using UniqueSamplingTag = UniqueTrait
 
using IteratorTag = IteratorCategories::DeterministicTag
 

Public Member Functions

 PrimeSequence (IteratorT begin, IteratorT end)
 
PrimeSequenceoperator++ ()
 operator++() (prefix ++ operator) moves to the next prime in the sequence.
 
const Prime_Typeoperator* () const
 get the prime.
 

Detailed Description

template<typename IteratorT, class UniqueTrait = std::true_type>
class LinBox::PrimeSequence< IteratorT, UniqueTrait >

Adaptor class to make a fixed-length sequence behave like a PrimeIterator.

Member Typedef Documentation

◆ Prime_Type

template<typename IteratorT, class UniqueTrait = std::true_type>
using Prime_Type = typename std::remove_cv<typename std::remove_reference<decltype(*_cur)>::type>::type

◆ UniqueSamplingTag

template<typename IteratorT, class UniqueTrait = std::true_type>
using UniqueSamplingTag = UniqueTrait

◆ IteratorTag

template<typename IteratorT, class UniqueTrait = std::true_type>
using IteratorTag = IteratorCategories::DeterministicTag

Constructor & Destructor Documentation

◆ PrimeSequence()

template<typename IteratorT, class UniqueTrait = std::true_type>
PrimeSequence ( IteratorT begin,
IteratorT end )
inline

Member Function Documentation

◆ operator++()

template<typename IteratorT, class UniqueTrait = std::true_type>
PrimeSequence & operator++ ( )
inline

operator++() (prefix ++ operator) moves to the next prime in the sequence.

◆ operator*()

template<typename IteratorT, class UniqueTrait = std::true_type>
const Prime_Type & operator* ( ) const
inline

get the prime.

returns the actual prime.

Warning
a new prime is not generated.

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