Loading...
Searching...
No Matches
REvaluation Class Reference

class to generate random evaluation points More...

`#include <cf_reval.h>`

## Public Member Functions

| REvaluation ()
| REvaluation (int min0, int max0, const CFRandom &sample)
| REvaluation (const REvaluation &e)
| ~REvaluation ()
REvaluation & | operator= (const REvaluation &e)
void | nextpoint ()
void | nextpoint (int n)
| REvaluation ()
| REvaluation (int min0, int max0, const CFRandom &sample)
| REvaluation (const REvaluation &e)
| ~REvaluation ()
REvaluation & | operator= (const REvaluation &e)
void | nextpoint ()
void | nextpoint (int n)
| REvaluation ()
| REvaluation (int min0, int max0, const CFRandom &sample)
| REvaluation (const REvaluation &e)
| ~REvaluation ()
REvaluation & | operator= (const REvaluation &e)
void | nextpoint ()
void | nextpoint (int n)
Public Member Functions inherited from Evaluation
| Evaluation ()
| Evaluation (int min0, int max0)
| Evaluation (const Evaluation &e)
virtual | ~Evaluation ()
Evaluation & | operator= (const Evaluation &e)
int | min () const
int | max () const
CanonicalForm | operator[] (int i) const
CanonicalForm | operator[] (const Variable &v) const
CanonicalForm | operator() (const CanonicalForm &f) const
CanonicalForm | operator() (const CanonicalForm &f, int i, int j) const
void | setValue (int i, const CanonicalForm &f)
| Evaluation ()
| Evaluation (int min0, int max0)
| Evaluation (const Evaluation &e)
virtual | ~Evaluation ()
Evaluation & | operator= (const Evaluation &e)
int | min () const
int | max () const
CanonicalForm | operator[] (int i) const
CanonicalForm | operator[] (const Variable &v) const
CanonicalForm | operator() (const CanonicalForm &f) const
CanonicalForm | operator() (const CanonicalForm &f, int i, int j) const
void | setValue (int i, const CanonicalForm &f)
| Evaluation ()
| Evaluation (int min0, int max0)
| Evaluation (const Evaluation &e)
virtual | ~Evaluation ()
Evaluation & | operator= (const Evaluation &e)
int | min () const
int | max () const
CanonicalForm | operator[] (int i) const
CanonicalForm | operator[] (const Variable &v) const
CanonicalForm | operator() (const CanonicalForm &f) const
CanonicalForm | operator() (const CanonicalForm &f, int i, int j) const
void | setValue (int i, const CanonicalForm &f)

## Protected Attributes

CFRandom * | gen
Protected Attributes inherited from Evaluation
CFArray | values

## Detailed Description

class to generate random evaluation points

See also
  cf_eval.h

Definition at line 25 of file cf_reval.h.

## Constructor & Destructor Documentation

## REvaluation() [1/9]

REvaluation::REvaluation | ( |  | ) |

inline

Definition at line 30 of file cf_reval.h.

: Evaluation(), gen(0) {}
Evaluation::Evaluation
Evaluation()
Definition cf_eval.h:36
REvaluation::gen
CFRandom * gen
Definition cf_reval.h:28

## REvaluation() [2/9]

REvaluation::REvaluation | ( | int | min0,
|  | int | max0,
|  | const CFRandom & | sample )

inline

Definition at line 31 of file cf_reval.h.

: Evaluation( min0, max0 ), gen( sample.clone() ) {}
CFRandom::clone
virtual CFRandom * clone() const
Definition cf_random.h:25

## REvaluation() [3/9]

REvaluation::REvaluation | ( | const REvaluation & | e | ) |

Definition at line 15 of file cf_reval.cc.

:Evaluation()
{
if ( e.gen == 0 )
gen = 0;
else
gen = e.gen->clone();
values = e.values;
}
Evaluation::values
CFArray values
Definition cf_eval.h:34

## ~REvaluation() [1/3]

REvaluation::~REvaluation | ( |  | ) |

Definition at line 24 of file cf_reval.cc.

{
if ( gen != 0 )
delete gen;
}

## REvaluation() [4/9]

REvaluation::REvaluation | ( |  | ) |

inline

Definition at line 1040 of file factory.h.

: Evaluation(), gen(0) {}

## REvaluation() [5/9]

REvaluation::REvaluation | ( | int | min0,
|  | int | max0,
|  | const CFRandom & | sample )

inline

Definition at line 1041 of file factory.h.

: Evaluation( min0, max0 ), gen( sample.clone() ) {}

## REvaluation() [6/9]

REvaluation::REvaluation | ( | const REvaluation & | e | ) |

## ~REvaluation() [2/3]

REvaluation::~REvaluation | ( |  | ) |

## REvaluation() [7/9]

REvaluation::REvaluation | ( |  | ) |

inline

Definition at line 1040 of file factory.h.

: Evaluation(), gen(0) {}

## REvaluation() [8/9]

REvaluation::REvaluation | ( | int | min0,
|  | int | max0,
|  | const CFRandom & | sample )

inline

Definition at line 1041 of file factory.h.

: Evaluation( min0, max0 ), gen( sample.clone() ) {}

## REvaluation() [9/9]

REvaluation::REvaluation | ( | const REvaluation & | e | ) |

## ~REvaluation() [3/3]

REvaluation::~REvaluation | ( |  | ) |

## Member Function Documentation

## nextpoint() [1/6]

void REvaluation::nextpoint | ( |  | ) |

virtual

Reimplemented from Evaluation.

Definition at line 46 of file cf_reval.cc.

{
int n = values.max();
for ( int i = values.min(); i <= n; i++ )
values[i] = gen->generate();
}
i
int i
Definition cfEzgcd.cc:132

## nextpoint() [2/6]

void REvaluation::nextpoint | ( |  | ) |

virtual

Reimplemented from Evaluation.

## nextpoint() [3/6]

void REvaluation::nextpoint | ( |  | ) |

virtual

Reimplemented from Evaluation.

## nextpoint() [4/6]

void REvaluation::nextpoint | ( | int | n | ) |

Definition at line 54 of file cf_reval.cc.

{
int m= values.max();
int t= values.min();
for (int i= t; i <= m; i++)
values [i]= 0;
if (m == t)
{
values [t]= gen->generate();
return;
}
for (int i= 0; i < n; i++)
{
int l= factoryrandom (m - t + 1) + t;
values [l]= gen->generate();
}
}
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
factoryrandom
int factoryrandom(int n)
random integers with abs less than n
Definition cf_random.cc:177

## nextpoint() [5/6]

void REvaluation::nextpoint | ( | int | n | ) |

## nextpoint() [6/6]

void REvaluation::nextpoint | ( | int | n | ) |

## operator=() [1/3]

REvaluation & REvaluation::operator= | ( | const REvaluation & | e | ) |

Definition at line 31 of file cf_reval.cc.

{
if ( this != &e ) {
if (gen!=0)
delete gen;
values = e.values;
if ( e.gen == 0 )
gen = 0;
else
gen = e.gen->clone();
}
return *this;
}

## operator=() [2/3]

REvaluation & REvaluation::operator= | ( | const REvaluation & | e | ) |

## operator=() [3/3]

REvaluation & REvaluation::operator= | ( | const REvaluation & | e | ) |

## Field Documentation

## gen

CFRandom * REvaluation::gen

protected

Definition at line 28 of file cf_reval.h.

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

- factory/cf_reval.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_reval.cc