spielwiese
Release-4-3-2p1
Last change
on this file was
abddbe,
checked in by Martin Lee <martinlee84@…>, 9 years ago
|
chg: added brief descriptions to some files
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | /** |
---|
4 | * @file cf_eval.h |
---|
5 | * |
---|
6 | * evaluate polynomials at points |
---|
7 | **/ |
---|
8 | |
---|
9 | #ifndef INCL_CF_EVAL_H |
---|
10 | #define INCL_CF_EVAL_H |
---|
11 | |
---|
12 | // #include "config.h" |
---|
13 | |
---|
14 | #ifndef NOSTREAMIO |
---|
15 | #ifdef HAVE_IOSTREAM |
---|
16 | #include <iostream> |
---|
17 | #define OSTREAM std::ostream |
---|
18 | #elif defined(HAVE_IOSTREAM_H) |
---|
19 | #include <iostream.h> |
---|
20 | #define OSTREAM ostream |
---|
21 | #endif |
---|
22 | #endif /* NOSTREAMIO */ |
---|
23 | |
---|
24 | #include "canonicalform.h" |
---|
25 | |
---|
26 | /*BEGINPUBLIC*/ |
---|
27 | |
---|
28 | /** |
---|
29 | * class to evaluate a polynomial at points |
---|
30 | **/ |
---|
31 | class Evaluation |
---|
32 | { |
---|
33 | protected: |
---|
34 | CFArray values; |
---|
35 | public: |
---|
36 | Evaluation() : values() {} |
---|
37 | Evaluation( int min0, int max0 ) : values( min0, max0 ) {} |
---|
38 | Evaluation( const Evaluation & e ) : values( e.values ) {} |
---|
39 | virtual ~Evaluation() {} |
---|
40 | Evaluation& operator= ( const Evaluation & e ); |
---|
41 | int min() const { return values.min(); } |
---|
42 | int max() const { return values.max(); } |
---|
43 | CanonicalForm operator[] ( int i ) const { return values[i]; } |
---|
44 | CanonicalForm operator[] ( const Variable & v ) const { return operator[](v.level()); } |
---|
45 | CanonicalForm operator() ( const CanonicalForm& f ) const; |
---|
46 | CanonicalForm operator() ( const CanonicalForm & f, int i, int j ) const; |
---|
47 | void setValue (int i, const CanonicalForm& f); |
---|
48 | virtual void nextpoint(); |
---|
49 | #ifndef NOSTREAMIO |
---|
50 | friend OSTREAM& operator<< ( OSTREAM& s, const Evaluation &e ); |
---|
51 | #endif /* NOSTREAMIO */ |
---|
52 | }; |
---|
53 | |
---|
54 | /*ENDPUBLIC*/ |
---|
55 | |
---|
56 | #endif /* ! INCL_CF_EVAL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.