My Project
Loading...
Searching...
No Matches
Public Member Functions
GFRandom Class Reference

generate random elements in GF More...

#include <cf_random.h>

Public Member Functions

 GFRandom ()
 
 ~GFRandom ()
 
CanonicalForm generate () const
 
CFRandomclone () const
 
- Public Member Functions inherited from CFRandom
virtual ~CFRandom ()
 
virtual CanonicalForm generate () const
 
virtual CFRandomclone () const
 

Detailed Description

generate random elements in GF

Definition at line 31 of file cf_random.h.

Constructor & Destructor Documentation

◆ GFRandom()

GFRandom::GFRandom ( )
inline

Definition at line 34 of file cf_random.h.

34{};

◆ ~GFRandom()

GFRandom::~GFRandom ( )
inline

Definition at line 35 of file cf_random.h.

35{}

Member Function Documentation

◆ clone()

CFRandom * GFRandom::clone ( ) const
virtual

Reimplemented from CFRandom.

Definition at line 85 of file cf_random.cc.

86{
87 return new GFRandom();
88}
GFRandom()
Definition: cf_random.h:34

◆ generate()

CanonicalForm GFRandom::generate ( ) const
virtual

Reimplemented from CFRandom.

Definition at line 78 of file cf_random.cc.

79{
80 int i= factoryrandom( gf_q );
81 if ( i == gf_q1 ) i++;
82 return CanonicalForm( int2imm_gf( i ) );
83}
int i
Definition: cfEzgcd.cc:132
int factoryrandom(int n)
random integers with abs less than n
Definition: cf_random.cc:180
factory's main class
Definition: canonicalform.h:86
VAR int gf_q
Definition: gfops.cc:47
VAR int gf_q1
Definition: gfops.cc:50
InternalCF * int2imm_gf(long i)
Definition: imm.h:106

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