My Project
Loading...
Searching...
No Matches
int_pp.h
Go to the documentation of this file.
1/* emacs edit mode for this file is -*- C++ -*- */
2
3#ifndef INCL_INT_PP_H
4#define INCL_INT_PP_H
5
6// #include "config.h"
7
8#include "cf_defs.h"
9#include "factory/cf_gmp.h"
10
11#ifndef NOSTREAMIO
12#ifdef HAVE_IOSTREAM
13#include <iostream>
14#define OSTREAM std::ostream
15#elif defined(HAVE_IOSTREAM_H)
16#include <iostream.h>
17#define OSTREAM ostream
18#endif
19#endif /* NOSTREAMIO */
20
21#include "cf_assert.h"
22
23#include "int_cf.h"
24
25
27{
28private:
29 mpz_t thempi;
33 static void initialize();
34 static mpz_ptr MPI( const InternalCF * const c );
35public:
40 {
41 ASSERT( 0, "ups there is something wrong in your code" );
42 }
43 InternalPrimePower( const int i );
44 InternalPrimePower( const char * str, const int base=10 );
45 InternalPrimePower( const mpz_ptr );
48 const char * classname() const { return "InternalPrimePower"; }
49#ifndef NOSTREAMIO
50 void print( OSTREAM&, char* );
51#endif /* NOSTREAMIO */
52 bool isZero() const;
53 bool isOne() const;
57
58 static void setPrimePower( int p, int k );
59
60 bool is_imm() const;
61
62 int levelcoeff() const { return PrimePowerDomain; }
64
66
76
78
88
89 long intval() const;
90
91 int intmod( int p ) const;
92
93 int sign() const;
94 friend void getmpi ( InternalCF * value, mpz_t );
95};
96
97inline mpz_ptr InternalPrimePower::MPI( const InternalCF * const c )
98{
99 return (((InternalPrimePower*)c)->thempi);
100}
101
102#endif /* ! INCL_INT_PP_H */
int i
Definition: cfEzgcd.cc:132
int k
Definition: cfEzgcd.cc:99
int p
Definition: cfModGcd.cc:4078
assertions for Factory
#define ASSERT(expression, message)
Definition: cf_assert.h:99
factory switches.
#define PrimePowerDomain
Definition: cf_defs.h:17
virtual class for internal CanonicalForm's
Definition: int_cf.h:47
InternalCF * addsame(InternalCF *)
bool isOne() const
bool InternalCF::isOne, isZero () const
InternalCF * dividecoeff(InternalCF *, bool)
InternalCF * modulosame(InternalCF *)
bool is_imm() const
InternalCF * mulcoeff(InternalCF *)
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
static mpz_ptr MPI(const InternalCF *const c)
Definition: int_pp.h:97
InternalCF * divsame(InternalCF *)
long intval() const
STATIC_VAR int exp
Definition: int_pp.h:32
InternalCF * genOne()
int comparesame(InternalCF *)
bool isZero() const
int comparecoeff(InternalCF *)
InternalPrimePower(const int i)
InternalPrimePower(const char *str, const int base=10)
STATIC_VAR int prime
Definition: int_pp.h:31
int sign() const
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalCF * genZero()
int levelcoeff() const
Definition: int_pp.h:62
InternalCF * neg()
InternalCF * mulsame(InternalCF *)
InternalCF * normalize_myself()
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
void print(OSTREAM &, char *)
STATIC_VAR bool initialized
Definition: int_pp.h:30
InternalCF * modsame(InternalCF *)
InternalCF * subsame(InternalCF *)
const char * classname() const
Definition: int_pp.h:48
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalCF * divcoeff(InternalCF *, bool)
InternalCF * deepCopyObject() const
STATIC_VAR mpz_t primepowhalf
Definition: int_pp.h:37
InternalPrimePower(const InternalCF &)
Definition: int_pp.h:39
InternalCF * modcoeff(InternalCF *, bool)
InternalCF * addcoeff(InternalCF *)
InternalCF * subcoeff(InternalCF *, bool)
STATIC_VAR mpz_t primepow
Definition: int_pp.h:36
int intmod(int p) const
InternalCF * dividesame(InternalCF *)
static void initialize()
friend void getmpi(InternalCF *value, mpz_t)
Definition: cf_factory.cc:303
InternalPrimePower(const mpz_ptr)
static void setPrimePower(int p, int k)
InternalCF * modulocoeff(InternalCF *, bool)
#define STATIC_VAR
Definition: globaldefs.h:7
Factory's internal CanonicalForm's.
#define OSTREAM
Definition: int_pp.h:14