Loading...
Searching...
No Matches
IntRandom Class Reference

generate random integers More...

`#include <cf_random.h>`

## Public Member Functions

| IntRandom ()
| IntRandom (int m)
| ~IntRandom ()
CanonicalForm | generate () const
CFRandom * | clone () const
| IntRandom ()
| IntRandom (int m)
| ~IntRandom ()
CanonicalForm | generate () const
CFRandom * | clone () const
| IntRandom ()
| IntRandom (int m)
| ~IntRandom ()
CanonicalForm | generate () const
CFRandom * | clone () 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() [1/6]

IntRandom::IntRandom | ( |  | ) |

Definition at line 88 of file cf_random.cc.

{
max = 50;
}
IntRandom::max
int max
Definition cf_random.h:58

## IntRandom() [2/6]

IntRandom::IntRandom | ( | int | m | ) |

Definition at line 93 of file cf_random.cc.

{
max = m;
}
m
int m
Definition cfEzgcd.cc:128

## ~IntRandom() [1/3]

IntRandom::~IntRandom | ( |  | ) |

Definition at line 98 of file cf_random.cc.

{}

## IntRandom() [3/6]

IntRandom::IntRandom | ( |  | ) |

## IntRandom() [4/6]

IntRandom::IntRandom | ( | int | m | ) |

## ~IntRandom() [2/3]

IntRandom::~IntRandom | ( |  | ) |

## IntRandom() [5/6]

IntRandom::IntRandom | ( |  | ) |

## IntRandom() [6/6]

IntRandom::IntRandom | ( | int | m | ) |

## ~IntRandom() [3/3]

IntRandom::~IntRandom | ( |  | ) |

## Member Function Documentation

## clone() [1/3]

CFRandom * IntRandom::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

Definition at line 105 of file cf_random.cc.

{
return new IntRandom( max );
}
IntRandom::IntRandom
IntRandom()
Definition cf_random.cc:88

## clone() [2/3]

CFRandom * IntRandom::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## clone() [3/3]

CFRandom * IntRandom::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## generate() [1/3]

CanonicalForm IntRandom::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

Definition at line 100 of file cf_random.cc.

{
return factoryrandom( 2*max )-max;
}
factoryrandom
int factoryrandom(int n)
random integers with abs less than n
Definition cf_random.cc:177

## generate() [2/3]

CanonicalForm IntRandom::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## generate() [3/3]

CanonicalForm IntRandom::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## Field Documentation

## max

int IntRandom::max

private

Definition at line 58 of file cf_random.h.

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

- factory/cf_random.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_random.cc