|
| void * | operator new (size_t) |
| void | operator delete (void *addr, size_t) |
| | InternalInteger () |
| | InternalInteger (const InternalCF &) |
| | InternalInteger (const int i) |
| | InternalInteger (const long i) |
| | InternalInteger (const char *str, const int base=10) |
| | InternalInteger (const mpz_ptr mpi) |
| | ~InternalInteger () |
| InternalCF * | deepCopyObject () const |
| const char * | classname () const |
| void | print (OSTREAM &, char *) |
| InternalCF * | genZero () |
| InternalCF * | genOne () |
| bool | is_imm () const |
| int | levelcoeff () const |
| InternalCF * | neg () |
| | InternalCF * InternalInteger::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) |
| InternalCF * | bgcdsame (const InternalCF *const) const |
| InternalCF * | bgcdcoeff (const InternalCF *const) |
| InternalCF * | bextgcdsame (InternalCF *, CanonicalForm &, CanonicalForm &) |
| InternalCF * | bextgcdcoeff (InternalCF *, CanonicalForm &, CanonicalForm &) |
| long | intval () const |
| int | intmod (int p) const |
| int | sign () const |
| | int InternalInteger::sign () const
|
| InternalCF * | sqrt () |
| | InternalCF * InternalInteger::sqrt ().
|
| int | ilog2 () |
| | int InternalInteger::ilog2 ()
|
| | InternalCF () |
| | InternalCF (const InternalCF &) |
| virtual | ~InternalCF () |
| int | deleteObject () |
| InternalCF * | copyObject () |
| virtual int | level () const |
| virtual int | type () const |
| virtual Variable | variable () const |
| virtual bool | inBaseDomain () const |
| virtual bool | inExtension () const |
| virtual bool | inCoeffDomain () const |
| virtual bool | inPolyDomain () const |
| virtual bool | inQuotDomain () const |
| virtual bool | isZero () const |
| virtual bool | isOne () const |
| | bool InternalCF::isOne, isZero () const
|
| virtual bool | isUnivariate () const |
| virtual InternalCF * | num () |
| | InternalCF * InternalCF::num (), den ().
|
| virtual InternalCF * | den () |
| virtual InternalCF * | invert () |
| virtual InternalCF * | tryInvert (const CanonicalForm &, bool &) |
| virtual InternalCF * | tryMulsame (InternalCF *, const CanonicalForm &) |
| virtual InternalCF * | tryDivsame (InternalCF *, const CanonicalForm &, bool &) |
| virtual bool | tryDivremsamet (InternalCF *, InternalCF *&, InternalCF *&, const CanonicalForm &, bool &) |
| virtual InternalCF * | tryDividecoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| virtual InternalCF * | tryDivcoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| virtual bool | tryDivremcoefft (InternalCF *, InternalCF *&, InternalCF *&, bool, const CanonicalForm &, bool &) |
| virtual CanonicalForm | lc () |
| | CanonicalForm InternalCF::lc (), Lc (), LC ().
|
| virtual CanonicalForm | Lc () |
| virtual CanonicalForm | LC () |
| virtual CanonicalForm | coeff (int i) |
| | CanonicalForm InternalCF::coeff ( int i ).
|
| virtual int | degree () |
| | int InternalCF::degree ()
|
| virtual int | taildegree () |
| virtual CanonicalForm | tailcoeff () |
| | CanonicalForm InternalCF::tailcoeff (), int InternalCF::taildegree ().
|
| void * | operator new (size_t size) throw (std::bad_alloc) |
| void | operator delete (void *block) throw () |
| void * | operator new[] (size_t size) throw (std::bad_alloc) |
| void | operator delete[] (void *block) throw () |
| void * | operator new (size_t size, const std::nothrow_t &) throw () |
| void * | operator new[] (size_t size, const std::nothrow_t &) throw () |
factory's class for integers
an integer is represented as an mpz_t thempi
- See also
- InternalRational
Definition at line 55 of file int_int.h.
| InternalCF * InternalInteger::normalizeMPI |
( |
mpz_ptr | aMpi | ) |
|
|
inlinestaticprivate |
uiNormalizeMyself()' is the same as normalizeMyself()' except that CO is expected to be non-negative.
In this case, we may use `mpz_get_ui()' to convert the underlying mpi into an immediate which is slightly faster than the signed variant.
Note: We do not mind reference counting at this point! CO is deleted unconditionally! **/ inline InternalCF * InternalInteger::uiNormalizeMyself () { ASSERT( getRefCount() == 1, "internal error: must not delete CO" );
if ( mpz_is_imm( thempi ) ) { InternalCF * result = int2imm( mpz_get_ui( thempi ) ); delete this; return result; } else return this; }
/**
normalizeMPI(), uiNormalizeMPI() - normalize a mpi.
If aMpi' fits into an immediate integer, clear aMpi' and return the immediate. Otherwise, return a new InternalInteger' with aMpi' as underlying mpi.
Definition at line 216 of file int_int.h.
217{
220 mpz_clear( aMpi );
222 } else
224}