My Project
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
20class InternalCF;
21class CanonicalForm;
22
24{
25private:
26 static int currenttype;
27public:
28 static int gettype () { return currenttype; }
29 static void settype ( int type )
30 {
31 ASSERT( type==FiniteFieldDomain || type==GaloisFieldDomain || type==IntegerDomain || type==RationalDomain || type==PrimePowerDomain, "illegal basic domain!" );
32 currenttype = type;
33 };
34 static InternalCF * basic ( int value );
35 static InternalCF * basic ( long value );
36 static InternalCF * basic ( int type, long value );
37 static InternalCF * basic ( const char * str );
38 static InternalCF * basic ( const char * str, int base );
39 static InternalCF * basic ( int type, const char * const str );
40 static InternalCF * basic ( int type, long value, bool nonimm );
41 static InternalCF * basic ( const mpz_ptr num );
42 static InternalCF * rational ( long num, long den );
43 static InternalCF * rational ( const mpz_ptr num, const mpz_ptr den, bool normalize );
44 static InternalCF * poly ( const Variable & v, int exp, const CanonicalForm & c );
45 static InternalCF * poly ( const Variable & v, int exp = 1 );
46};
47
48void getmpi ( InternalCF * value, mpz_t mpi);
49#endif /* ! INCL_CF_FACTORY_H */
CanonicalForm num(const CanonicalForm &f)
CanonicalForm den(const CanonicalForm &f)
assertions for Factory
#define ASSERT(expression, message)
Definition: cf_assert.h:99
factory switches.
#define PrimePowerDomain
Definition: cf_defs.h:17
#define FiniteFieldDomain
Definition: cf_defs.h:19
#define RationalDomain
Definition: cf_defs.h:20
#define IntegerDomain
Definition: cf_defs.h:21
#define GaloisFieldDomain
Definition: cf_defs.h:18
void getmpi(InternalCF *value, mpz_t mpi)
Definition: cf_factory.cc:303
static InternalCF * basic(int value)
Definition: cf_factory.cc:61
static int gettype()
Definition: cf_factory.h:28
static InternalCF * poly(const Variable &v, int exp, const CanonicalForm &c)
Definition: cf_factory.cc:286
static InternalCF * rational(long num, long den)
Definition: cf_factory.cc:268
static int currenttype
Definition: cf_factory.h:26
static void settype(int type)
Definition: cf_factory.h:29
factory's main class
Definition: canonicalform.h:86
virtual class for internal CanonicalForm's
Definition: int_cf.h:47
factory's class for variables
Definition: factory.h:127
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:39
gmp_float exp(const gmp_float &a)
Definition: mpr_complex.cc:357
char N base
Definition: ValueTraits.h:144
char * str(leftv arg)
Definition: shared.cc:704
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
Definition: syz3.cc:1027
operations on variables