My Project  debian-1:4.1.1-p2+ds-4
Public Member Functions | Protected Attributes | Friends
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 ()
 
Evaluationoperator= (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 ()
 
Evaluationoperator= (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 ()
 
Evaluationoperator= (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

OSTREAMoperator<< (OSTREAM &s, const Evaluation &e)
 

Detailed Description

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.

36 : values() {}

◆ Evaluation() [2/9]

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

Definition at line 37 of file cf_eval.h.

37 : values( min0, max0 ) {}

◆ Evaluation() [3/9]

Evaluation::Evaluation ( const Evaluation e)
inline

Definition at line 38 of file cf_eval.h.

38 : values( e.values ) {}

◆ ~Evaluation() [1/3]

virtual Evaluation::~Evaluation ( )
inlinevirtual

Definition at line 39 of file cf_eval.h.

39 {}

◆ Evaluation() [4/9]

Evaluation::Evaluation ( )
inline

Definition at line 649 of file factory.h.

649 : values() {}

◆ Evaluation() [5/9]

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

Definition at line 650 of file factory.h.

650 : values( min0, max0 ) {}

◆ Evaluation() [6/9]

Evaluation::Evaluation ( const Evaluation e)
inline

Definition at line 651 of file factory.h.

651 : values( e.values ) {}

◆ ~Evaluation() [2/3]

virtual Evaluation::~Evaluation ( )
inlinevirtual

Definition at line 652 of file factory.h.

652 {}

◆ Evaluation() [7/9]

Evaluation::Evaluation ( )
inline

Definition at line 649 of file factory.h.

649 : values() {}

◆ Evaluation() [8/9]

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

Definition at line 650 of file factory.h.

650 : values( min0, max0 ) {}

◆ Evaluation() [9/9]

Evaluation::Evaluation ( const Evaluation e)
inline

Definition at line 651 of file factory.h.

651 : values( e.values ) {}

◆ ~Evaluation() [3/3]

virtual Evaluation::~Evaluation ( )
inlinevirtual

Definition at line 652 of file factory.h.

652 {}

Member Function Documentation

◆ max() [1/3]

int Evaluation::max ( ) const
inline

Definition at line 42 of file cf_eval.h.

42 { return values.max(); }

◆ max() [2/3]

int Evaluation::max ( ) const
inline

Definition at line 655 of file factory.h.

655 { return values.max(); }

◆ max() [3/3]

int Evaluation::max ( ) const
inline

Definition at line 655 of file factory.h.

655 { return values.max(); }

◆ min() [1/3]

int Evaluation::min ( ) const
inline

Definition at line 41 of file cf_eval.h.

41 { return values.min(); }

◆ min() [2/3]

int Evaluation::min ( ) const
inline

Definition at line 654 of file factory.h.

654 { return values.min(); }

◆ min() [3/3]

int Evaluation::min ( ) const
inline

Definition at line 654 of file factory.h.

654 { 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.

44 {
45  int n = values.max();
46  for ( int i = values.min(); i <= n; i++ )
47  values[i] += 1;
48 }

◆ 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.

25 {
26  if ( f.inCoeffDomain() || f.level() < values.min() )
27  return f;
28  else if ( f.level() < values.max() )
29  return evalCF( f, values, values.min(), f.level() );
30  else
31  return evalCF( f, values, values.min(), values.max() );
32 }

◆ 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.

36 {
37  if ( i > j )
38  return f;
39  return evalCF( f, values, i, j );
40 }

◆ 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.

16 {
17  if ( this != &e ) {
18  values = e.values;
19  }
20  return *this;
21 }

◆ 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.

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

◆ operator[]() [2/6]

CanonicalForm Evaluation::operator[] ( const Variable v) const
inline

Definition at line 657 of file factory.h.

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

◆ operator[]() [3/6]

CanonicalForm Evaluation::operator[] ( const Variable v) const
inline

Definition at line 657 of file factory.h.

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

◆ operator[]() [4/6]

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

Definition at line 43 of file cf_eval.h.

43 { return values[i]; }

◆ operator[]() [5/6]

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

Definition at line 656 of file factory.h.

656 { return values[i]; }

◆ operator[]() [6/6]

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

Definition at line 656 of file factory.h.

656 { return values[i]; }

◆ setValue() [1/3]

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

Definition at line 51 of file cf_eval.cc.

52 {
53  if (i < values.min() || i > values.max())
54  return;
55  values[i]= f;
56 }

◆ 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 Function Documentation

◆ operator<<

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

Definition at line 60 of file cf_eval.cc.

61 {
62  e.values.print(s);
63  return s;
64 }

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:
Evaluation::values
CFArray values
Definition: cf_eval.h:34
j
int j
Definition: facHensel.cc:105
f
FILE * f
Definition: checklibs.c:9
Array::print
void print(OSTREAM &) const
Definition: ftmpl_array.cc:138
Array::min
int min() const
Definition: ftmpl_array.cc:98
i
int i
Definition: cfEzgcd.cc:125
Array::max
int max() const
Definition: ftmpl_array.cc:104
Variable::level
int level() const
Definition: factory.h:134
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
Evaluation::operator[]
CanonicalForm operator[](int i) const
Definition: cf_eval.h:43
evalCF
static CanonicalForm evalCF(const CanonicalForm &f, const CFArray &a, int m, int n)
Definition: cf_eval.cc:68