source: git/factory/cf_factory.h

spielwiese
Last change on this file was 0a6f36, checked in by Hans Schoenemann <hannes@…>, 3 years ago
fix: 32bit factory
  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[493c477]1/* emacs edit mode for this file is -*- C++ -*- */
[2dd068]2
[b52d27]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**/
[493c477]9#ifndef INCL_CF_FACTORY_H
10#define INCL_CF_FACTORY_H
[2dd068]11
[e4fe2b]12// #include "config.h"
[ab4548f]13
[2dd068]14#include "cf_defs.h"
15#include "variable.h"
[e4fe2b]16
[991dd9]17#include "factory/cf_gmp.h"
[926aa7]18#include "cf_assert.h"
[2dd068]19
20class InternalCF;
21class CanonicalForm;
22
23class CFFactory
24{
25private:
26    static int currenttype;
27public:
28    static int gettype () { return currenttype; }
[f71c1a]29    static void settype ( int type )
30    {
[4a7a45]31      ASSERT( type==FiniteFieldDomain || type==GaloisFieldDomain || type==IntegerDomain || type==RationalDomain || type==PrimePowerDomain, "illegal basic domain!" );
[f71c1a]32      currenttype = type;
33    };
[ef4ae2]34    static InternalCF * basic ( int value );
[8710ff0]35    static InternalCF * basic ( long value );
36    static InternalCF * basic ( int type, long value );
[2dd068]37    static InternalCF * basic ( const char * str );
[d07137]38    static InternalCF * basic ( const char * str, int base );
[16105c]39    static InternalCF * basic ( int type, const char * const str );
[8710ff0]40    static InternalCF * basic ( int type, long value, bool nonimm );
[a52291]41    static InternalCF * basic ( const mpz_ptr num );
[8710ff0]42    static InternalCF * rational ( long num, long den );
[a52291]43    static InternalCF * rational ( const mpz_ptr num, const mpz_ptr den, bool normalize );
[2dd068]44    static InternalCF * poly ( const Variable & v, int exp, const CanonicalForm & c );
45    static InternalCF * poly ( const Variable & v, int exp = 1 );
46};
47
[b15cf85]48void getmpi ( InternalCF * value, mpz_t mpi);
[493c477]49#endif /* ! INCL_CF_FACTORY_H */
Note: See TracBrowser for help on using the repository browser.