source: git/factory/cf_factory.h @ 1950d7

spielwiese
Last change on this file since 1950d7 was 0a6f36, checked in by Hans Schoenemann <hannes@…>, 3 years ago
fix: 32bit factory
  • Property mode set to 100644
File size: 1.5 KB
Line 
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
23class CFFactory
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 */
Note: See TracBrowser for help on using the repository browser.