My Project  debian-1:4.1.1-p2+ds-4build2
cf_factory.h
Go to the documentation of this file.
1 /* emacs edit mode for this file is -*- C++ -*- */
2 
3 /**
4  * @file cf_factory.h
5  *
6  * Interface to generate InternalCF's over various domains from intrinsic types
7  * or mpz_t's
8 **/
9 #ifndef INCL_CF_FACTORY_H
10 #define INCL_CF_FACTORY_H
11 
12 // #include "config.h"
13 
14 #include "cf_defs.h"
15 #include "variable.h"
16 
17 #include "factory/cf_gmp.h"
18 #include "cf_assert.h"
19 
20 class InternalCF;
21 class CanonicalForm;
22 
23 class CFFactory
24 {
25 private:
26  static int currenttype;
27 public:
28  static int gettype () { return currenttype; }
29  static void settype ( int type )
30  {
31  ASSERT( type==FiniteFieldDomain || type==GaloisFieldDomain || type==IntegerDomain || type==RationalDomain, "illegal basic domain!" );
32  currenttype = type;
33  };
34  static InternalCF * basic ( long value );
35  static InternalCF * basic ( int type, long value );
36  static InternalCF * basic ( const char * str );
37  static InternalCF * basic ( const char * str, int base );
38  static InternalCF * basic ( int type, const char * const str );
39  static InternalCF * basic ( int type, long value, bool nonimm );
40  static InternalCF * basic ( const mpz_ptr num );
41  static InternalCF * rational ( long num, long den );
42  static InternalCF * rational ( const mpz_ptr num, const mpz_ptr den, bool normalize );
43  static InternalCF * poly ( const Variable & v, int exp, const CanonicalForm & c );
44  static InternalCF * poly ( const Variable & v, int exp = 1 );
45 };
46 
47 void getmpi ( InternalCF * value, mpz_t mpi);
48 
49 #endif /* ! INCL_CF_FACTORY_H */
CFFactory::poly
static InternalCF * poly(const Variable &v, int exp, const CanonicalForm &c)
Definition: cf_factory.cc:240
RationalDomain
#define RationalDomain
Definition: cf_defs.h:24
cf_gmp.h
num
CanonicalForm num(const CanonicalForm &f)
Definition: canonicalform.h:330
CxxTest::base
char N base
Definition: ValueTraits.h:144
CFFactory::gettype
static int gettype()
Definition: cf_factory.h:28
InternalCF
virtual class for internal CanonicalForm's
Definition: int_cf.h:41
CanonicalForm
factory's main class
Definition: canonicalform.h:77
GaloisFieldDomain
#define GaloisFieldDomain
Definition: cf_defs.h:22
ASSERT
#define ASSERT(expression, message)
Definition: cf_assert.h:99
cf_defs.h
CFFactory::basic
static InternalCF * basic(long value)
Definition: cf_factory.cc:30
CFFactory
Definition: cf_factory.h:23
FiniteFieldDomain
#define FiniteFieldDomain
Definition: cf_defs.h:23
CFFactory::rational
static InternalCF * rational(long num, long den)
Definition: cf_factory.cc:222
den
CanonicalForm den(const CanonicalForm &f)
Definition: canonicalform.h:333
variable.h
CFFactory::settype
static void settype(int type)
Definition: cf_factory.h:29
getmpi
void getmpi(InternalCF *value, mpz_t mpi)
Definition: cf_factory.cc:257
exp
gmp_float exp(const gmp_float &a)
Definition: mpr_complex.cc:358
normalize
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
Definition: syz3.cc:1027
Variable
factory's class for variables
Definition: factory.h:117
CFFactory::currenttype
static int currenttype
Definition: cf_factory.h:26
cf_assert.h
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
IntegerDomain
#define IntegerDomain
Definition: cf_defs.h:25