Loading...
Searching...
No Matches
Evaluation Class Reference

class to evaluate a polynomial at points More...

`#include <cf_eval.h>`

## Public Member Functions

| 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)
virtual void | nextpoint ()
| 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)
virtual void | nextpoint ()
| 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)
virtual void | nextpoint ()

## Protected Attributes

CFArray | values

## Friends

OSTREAM & | operator<< (OSTREAM &s, const Evaluation &e)
OSTREAM & | operator<< (OSTREAM &s, const Evaluation &e)
OSTREAM & | operator<< (OSTREAM &s, const Evaluation &e)

## Detailed Description

class to evaluate a polynomial at points

inline CanonicalForm abs ( const CanonicalForm & f )

abs() - return absolute value of `f'.

The absolute value is defined in terms of the function sign()'. If it reports negative sign for f' than -f' is returned, otherwise f'.

This behaviour is most useful for integers and rationals. But it may be used to sign-normalize the leading coefficient of arbitrary polynomials, too.

## Type info:

f: CurrentPP

**/ inline CanonicalForm abs ( const CanonicalForm & f ) { it is not only more general to use sign()' instead of a // direct comparison f < 0', it is faster, too if ( sign( f ) < 0 ) return -f; else return f; } }}}

/* stuff included from ./cf_eval.h class to evaluate a polynomial at points

abs() - return absolute value of `f'.

The absolute value is defined in terms of the function sign()'. If it reports negative sign for f' than -f' is returned, otherwise f'.

This behaviour is most useful for integers and rationals. But it may be used to sign-normalize the leading coefficient of arbitrary polynomials, too.

## Type info:

f: CurrentPP

**/ inline CanonicalForm abs ( const CanonicalForm & f ) { it is not only more general to use sign()' instead of a // direct comparison f < 0', it is faster, too if ( sign( f ) < 0 ) return -f; else return f; } }}}

/* stuff included from ./cf_eval.h class to evaluate a polynomial at points

Definition at line 31 of file cf_eval.h.

## Constructor & Destructor Documentation

## Evaluation() [1/9]

Evaluation::Evaluation | ( |  | ) |

inline

Definition at line 36 of file cf_eval.h.

: values() {}
Evaluation::values
CFArray values
Definition cf_eval.h:34

## Evaluation() [2/9]

Evaluation::Evaluation | ( | int | min0,
|  | int | max0 )

inline

Definition at line 37 of file cf_eval.h.

: values( min0, max0 ) {}

## Evaluation() [3/9]

Evaluation::Evaluation | ( | const Evaluation & | e | ) |

inline

Definition at line 38 of file cf_eval.h.

: values( e.values ) {}

## ~Evaluation() [1/3]

virtual Evaluation::~Evaluation | ( |  | ) |

inline virtual

Definition at line 39 of file cf_eval.h.

{}

## Evaluation() [4/9]

Evaluation::Evaluation | ( |  | ) |

inline

Definition at line 661 of file factory.h.

: values() {}

## Evaluation() [5/9]

Evaluation::Evaluation | ( | int | min0,
|  | int | max0 )

inline

Definition at line 662 of file factory.h.

: values( min0, max0 ) {}

## Evaluation() [6/9]

Evaluation::Evaluation | ( | const Evaluation & | e | ) |

inline

Definition at line 663 of file factory.h.

: values( e.values ) {}

## ~Evaluation() [2/3]

virtual Evaluation::~Evaluation | ( |  | ) |

inline virtual

Definition at line 664 of file factory.h.

{}

## Evaluation() [7/9]

Evaluation::Evaluation | ( |  | ) |

inline

Definition at line 661 of file factory.h.

: values() {}

## Evaluation() [8/9]

Evaluation::Evaluation | ( | int | min0,
|  | int | max0 )

inline

Definition at line 662 of file factory.h.

: values( min0, max0 ) {}

## Evaluation() [9/9]

Evaluation::Evaluation | ( | const Evaluation & | e | ) |

inline

Definition at line 663 of file factory.h.

: values( e.values ) {}

## ~Evaluation() [3/3]

virtual Evaluation::~Evaluation | ( |  | ) |

inline virtual

Definition at line 664 of file factory.h.

{}

## Member Function Documentation

## max() [1/3]

int Evaluation::max | ( |  | ) | const

inline

Definition at line 42 of file cf_eval.h.

{ return values.max(); }

## max() [2/3]

int Evaluation::max | ( |  | ) | const

inline

Definition at line 667 of file factory.h.

{ return values.max(); }

## max() [3/3]

int Evaluation::max | ( |  | ) | const

inline

Definition at line 667 of file factory.h.

{ return values.max(); }

## min() [1/3]

int Evaluation::min | ( |  | ) | const

inline

Definition at line 41 of file cf_eval.h.

{ return values.min(); }

## min() [2/3]

int Evaluation::min | ( |  | ) | const

inline

Definition at line 666 of file factory.h.

{ return values.min(); }

## min() [3/3]

int Evaluation::min | ( |  | ) | const

inline

Definition at line 666 of file factory.h.

{ return values.min(); }

## nextpoint() [1/3]

void Evaluation::nextpoint | ( |  | ) |

virtual

Reimplemented in REvaluation, REvaluation, and REvaluation.

Definition at line 43 of file cf_eval.cc.

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

## nextpoint() [2/3]

virtual void Evaluation::nextpoint | ( |  | ) |

virtual

Reimplemented in REvaluation, REvaluation, and REvaluation.

## nextpoint() [3/3]

virtual void Evaluation::nextpoint | ( |  | ) |

virtual

Reimplemented in REvaluation, REvaluation, and REvaluation.

## operator()() [1/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f | ) | const

Definition at line 24 of file cf_eval.cc.

{
if ( f.inCoeffDomain() || f.level() < values.min() )
return f;
else if ( f.level() < values.max() )
return evalCF( f, values, values.min(), f.level() );
else
return evalCF( f, values, values.min(), values.max() );
}
evalCF
static CanonicalForm evalCF(const CanonicalForm &f, const CFArray &a, int m, int n)
Definition cf_eval.cc:68
f
FILE * f
Definition checklibs.c:9

## operator()() [2/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f | ) | const

## operator()() [3/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f | ) | const

## operator()() [4/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f,
|  | int | i,
|  | int | j ) const

Definition at line 35 of file cf_eval.cc.

{
if ( i > j )
return f;
return evalCF( f, values, i, j );
}
j
int j
Definition facHensel.cc:110

## operator()() [5/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f,
|  | int | i,
|  | int | j ) const

## operator()() [6/6]

CanonicalForm Evaluation::operator() | ( | const CanonicalForm & | f,
|  | int | i,
|  | int | j ) const

## operator=() [1/3]

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

Definition at line 15 of file cf_eval.cc.

{
if ( this != &e ) {
values = e.values;
}
return *this;
}

## operator=() [2/3]

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

## operator=() [3/3]

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

## operator[]() [1/6]

CanonicalForm Evaluation::operator[] | ( | const Variable & | v | ) | const

inline

Definition at line 44 of file cf_eval.h.

{ return operator[](v.level()); }
Evaluation::operator[]
CanonicalForm operator[](int i) const
Definition cf_eval.h:43
Variable::level
int level() const
Definition factory.h:143
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39

## operator[]() [2/6]

CanonicalForm Evaluation::operator[] | ( | const Variable & | v | ) | const

inline

Definition at line 669 of file factory.h.

{ return operator[](v.level()); }

## operator[]() [3/6]

CanonicalForm Evaluation::operator[] | ( | const Variable & | v | ) | const

inline

Definition at line 669 of file factory.h.

{ return operator[](v.level()); }

## operator[]() [4/6]

CanonicalForm Evaluation::operator[] | ( | int | i | ) | const

inline

Definition at line 43 of file cf_eval.h.

{ return values[i]; }

## operator[]() [5/6]

CanonicalForm Evaluation::operator[] | ( | int | i | ) | const

inline

Definition at line 668 of file factory.h.

{ return values[i]; }

## operator[]() [6/6]

CanonicalForm Evaluation::operator[] | ( | int | i | ) | const

inline

Definition at line 668 of file factory.h.

{ return values[i]; }

## setValue() [1/3]

void Evaluation::setValue | ( | int | i,
|  | const CanonicalForm & | f )

Definition at line 51 of file cf_eval.cc.

{
if (i < values.min() || i > values.max())
return;
values[i]= f;
}

## setValue() [2/3]

void Evaluation::setValue | ( | int | i,
|  | const CanonicalForm & | f )

## setValue() [3/3]

void Evaluation::setValue | ( | int | i,
|  | const CanonicalForm & | f )

## Friends And Related Symbol Documentation

## operator<< [1/3]

OSTREAM & operator<< | ( | OSTREAM & | s,
|  | const Evaluation & | e )

friend

Definition at line 59 of file cf_eval.cc.

{
e.values.print(s);
return s;
}
Array::print
void print(OSTREAM &) const
Definition ftmpl_array.cc:138
s
const CanonicalForm int s
Definition facAbsFact.cc:51

## operator<< [2/3]

OSTREAM & operator<< | ( | OSTREAM & | s,
|  | const Evaluation & | e )

friend

Definition at line 59 of file cf_eval.cc.

{
e.values.print(s);
return s;
}

## operator<< [3/3]

OSTREAM & operator<< | ( | OSTREAM & | s,
|  | const Evaluation & | e )

friend

Definition at line 59 of file cf_eval.cc.

{
e.values.print(s);
return s;
}

## Field Documentation

## values

CFArray Evaluation::values

protected

Definition at line 34 of file cf_eval.h.

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

- factory/cf_eval.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_eval.cc