Public Member Functions | Private Attributes
IntRandom Class Reference

generate random integers More...

#include <cf_random.h>

Public Member Functions

 IntRandom ()
 
 IntRandom (int m)
 
 ~IntRandom ()
 
CanonicalForm generate () const
 
CFRandomclone () const
 
 IntRandom ()
 
 IntRandom (int m)
 
 ~IntRandom ()
 
CanonicalForm generate () const
 
CFRandomclone () const
 
 IntRandom ()
 
 IntRandom (int m)
 
 ~IntRandom ()
 
CanonicalForm generate () const
 
CFRandomclone () const
 
- Public Member Functions inherited from CFRandom
virtual ~CFRandom ()
 
virtual ~CFRandom ()
 
virtual ~CFRandom ()
 

Private Attributes

int max
 

Detailed Description

generate random integers

Definition at line 55 of file cf_random.h.

Constructor & Destructor Documentation

IntRandom::IntRandom ( )

Definition at line 79 of file cf_random.cc.

80 {
81  max = 50;
82 }
int max
Definition: cf_random.h:58
IntRandom::IntRandom ( int  m)

Definition at line 84 of file cf_random.cc.

85 {
86  max = m;
87 }
int max
Definition: cf_random.h:58
int m
Definition: cfEzgcd.cc:119
IntRandom::~IntRandom ( )

Definition at line 89 of file cf_random.cc.

89 {}
IntRandom::IntRandom ( )
IntRandom::IntRandom ( int  m)
IntRandom::~IntRandom ( )
IntRandom::IntRandom ( )
IntRandom::IntRandom ( int  m)
IntRandom::~IntRandom ( )

Member Function Documentation

CFRandom * IntRandom::clone ( ) const
virtual

Reimplemented from CFRandom.

Definition at line 96 of file cf_random.cc.

97 {
98  return new IntRandom( max );
99 }
int max
Definition: cf_random.h:58
CFRandom* IntRandom::clone ( ) const
virtual

Reimplemented from CFRandom.

CFRandom* IntRandom::clone ( ) const
virtual

Reimplemented from CFRandom.

CanonicalForm IntRandom::generate ( ) const
virtual

Reimplemented from CFRandom.

Definition at line 91 of file cf_random.cc.

92 {
93  return factoryrandom( 2*max )-max;
94 }
int factoryrandom(int n)
random integers with abs less than n
Definition: cf_random.cc:168
int max
Definition: cf_random.h:58
CanonicalForm IntRandom::generate ( ) const
virtual

Reimplemented from CFRandom.

CanonicalForm IntRandom::generate ( ) const
virtual

Reimplemented from CFRandom.

Field Documentation

int IntRandom::max
private

Definition at line 58 of file cf_random.h.


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