1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | #ifndef INCL_CF_FACTORY_H |
---|
4 | #define INCL_CF_FACTORY_H |
---|
5 | |
---|
6 | // #include "config.h" |
---|
7 | |
---|
8 | #include "cf_defs.h" |
---|
9 | #include "variable.h" |
---|
10 | |
---|
11 | #include <factory/cf_gmp.h> |
---|
12 | |
---|
13 | class InternalCF; |
---|
14 | class CanonicalForm; |
---|
15 | |
---|
16 | class CFFactory |
---|
17 | { |
---|
18 | private: |
---|
19 | static int currenttype; |
---|
20 | public: |
---|
21 | static int gettype () { return currenttype; } |
---|
22 | static void settype ( int type ); |
---|
23 | static InternalCF * basic ( long value ); |
---|
24 | static InternalCF * basic ( int type, long value ); |
---|
25 | static InternalCF * basic ( const char * str ); |
---|
26 | static InternalCF * basic ( const char * str, int base ); |
---|
27 | static InternalCF * basic ( int type, const char * const str ); |
---|
28 | static InternalCF * basic ( int type, long value, bool nonimm ); |
---|
29 | static InternalCF * basic ( const mpz_ptr num ); |
---|
30 | static InternalCF * rational ( long num, long den ); |
---|
31 | static InternalCF * rational ( const mpz_ptr num, const mpz_ptr den, bool normalize ); |
---|
32 | static InternalCF * poly ( const Variable & v, int exp, const CanonicalForm & c ); |
---|
33 | static InternalCF * poly ( const Variable & v, int exp = 1 ); |
---|
34 | }; |
---|
35 | |
---|
36 | mpz_ptr getmpi ( InternalCF * value, bool symmetric = true ); |
---|
37 | void getmpi ( InternalCF * value, mpz_t mpi); |
---|
38 | |
---|
39 | #endif /* ! INCL_CF_FACTORY_H */ |
---|