linbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
MaskedPrimeIterator< Trait > Class Template Reference

Masked Prime Iterator. More...

#include <random-prime.h>

+ Inheritance diagram for MaskedPrimeIterator< Trait >:
+ Collaboration diagram for MaskedPrimeIterator< Trait >:

Public Types

typedef UniqueSamplingTrait< Trait > UniqueSamplingTag
 whether a prime can be picked more than once
 

Public Member Functions

const Prime_Type & operator* () const
 get the random prime. More...
 
void setBits (uint64_t bits)
 Sets the bit size. More...
 

Static Public Member Functions

static void setSeed (uint64_t ul)
 Sets the seed. More...
 

Protected Attributes

uint64_t _bits
 common lenght of all primes
 
integer _prime
 the generated prime. More...
 
Givaro::IntPrimeDom _IPD
 empty struct dealing with primality. More...
 

Detailed Description

template<class Trait = IteratorCategories::HeuristicTag>
class LinBox::MaskedPrimeIterator< Trait >

Masked Prime Iterator.

Generates prime of specified length with fixed lower bits

Member Function Documentation

◆ operator*()

const Prime_Type& operator* ( ) const
inlineinherited

get the random prime.

returns the actual prime.

Warning
a new prime is not generated.

◆ setSeed()

static void setSeed ( uint64_t  ul)
inlinestaticinherited

Sets the seed.

Set the random seed to be ul.

Parameters
ulthe new seed.

◆ setBits()

void setBits ( uint64_t  bits)
inlineinherited

Sets the bit size.

Parameters
bitsthe new bit size.

Field Documentation

◆ _prime

integer _prime
protectedinherited

the generated prime.

◆ _IPD

Givaro::IntPrimeDom _IPD
protectedinherited

empty struct dealing with primality.


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