spielwiese
Last change
on this file since 38ac8c was
38ac8c,
checked in by Martin Lee <martinlee84@…>, 12 years ago
|
added new function to get random eval point
added new function to set value of an evaluation point
git-svn-id: file:///usr/local/Singular/svn/trunk@14247 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id$ */ |
---|
3 | |
---|
4 | #ifndef INCL_CF_EVAL_H |
---|
5 | #define INCL_CF_EVAL_H |
---|
6 | |
---|
7 | #include <config.h> |
---|
8 | |
---|
9 | #ifndef NOSTREAMIO |
---|
10 | #ifdef HAVE_IOSTREAM |
---|
11 | #include <iostream> |
---|
12 | #define OSTREAM std::ostream |
---|
13 | #elif defined(HAVE_IOSTREAM_H) |
---|
14 | #include <iostream.h> |
---|
15 | #define OSTREAM ostream |
---|
16 | #endif |
---|
17 | #endif /* NOSTREAMIO */ |
---|
18 | |
---|
19 | #include "canonicalform.h" |
---|
20 | |
---|
21 | /*BEGINPUBLIC*/ |
---|
22 | |
---|
23 | class Evaluation |
---|
24 | { |
---|
25 | protected: |
---|
26 | CFArray values; |
---|
27 | public: |
---|
28 | Evaluation() : values() {} |
---|
29 | Evaluation( int min0, int max0 ) : values( min0, max0 ) {} |
---|
30 | Evaluation( const Evaluation & e ) : values( e.values ) {} |
---|
31 | virtual ~Evaluation() {} |
---|
32 | Evaluation& operator= ( const Evaluation & e ); |
---|
33 | int min() const { return values.min(); } |
---|
34 | int max() const { return values.max(); } |
---|
35 | CanonicalForm operator[] ( int i ) const { return values[i]; } |
---|
36 | CanonicalForm operator[] ( const Variable & v ) const { return operator[](v.level()); } |
---|
37 | CanonicalForm operator() ( const CanonicalForm& f ) const; |
---|
38 | CanonicalForm operator() ( const CanonicalForm & f, int i, int j ) const; |
---|
39 | void setValue (int i, const CanonicalForm& f); |
---|
40 | virtual void nextpoint(); |
---|
41 | #ifndef NOSTREAMIO |
---|
42 | friend OSTREAM& operator<< ( OSTREAM& s, const Evaluation &e ); |
---|
43 | #endif /* NOSTREAMIO */ |
---|
44 | }; |
---|
45 | |
---|
46 | /*ENDPUBLIC*/ |
---|
47 | |
---|
48 | #endif /* ! INCL_CF_EVAL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.