My Project
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)
 
OSTREAMoperator<< (OSTREAM &s, const Evaluation &e)
 
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() {}
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.

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 661 of file factory.h.

661: values() {}

◆ Evaluation() [5/9]

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

Definition at line 662 of file factory.h.

662: values( min0, max0 ) {}

◆ Evaluation() [6/9]

Evaluation::Evaluation ( const Evaluation e)
inline

Definition at line 663 of file factory.h.

663: values( e.values ) {}

◆ ~Evaluation() [2/3]

virtual Evaluation::~Evaluation ( )
inlinevirtual

Definition at line 664 of file factory.h.

664{}

◆ Evaluation() [7/9]

Evaluation::Evaluation ( )
inline

Definition at line 661 of file factory.h.

661: values() {}

◆ Evaluation() [8/9]

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

Definition at line 662 of file factory.h.

662: values( min0, max0 ) {}

◆ Evaluation() [9/9]

Evaluation::Evaluation ( const Evaluation e)
inline

Definition at line 663 of file factory.h.

663: values( e.values ) {}

◆ ~Evaluation() [3/3]

virtual Evaluation::~Evaluation ( )
inlinevirtual

Definition at line 664 of file factory.h.

664{}

Member Function Documentation

◆ max() [1/3]

int Evaluation::max ( ) const
inline

Definition at line 42 of file cf_eval.h.

42{ return values.max(); }
int max() const
Definition: ftmpl_array.cc:104

◆ max() [2/3]

int Evaluation::max ( ) const
inline

Definition at line 667 of file factory.h.

667{ return values.max(); }

◆ max() [3/3]

int Evaluation::max ( ) const
inline

Definition at line 667 of file factory.h.

667{ return values.max(); }

◆ min() [1/3]

int Evaluation::min ( ) const
inline

Definition at line 41 of file cf_eval.h.

41{ return values.min(); }
int min() const
Definition: ftmpl_array.cc:98

◆ min() [2/3]

int Evaluation::min ( ) const
inline

Definition at line 666 of file factory.h.

666{ return values.min(); }

◆ min() [3/3]

int Evaluation::min ( ) const
inline

Definition at line 666 of file factory.h.

666{ 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}
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.

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}
static CanonicalForm evalCF(const CanonicalForm &f, const CFArray &a, int m, int n)
Definition: cf_eval.cc:68
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.

36{
37 if ( i > j )
38 return f;
39 return evalCF( f, values, i, j );
40}
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.

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()); }
CanonicalForm operator[](int i) const
Definition: cf_eval.h:43
int level() const
Definition: factory.h:143
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.

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

◆ operator[]() [3/6]

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

Definition at line 669 of file factory.h.

669{ 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 668 of file factory.h.

668{ return values[i]; }

◆ operator[]() [6/6]

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

Definition at line 668 of file factory.h.

668{ 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<< [1/3]

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

Definition at line 59 of file cf_eval.cc.

61{
62 e.values.print(s);
63 return s;
64}
void print(OSTREAM &) const
Definition: ftmpl_array.cc:138
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.

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

◆ operator<< [3/3]

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

Definition at line 59 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: