Loading...
Searching...
No Matches
int_pp.h
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
#ifndef INCL_INT_PP_H
#define INCL_INT_PP_H
// #include "config.h"
#include "cf_defs.h"
#include "factory/cf_gmp.h"
#ifndef NOSTREAMIO
#ifdef HAVE_IOSTREAM
#include <iostream>
#define OSTREAM std::ostream
#elif defined(HAVE_IOSTREAM_H)
#include <iostream.h>
#define OSTREAM ostream
#endif
#endif /* NOSTREAMIO */
#include "cf_assert.h"
#include "int_cf.h"
class InternalPrimePower : public InternalCF
{
private:
mpz_t thempi;
STATIC_VAR bool initialized;
STATIC_VAR int prime;
STATIC_VAR int exp;
static void initialize();
static mpz_ptr MPI( const InternalCF * const c );
public:
STATIC_VAR mpz_t primepow;
STATIC_VAR mpz_t primepowhalf;
InternalPrimePower();
InternalPrimePower( const InternalCF& )
{
ASSERT( 0, "ups there is something wrong in your code" );
}
InternalPrimePower( const int i );
InternalPrimePower( const char * str, const int base=10 );
InternalPrimePower( const mpz_ptr );
~InternalPrimePower();
InternalCF* deepCopyObject() const;
const char * classname() const { return "InternalPrimePower"; }
#ifndef NOSTREAMIO
void print( OSTREAM&, char* );
#endif /* NOSTREAMIO */
bool isZero() const;
bool isOne() const;
InternalCF* genZero();
InternalCF* genOne();
InternalCF* normalize_myself();
static void setPrimePower( int p, int k );
bool is_imm() const;
int levelcoeff() const { return PrimePowerDomain; }
InternalCF* neg();
int comparesame( InternalCF* );
InternalCF* addsame( InternalCF* );
InternalCF* subsame( InternalCF* );
InternalCF* mulsame( InternalCF* );
InternalCF* dividesame( InternalCF* );
InternalCF* modulosame( InternalCF* );
InternalCF* divsame( InternalCF* );
InternalCF* modsame( InternalCF* );
void divremsame( InternalCF*, InternalCF*&, InternalCF*& );
bool divremsamet( InternalCF*, InternalCF*&, InternalCF*& );
int comparecoeff( InternalCF* );
InternalCF* addcoeff( InternalCF* );
InternalCF* subcoeff( InternalCF*, bool );
InternalCF* mulcoeff( InternalCF* );
InternalCF* dividecoeff( InternalCF*, bool );
InternalCF* modulocoeff( InternalCF*, bool );
InternalCF* divcoeff( InternalCF*, bool );
InternalCF* modcoeff( InternalCF*, bool );
void divremcoeff( InternalCF*, InternalCF*&, InternalCF*&, bool );
bool divremcoefft( InternalCF*, InternalCF*&, InternalCF*&, bool );
long intval() const;
int intmod( int p ) const;
int sign() const;
friend void getmpi ( InternalCF * value, mpz_t );
};
inline mpz_ptr InternalPrimePower::MPI( const InternalCF * const c )
{
return (((InternalPrimePower*)c)->thempi);
}
#endif /* ! INCL_INT_PP_H */
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
p
int p
Definition cfModGcd.cc:4086
cf_assert.h
assertions for Factory
ASSERT
#define ASSERT(expression, message)
Definition cf_assert.h:99
cf_defs.h
factory switches.
PrimePowerDomain
#define PrimePowerDomain
Definition cf_defs.h:17
cf_gmp.h
InternalCF::InternalCF
InternalCF()
Definition int_cf.h:55
InternalPrimePower::addsame
InternalCF * addsame(InternalCF *)
InternalPrimePower::isOne
bool isOne() const
bool InternalCF::isOne, isZero () const
InternalPrimePower::dividecoeff
InternalCF * dividecoeff(InternalCF *, bool)
InternalPrimePower::modulosame
InternalCF * modulosame(InternalCF *)
InternalPrimePower::is_imm
bool is_imm() const
InternalPrimePower::mulcoeff
InternalCF * mulcoeff(InternalCF *)
InternalPrimePower::divremsame
void divremsame(InternalCF *, InternalCF *&, InternalCF *&)
InternalPrimePower::MPI
static mpz_ptr MPI(const InternalCF *const c)
Definition int_pp.h:97
InternalPrimePower::divsame
InternalCF * divsame(InternalCF *)
InternalPrimePower::intval
long intval() const
InternalPrimePower::exp
STATIC_VAR int exp
Definition int_pp.h:32
InternalPrimePower::genOne
InternalCF * genOne()
InternalPrimePower::comparesame
int comparesame(InternalCF *)
InternalPrimePower::isZero
bool isZero() const
InternalPrimePower::comparecoeff
int comparecoeff(InternalCF *)
InternalPrimePower::InternalPrimePower
InternalPrimePower(const int i)
InternalPrimePower::InternalPrimePower
InternalPrimePower()
InternalPrimePower::InternalPrimePower
InternalPrimePower(const char *str, const int base=10)
InternalPrimePower::prime
STATIC_VAR int prime
Definition int_pp.h:31
InternalPrimePower::~InternalPrimePower
~InternalPrimePower()
InternalPrimePower::sign
int sign() const
InternalPrimePower::divremsamet
bool divremsamet(InternalCF *, InternalCF *&, InternalCF *&)
InternalPrimePower::genZero
InternalCF * genZero()
InternalPrimePower::levelcoeff
int levelcoeff() const
Definition int_pp.h:62
InternalPrimePower::neg
InternalCF * neg()
InternalPrimePower::mulsame
InternalCF * mulsame(InternalCF *)
InternalPrimePower::thempi
mpz_t thempi
Definition int_pp.h:29
InternalPrimePower::normalize_myself
InternalCF * normalize_myself()
InternalPrimePower::divremcoeff
void divremcoeff(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalPrimePower::print
void print(OSTREAM &, char *)
InternalPrimePower::initialized
STATIC_VAR bool initialized
Definition int_pp.h:30
InternalPrimePower::modsame
InternalCF * modsame(InternalCF *)
InternalPrimePower::subsame
InternalCF * subsame(InternalCF *)
InternalPrimePower::classname
const char * classname() const
Definition int_pp.h:48
InternalPrimePower::divremcoefft
bool divremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool)
InternalPrimePower::divcoeff
InternalCF * divcoeff(InternalCF *, bool)
InternalPrimePower::deepCopyObject
InternalCF * deepCopyObject() const
InternalPrimePower::primepowhalf
STATIC_VAR mpz_t primepowhalf
Definition int_pp.h:37
InternalPrimePower::InternalPrimePower
InternalPrimePower(const InternalCF &)
Definition int_pp.h:39
InternalPrimePower::modcoeff
InternalCF * modcoeff(InternalCF *, bool)
InternalPrimePower::addcoeff
InternalCF * addcoeff(InternalCF *)
InternalPrimePower::subcoeff
InternalCF * subcoeff(InternalCF *, bool)
InternalPrimePower::primepow
STATIC_VAR mpz_t primepow
Definition int_pp.h:36
InternalPrimePower::getmpi
friend void getmpi(InternalCF *value, mpz_t)
Definition cf_factory.cc:303
InternalPrimePower::intmod
int intmod(int p) const
InternalPrimePower::dividesame
InternalCF * dividesame(InternalCF *)
InternalPrimePower::initialize
static void initialize()
InternalPrimePower::InternalPrimePower
InternalPrimePower(const mpz_ptr)
InternalPrimePower::setPrimePower
static void setPrimePower(int p, int k)
InternalPrimePower::modulocoeff
InternalCF * modulocoeff(InternalCF *, bool)
STATIC_VAR
#define STATIC_VAR
Definition globaldefs.h:7
int_cf.h
Factory's internal CanonicalForm's.
OSTREAM
#define OSTREAM
Definition int_pp.h:14