1 | |
---|
2 | #ifndef INCL_CF_GEVAL_H |
---|
3 | #define INCL_CF_GEVAL_H |
---|
4 | // -*- c++ -*- |
---|
5 | //***************************************************************************** |
---|
6 | /** @file cfGEval.h |
---|
7 | * |
---|
8 | * @author Martin Lee |
---|
9 | * @date 22.03.2011 |
---|
10 | * |
---|
11 | * This file defines a class GEvaluation derived from Evaluation, which |
---|
12 | * generates all points in K^m. |
---|
13 | * |
---|
14 | * @par Copyright: |
---|
15 | * (c) by The SINGULAR Team, see LICENSE file |
---|
16 | * |
---|
17 | * @internal |
---|
18 | * @version \$Id$ |
---|
19 | * |
---|
20 | **/ |
---|
21 | //***************************************************************************** |
---|
22 | #include <config.h> |
---|
23 | |
---|
24 | #include "canonicalform.h" |
---|
25 | #include "cf_generator.h" |
---|
26 | #include "cf_eval.h" |
---|
27 | |
---|
28 | /** @class GEvaluation |
---|
29 | * |
---|
30 | * GEvaluation is a class derived from @a Evaluation, which can generate all |
---|
31 | * points in K^m, where K is either Z/p, Z/p(alpha) or GF. |
---|
32 | * @sa Evaluation, REvaluation |
---|
33 | */ |
---|
34 | |
---|
35 | class GEvaluation: public Evaluation |
---|
36 | { |
---|
37 | private: |
---|
38 | /// array to hold the generators |
---|
39 | CFGenerator** gen; |
---|
40 | public: |
---|
41 | /// default constructor |
---|
42 | GEvaluation (): Evaluation(), gen(0) {} |
---|
43 | |
---|
44 | /// construct an evaluation containing max0-min0 points using a generator |
---|
45 | /// sample of the field K |
---|
46 | GEvaluation (int min0,///<[in] lowest index of array that stores the points |
---|
47 | int max0,///<[in] highest index of array that stores the points |
---|
48 | const CFGenerator & sample ///< [in] generator of the ground |
---|
49 | ///< field |
---|
50 | ); |
---|
51 | |
---|
52 | /// copy constructor |
---|
53 | GEvaluation (const GEvaluation& e); |
---|
54 | |
---|
55 | /// destructor |
---|
56 | ~GEvaluation(); |
---|
57 | |
---|
58 | /// assignment |
---|
59 | GEvaluation& operator= (const GEvaluation& e); |
---|
60 | |
---|
61 | /// get a new point with n non zero components |
---|
62 | /// @return returns false if there is no next point, true otherwise |
---|
63 | bool nextpoint (int n ///<[in] some int |
---|
64 | ); |
---|
65 | |
---|
66 | /// reset values to zero and reset generators |
---|
67 | void reset(); |
---|
68 | |
---|
69 | /// initialise with n non zero components |
---|
70 | void init (int n ///<[in] should be <= values.max()-values.min() |
---|
71 | ); |
---|
72 | }; |
---|
73 | |
---|
74 | #endif |
---|
75 | |
---|