Loading...
Searching...
No Matches
canonicalform.h
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
/**
* @file canonicalform.h
*
* Header for factory's main class CanonicalForm
**/
#ifndef INCL_CANONICALFORM_H
#define INCL_CANONICALFORM_H
// #include "config.h"
#ifndef NOSTREAMIO
# ifdef HAVE_IOSTREAM
# include <iostream>
# define OSTREAM std::ostream
# define ISTREAM std::istream
# elif defined(HAVE_IOSTREAM_H)
# include <iostream.h>
# define OSTREAM ostream
# define ISTREAM istream
# endif
#endif /* NOSTREAMIO */
#include <stdint.h>
#include "cf_defs.h"
#include "variable.h"
#include "factory/cf_gmp.h"
#include "factory/templates/ftmpl_list.h"
#include "factory/templates/ftmpl_array.h"
#include "factory/templates/ftmpl_afactor.h"
#include "factory/templates/ftmpl_factor.h"
#include "factory/templates/ftmpl_matrix.h"
#include "si_log2.h"
#ifdef HAVE_OMALLOC
#ifndef XMEMORY_H
#include "omalloc/omallocClass.h"
#endif
#endif
/*BEGINPUBLIC*/
#undef CF_INLINE
#define CF_INLINE
#undef CF_NO_INLINE
#define CF_NO_INLINE
/*ENDPUBLIC*/
#ifdef CF_USE_INLINE
#ifndef __CYGWIN__
#undef CF_INLINE
#define CF_INLINE inline
#endif
#else
#undef CF_INLINE
#define CF_INLINE
#endif
/*BEGINPUBLIC*/
class InternalCF;
inline int is_imm ( const InternalCF * const ptr )
{
// returns 0 if ptr is not immediate
return ( ((int)((intptr_t)ptr)) & 3 );
}
/**
* factory's main class
*
* a CanonicalForm can represent a polynomial over or a constant in F_p,
* F_p(alpha), GF (F_p[t]/(Conway polynomial)), Z, or Q
*
* @sa int_poly.h, variable.h, ffops.h, gfops.h, imm.h, int_int.h, int_rat.h
**/
class FACTORY_PUBLIC CanonicalForm
#ifdef HAVE_OMALLOC
#ifndef XMEMORY_H
: public omallocClass
#endif
#endif
{
private:
InternalCF *value;
public:
// constructors, destructors, selectors
CF_INLINE CanonicalForm();
CF_INLINE CanonicalForm( const CanonicalForm& );
CF_INLINE CanonicalForm( InternalCF* );
CF_INLINE CanonicalForm( const int );
CF_INLINE CanonicalForm( const long );
CF_INLINE CanonicalForm( const Variable & );
CF_INLINE CanonicalForm( const Variable &, int );
CanonicalForm( const char *, const int base=10 ); // use with caution - does only handle integers !!!
CF_NO_INLINE ~CanonicalForm();
InternalCF* getval() const; // use with caution !!!
CanonicalForm deepCopy() const;
void mpzval(mpz_t val) const;
// predicates
CF_NO_INLINE bool isOne() const;
CF_NO_INLINE bool isZero() const;
inline bool isImm() const { return is_imm( value ); };
bool inZ() const;
bool inQ() const;
bool inFF() const;
bool inGF() const;
bool inBaseDomain() const;
bool inExtension() const;
bool inCoeffDomain() const;
bool inPolyDomain() const;
bool inQuotDomain() const;
bool isFFinGF() const;
bool isUnivariate() const;
bool isHomogeneous() const;
// conversion functions
long intval() const;
CanonicalForm mapinto () const;
CanonicalForm lc () const;
CanonicalForm Lc () const;
CanonicalForm LC () const;
CanonicalForm LC ( const Variable & v ) const;
int degree () const;
int degree ( const Variable & v ) const;
CanonicalForm tailcoeff () const;
CanonicalForm tailcoeff ( const Variable & v ) const;
int taildegree () const;
int level () const;
Variable mvar () const;
CanonicalForm num () const;
CanonicalForm den () const;
// assignment operators
CF_NO_INLINE CanonicalForm& operator = ( const CanonicalForm& );
CF_NO_INLINE CanonicalForm& operator = ( const long );
CanonicalForm& operator += ( const CanonicalForm& );
CanonicalForm& operator -= ( const CanonicalForm& );
CanonicalForm& operator *= ( const CanonicalForm& );
CanonicalForm& operator /= ( const CanonicalForm& );
CanonicalForm& operator %= ( const CanonicalForm& );
CanonicalForm& div ( const CanonicalForm& );
CanonicalForm& tryDiv (const CanonicalForm&, const CanonicalForm&, bool& );
CanonicalForm& mod ( const CanonicalForm& );
// evaluation operators
CanonicalForm operator () ( const CanonicalForm & f ) const;
CanonicalForm operator () ( const CanonicalForm & f, const Variable & v ) const;
CanonicalForm operator [] ( int i ) const;
CanonicalForm deriv() const;
CanonicalForm deriv( const Variable & x ) const;
int sign() const;
CanonicalForm sqrt() const;
int ilog2() const;
// comparison operators
friend FACTORY_PUBLIC bool operator == ( const CanonicalForm&, const CanonicalForm& );
friend FACTORY_PUBLIC bool operator != ( const CanonicalForm&, const CanonicalForm& );
friend FACTORY_PUBLIC bool operator > ( const CanonicalForm&, const CanonicalForm& );
friend FACTORY_PUBLIC bool operator < ( const CanonicalForm&, const CanonicalForm& );
// arithmetic operators
friend CF_NO_INLINE FACTORY_PUBLIC CanonicalForm operator - ( const CanonicalForm& );
friend FACTORY_PUBLIC void divrem ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
friend FACTORY_PUBLIC bool divremt ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
friend FACTORY_PUBLIC bool tryDivremt ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm&, const CanonicalForm&, bool& );
friend FACTORY_PUBLIC CanonicalForm bgcd ( const CanonicalForm &, const CanonicalForm & );
friend FACTORY_PUBLIC CanonicalForm bextgcd ( const CanonicalForm &, const CanonicalForm &, CanonicalForm &, CanonicalForm & );
// input/output
#ifndef NOSTREAMIO
void print( OSTREAM&, char * ) const;
void print( OSTREAM& ) const;
friend FACTORY_PUBLIC OSTREAM& operator << ( OSTREAM&, const CanonicalForm& );
friend FACTORY_PUBLIC ISTREAM& operator >> ( ISTREAM&, CanonicalForm& );
#endif /* NOSTREAMIO */
// obsolete methods
CanonicalForm genZero() const;
CanonicalForm genOne() const;
friend class CFIterator;
};
CF_INLINE FACTORY_PUBLIC CanonicalForm
operator + ( const CanonicalForm&, const CanonicalForm& );
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm
operator - ( const CanonicalForm&, const CanonicalForm& );
CF_INLINE FACTORY_PUBLIC CanonicalForm
operator * ( const CanonicalForm&, const CanonicalForm& );
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm
operator / ( const CanonicalForm&, const CanonicalForm& );
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm
operator % ( const CanonicalForm&, const CanonicalForm& );
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm
div ( const CanonicalForm&, const CanonicalForm& );
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm
mod ( const CanonicalForm&, const CanonicalForm& );
/*ENDPUBLIC*/
#ifdef CF_USE_INLINE
#ifndef __CYGWIN__
#include "cf_inline.cc"
#endif
#endif
/*BEGINPUBLIC*/
//{{{ function declarations from canonicalform.cc
CanonicalForm FACTORY_PUBLIC blcm ( const CanonicalForm & f, const CanonicalForm & g );
CanonicalForm FACTORY_PUBLIC power ( const CanonicalForm & f, int n );
CanonicalForm FACTORY_PUBLIC power ( const Variable & v, int n );
//}}}
//{{{ function declarations from cf_gcd.cc
CanonicalForm FACTORY_PUBLIC gcd ( const CanonicalForm&, const CanonicalForm& );
CanonicalForm FACTORY_PUBLIC gcd_poly ( const CanonicalForm & f, const CanonicalForm & g );
CanonicalForm FACTORY_PUBLIC lcm ( const CanonicalForm&, const CanonicalForm& );
CanonicalForm FACTORY_PUBLIC pp ( const CanonicalForm& );
CanonicalForm FACTORY_PUBLIC content ( const CanonicalForm& );
CanonicalForm FACTORY_PUBLIC content ( const CanonicalForm&, const Variable& );
CanonicalForm FACTORY_PUBLIC icontent ( const CanonicalForm & f );
CanonicalForm FACTORY_PUBLIC vcontent ( const CanonicalForm & f, const Variable & x );
//}}}
//{{{ function declarations from cf_ops.cc
CanonicalForm FACTORY_PUBLIC swapvar ( const CanonicalForm &, const Variable &, const Variable & );
CanonicalForm FACTORY_PUBLIC replacevar ( const CanonicalForm &, const Variable &, const Variable & );
int getNumVars( const CanonicalForm & f );
CanonicalForm getVars( const CanonicalForm & f );
CanonicalForm apply ( const CanonicalForm & f, void (*mf)( CanonicalForm &, int & ) );
CanonicalForm mapdomain ( const CanonicalForm & f, CanonicalForm (*mf)( const CanonicalForm & ) );
int * degrees ( const CanonicalForm & f, int * degs = 0 );
int totaldegree ( const CanonicalForm & f );
int totaldegree ( const CanonicalForm & f, const Variable & v1, const Variable & v2 );
int size ( const CanonicalForm & f, const Variable & v );
int size ( const CanonicalForm & f );
int size_maxexp ( const CanonicalForm & f, int& maxexp );
CanonicalForm reduce ( const CanonicalForm& f, const CanonicalForm & M);
bool hasFirstAlgVar( const CanonicalForm & f, Variable & a);
CanonicalForm leftShift (const CanonicalForm& F, int n);
//}}}
//{{{ inline functions corresponding to CanonicalForm methods
//{{{ docu
//
// - inline functions corresponding to CanonicalForm methods.
//
// These function exist for convenience only and because it is
// more beautiful to write 'degree( f )' than 'f.degree()'.
//
//}}}
inline CanonicalForm
lc ( const CanonicalForm & f ) { return f.lc(); }
inline CanonicalForm
Lc ( const CanonicalForm & f ) { return f.Lc(); }
inline CanonicalForm
LC ( const CanonicalForm & f ) { return f.LC(); }
inline CanonicalForm
LC ( const CanonicalForm & f, const Variable & v ) { return f.LC( v ); }
inline int
degree ( const CanonicalForm & f ) { return f.degree(); }
inline int
degree ( const CanonicalForm & f, const Variable & v ) { return f.degree( v ); }
inline int
taildegree ( const CanonicalForm & f ) { return f.taildegree(); }
inline CanonicalForm
tailcoeff ( const CanonicalForm & f ) { return f.tailcoeff(); }
inline CanonicalForm
tailcoeff (const CanonicalForm& f, const Variable& v) { return f.tailcoeff(v); }
inline int
level ( const CanonicalForm & f ) { return f.level(); }
inline Variable
mvar ( const CanonicalForm & f ) { return f.mvar(); }
inline CanonicalForm
num ( const CanonicalForm & f ) { return f.num(); }
inline CanonicalForm
den ( const CanonicalForm & f ) { return f.den(); }
inline int
sign ( const CanonicalForm & a ) { return a.sign(); }
inline CanonicalForm
deriv ( const CanonicalForm & f, const Variable & x ) { return f.deriv( x ); }
inline CanonicalForm
sqrt ( const CanonicalForm & a ) { return a.sqrt(); }
inline int
ilog2 ( const CanonicalForm & a ) { return a.ilog2(); }
inline CanonicalForm
mapinto ( const CanonicalForm & f ) { return f.mapinto(); }
//}}}
//{{{ inline functions
inline CanonicalForm
head ( const CanonicalForm & f )
{
if ( f.level() > 0 )
return power( f.mvar(), f.degree() ) * f.LC();
else
return f;
}
inline int
headdegree ( const CanonicalForm & f ) { return totaldegree( head( f ) ); }
//}}}
//{{{ other function declarations
void FACTORY_PUBLIC setCharacteristic( int c ); // -> Fp && Q
void setCharacteristic( int c, int n ); // -> PrimePower
void setCharacteristic( int c, int n, char name ); // -> GF(q)
int FACTORY_PUBLIC getCharacteristic();
int getGFDegree();
CanonicalForm getGFGenerator();
void FACTORY_PUBLIC On( int );
void FACTORY_PUBLIC Off( int );
bool FACTORY_PUBLIC isOn( int );
//}}}
//{{{ type definitions
typedef AFactor<CanonicalForm> CFAFactor;
typedef List <CFAFactor> CFAFList;
typedef ListIterator<CFAFactor> CFAFListIterator;
typedef Factor<CanonicalForm> CFFactor;
typedef List<CFFactor> CFFList;
typedef ListIterator<CFFactor> CFFListIterator;
typedef List<CanonicalForm> CFList;
typedef ListIterator<CanonicalForm> CFListIterator;
typedef Array<CanonicalForm> CFArray;
typedef Matrix<CanonicalForm> CFMatrix;
typedef List<CFList> ListCFList;
typedef ListIterator<CFList> ListCFListIterator ;
typedef List<int> IntList;
typedef ListIterator<int> IntListIterator;
typedef List<Variable> Varlist;
typedef ListIterator<Variable> VarlistIterator;
typedef Array<int> Intarray;
//}}}
/*ENDPUBLIC*/
#endif /* ! INCL_CANONICALFORM_H */
operator!=
bool operator!=(const Rational &a, const Rational &b)
Definition GMPrat.cc:318
operator<
bool operator<(const Rational &a, const Rational &b)
Definition GMPrat.cc:288
operator==
bool operator==(const Rational &a, const Rational &b)
Definition GMPrat.cc:312
operator>
bool operator>(const Rational &a, const Rational &b)
Definition GMPrat.cc:300
bgcd
CanonicalForm bgcd(const CanonicalForm &f, const CanonicalForm &g)
CanonicalForm bgcd ( const CanonicalForm & f, const CanonicalForm & g ).
Definition canonicalform.cc:1648
divrem
void divrem(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &q, CanonicalForm &r)
Definition canonicalform.cc:1032
operator>>
ISTREAM & operator>>(ISTREAM &is, CanonicalForm &cf)
Definition canonicalform.cc:1858
tryDivremt
bool tryDivremt(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &q, CanonicalForm &r, const CanonicalForm &M, bool &fail)
same as divremt but handles zero divisors in case we are in Z_p[x]/(f) where f is not irreducible
Definition canonicalform.cc:1108
divremt
bool divremt(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &q, CanonicalForm &r)
Definition canonicalform.cc:1066
bextgcd
CanonicalForm bextgcd(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &a, CanonicalForm &b)
CanonicalForm bextgcd ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & a,...
Definition canonicalform.cc:1722
isOn
bool FACTORY_PUBLIC isOn(int)
switches
Definition canonicalform.cc:1971
Intarray
Array< int > Intarray
Definition canonicalform.h:405
headdegree
int headdegree(const CanonicalForm &f)
Definition canonicalform.h:369
content
CanonicalForm FACTORY_PUBLIC content(const CanonicalForm &)
CanonicalForm content ( const CanonicalForm & f ).
Definition cf_gcd.cc:603
mapinto
CanonicalForm mapinto(const CanonicalForm &f)
Definition canonicalform.h:355
CFAFactor
AFactor< CanonicalForm > CFAFactor
Definition canonicalform.h:389
getVars
CanonicalForm getVars(const CanonicalForm &f)
CanonicalForm getVars ( const CanonicalForm & f ).
Definition cf_ops.cc:350
blcm
CanonicalForm FACTORY_PUBLIC blcm(const CanonicalForm &f, const CanonicalForm &g)
Definition canonicalform.cc:1816
size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition cf_ops.cc:600
div
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm div(const CanonicalForm &, const CanonicalForm &)
getNumVars
int getNumVars(const CanonicalForm &f)
int getNumVars ( const CanonicalForm & f )
Definition cf_ops.cc:314
lc
CanonicalForm lc(const CanonicalForm &f)
Definition canonicalform.h:304
icontent
CanonicalForm FACTORY_PUBLIC icontent(const CanonicalForm &f)
CanonicalForm icontent ( const CanonicalForm & f ).
Definition cf_gcd.cc:74
ilog2
int ilog2(const CanonicalForm &a)
Definition canonicalform.h:352
leftShift
CanonicalForm leftShift(const CanonicalForm &F, int n)
left shift the main variable of F by n
Definition cf_ops.cc:697
replacevar
CanonicalForm FACTORY_PUBLIC replacevar(const CanonicalForm &, const Variable &, const Variable &)
CanonicalForm replacevar ( const CanonicalForm & f, const Variable & x1, const Variable & x2 ).
Definition cf_ops.cc:271
VarlistIterator
ListIterator< Variable > VarlistIterator
Definition canonicalform.h:404
Off
void FACTORY_PUBLIC Off(int)
switches
Definition canonicalform.cc:1964
sign
int sign(const CanonicalForm &a)
Definition canonicalform.h:343
gcd
CanonicalForm FACTORY_PUBLIC gcd(const CanonicalForm &, const CanonicalForm &)
Definition cf_gcd.cc:685
tailcoeff
CanonicalForm tailcoeff(const CanonicalForm &f)
Definition canonicalform.h:325
operator+
CF_INLINE FACTORY_PUBLIC CanonicalForm operator+(const CanonicalForm &, const CanonicalForm &)
CF_INLINE CanonicalForm operator +, -, *, /, % ( const CanonicalForm & lhs, const CanonicalForm & rhs...
Definition cf_inline.cc:503
degrees
int * degrees(const CanonicalForm &f, int *degs=0)
int * degrees ( const CanonicalForm & f, int * degs )
Definition cf_ops.cc:493
operator*
CF_INLINE FACTORY_PUBLIC CanonicalForm operator*(const CanonicalForm &, const CanonicalForm &)
Definition cf_inline.cc:524
mod
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm mod(const CanonicalForm &, const CanonicalForm &)
CFAFListIterator
ListIterator< CFAFactor > CFAFListIterator
Definition canonicalform.h:391
taildegree
int taildegree(const CanonicalForm &f)
Definition canonicalform.h:322
operator%
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm operator%(const CanonicalForm &, const CanonicalForm &)
degree
int degree(const CanonicalForm &f)
Definition canonicalform.h:316
pp
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
deriv
CanonicalForm deriv(const CanonicalForm &f, const Variable &x)
Definition canonicalform.h:346
lcm
CanonicalForm FACTORY_PUBLIC lcm(const CanonicalForm &, const CanonicalForm &)
CanonicalForm lcm ( const CanonicalForm & f, const CanonicalForm & g ).
Definition cf_gcd.cc:763
size_maxexp
int size_maxexp(const CanonicalForm &f, int &maxexp)
Definition cf_ops.cc:641
getGFDegree
int getGFDegree()
Definition cf_char.cc:75
CF_INLINE
#define CF_INLINE
Definition canonicalform.h:45
CFArray
Array< CanonicalForm > CFArray
Definition canonicalform.h:397
vcontent
CanonicalForm FACTORY_PUBLIC vcontent(const CanonicalForm &f, const Variable &x)
CanonicalForm vcontent ( const CanonicalForm & f, const Variable & x ).
Definition cf_gcd.cc:653
setCharacteristic
void FACTORY_PUBLIC setCharacteristic(int c)
Definition cf_char.cc:28
is_imm
int is_imm(const InternalCF *const ptr)
Definition canonicalform.h:65
operator-
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm operator-(const CanonicalForm &, const CanonicalForm &)
hasFirstAlgVar
bool hasFirstAlgVar(const CanonicalForm &f, Variable &a)
check if poly f contains an algebraic variable a
Definition cf_ops.cc:679
CFFListIterator
ListIterator< CFFactor > CFFListIterator
Definition canonicalform.h:394
CFMatrix
Matrix< CanonicalForm > CFMatrix
Definition canonicalform.h:398
swapvar
CanonicalForm FACTORY_PUBLIC swapvar(const CanonicalForm &, const Variable &, const Variable &)
swapvar() - swap variables x1 and x2 in f.
Definition cf_ops.cc:168
ListCFList
List< CFList > ListCFList
Definition canonicalform.h:399
CFListIterator
ListIterator< CanonicalForm > CFListIterator
Definition canonicalform.h:396
mapdomain
CanonicalForm mapdomain(const CanonicalForm &f, CanonicalForm(*mf)(const CanonicalForm &))
CanonicalForm mapdomain ( const CanonicalForm & f, CanonicalForm (*mf)( const CanonicalForm & ) ).
Definition cf_ops.cc:440
num
CanonicalForm num(const CanonicalForm &f)
Definition canonicalform.h:337
den
CanonicalForm den(const CanonicalForm &f)
Definition canonicalform.h:340
totaldegree
int totaldegree(const CanonicalForm &f)
int totaldegree ( const CanonicalForm & f )
Definition cf_ops.cc:523
sqrt
CanonicalForm sqrt(const CanonicalForm &a)
Definition canonicalform.h:349
CFFList
List< CFFactor > CFFList
Definition canonicalform.h:393
Lc
CanonicalForm Lc(const CanonicalForm &f)
Definition canonicalform.h:307
ListCFListIterator
ListIterator< CFList > ListCFListIterator
Definition canonicalform.h:400
IntList
List< int > IntList
Definition canonicalform.h:401
operator/
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm operator/(const CanonicalForm &, const CanonicalForm &)
gcd_poly
CanonicalForm FACTORY_PUBLIC gcd_poly(const CanonicalForm &f, const CanonicalForm &g)
CanonicalForm gcd_poly ( const CanonicalForm & f, const CanonicalForm & g ).
Definition cf_gcd.cc:492
head
CanonicalForm head(const CanonicalForm &f)
Definition canonicalform.h:360
getGFGenerator
CanonicalForm getGFGenerator()
Definition cf_char.cc:81
power
CanonicalForm FACTORY_PUBLIC power(const CanonicalForm &f, int n)
exponentiation
Definition canonicalform.cc:1896
CF_NO_INLINE
#define CF_NO_INLINE
Definition canonicalform.h:47
CFFactor
Factor< CanonicalForm > CFFactor
Definition canonicalform.h:392
reduce
CanonicalForm reduce(const CanonicalForm &f, const CanonicalForm &M)
polynomials in M.mvar() are considered coefficients M univariate monic polynomial the coefficients of...
Definition cf_ops.cc:660
apply
CanonicalForm apply(const CanonicalForm &f, void(*mf)(CanonicalForm &, int &))
CanonicalForm apply ( const CanonicalForm & f, void (*mf)( CanonicalForm &, int & ) ).
Definition cf_ops.cc:402
level
int level(const CanonicalForm &f)
Definition canonicalform.h:331
On
void FACTORY_PUBLIC On(int)
switches
Definition canonicalform.cc:1957
CFList
List< CanonicalForm > CFList
Definition canonicalform.h:395
mvar
Variable mvar(const CanonicalForm &f)
Definition canonicalform.h:334
LC
CanonicalForm LC(const CanonicalForm &f)
Definition canonicalform.h:310
IntListIterator
ListIterator< int > IntListIterator
Definition canonicalform.h:402
CFAFList
List< CFAFactor > CFAFList
Definition canonicalform.h:390
getCharacteristic
int FACTORY_PUBLIC getCharacteristic()
Definition cf_char.cc:70
Varlist
List< Variable > Varlist
Definition canonicalform.h:403
i
int i
Definition cfEzgcd.cc:132
x
Variable x
Definition cfModGcd.cc:4090
g
g
Definition cfModGcd.cc:4098
cf_defs.h
factory switches.
cf_gmp.h
cf_inline.cc
definition of configurable inline `CanonicalForm' methods.
f
FILE * f
Definition checklibs.c:9
AFactor
Definition ftmpl_afactor.h:17
Array
Definition ftmpl_array.h:18
CanonicalForm
factory's main class
Definition canonicalform.h:86
CanonicalForm::CanonicalForm
CF_INLINE CanonicalForm(const Variable &)
CanonicalForm::genOne
CanonicalForm genOne() const
Definition canonicalform.cc:1881
CanonicalForm::value
InternalCF * value
Definition canonicalform.h:88
CanonicalForm::isZero
CF_NO_INLINE bool isZero() const
CanonicalForm::~CanonicalForm
CF_NO_INLINE ~CanonicalForm()
CanonicalForm::sign
int sign() const
int CanonicalForm::sign () const
Definition canonicalform.cc:1360
CanonicalForm::deepCopy
CanonicalForm deepCopy() const
Definition canonicalform.cc:43
CanonicalForm::CanonicalForm
CF_INLINE CanonicalForm()
CF_INLINE CanonicalForm::CanonicalForm ().
Definition cf_inline.cc:127
CanonicalForm::getval
InternalCF * getval() const
Definition canonicalform.cc:34
CanonicalForm::isOne
CF_NO_INLINE bool isOne() const
CanonicalForm::genZero
CanonicalForm genZero() const
genOne(), genZero()
Definition canonicalform.cc:1867
CanonicalForm::CFIterator
friend class CFIterator
Definition canonicalform.h:202
CanonicalForm::tryDiv
CanonicalForm & tryDiv(const CanonicalForm &, const CanonicalForm &, bool &)
same as divremt but handles zero divisors in case we are in Z_p[x]/(f) where f is not irreducible
Definition canonicalform.cc:905
CanonicalForm::sqrt
CanonicalForm sqrt() const
CanonicalForm CanonicalForm::sqrt () const.
Definition canonicalform.cc:1383
CanonicalForm::isImm
bool isImm() const
Definition canonicalform.h:110
CanonicalForm::ilog2
int ilog2() const
int CanonicalForm::ilog2 () const
Definition canonicalform.cc:1417
CanonicalForm::mpzval
void mpzval(mpz_t val) const
Definition canonicalform.cc:52
CanonicalForm::print
void print(OSTREAM &, char *) const
input/output
Definition canonicalform.cc:1833
Factor
Definition ftmpl_factor.h:18
InternalCF
virtual class for internal CanonicalForm's
Definition int_cf.h:47
ListIterator
Definition ftmpl_list.h:87
List
Definition ftmpl_list.h:52
Matrix
Definition ftmpl_matrix.h:29
Variable
factory's class for variables
Definition factory.h:127
omallocClass
Definition omallocClass.h:20
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
name
char name(const Variable &v)
Definition factory.h:189
operator-
fglmVector operator-(const fglmVector &v)
Definition fglmvec.cc:398
ftmpl_afactor.h
ftmpl_array.h
ftmpl_factor.h
ftmpl_list.h
ftmpl_matrix.h
FACTORY_PUBLIC
#define FACTORY_PUBLIC
Definition globaldefs.h:25
OSTREAM
#define OSTREAM
CF_INLINE
#define CF_INLINE
Definition factory.h:208
ISTREAM
#define ISTREAM
CF_NO_INLINE
#define CF_NO_INLINE
Definition factory.h:210
sqrt
gmp_float sqrt(const gmp_float &a)
Definition mpr_complex.cc:319
omallocClass.h
sign
static int sign(int x)
Definition ring.cc:3504
operator<<
ostream & operator<<(ostream &s, const spectrum &spec)
Definition semic.cc:249
si_log2.h
M
#define M
Definition sirandom.c:25
variable.h
operations on variables