Loading...
Searching...
No Matches
int_cf.cc
Go to the documentation of this file.
/* emacs edit mode for this file is -*- C++ -*- */
#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "int_cf.h"
#include "canonicalform.h"
#include "cf_factory.h"
/** bool InternalCF::isOne, isZero () const
* @sa CanonicalForm::isOne(), CanonicalForm::isZero()
**/
bool
InternalCF::isOne () const
{
return false;
}
bool
InternalCF::isZero () const
{
return false;
}
/** CanonicalForm InternalCF::lc (), Lc (), LC ()
* @sa CanonicalForm::lc(), Lc(), LC()
**/
CanonicalForm
InternalCF::lc ()
{
return CanonicalForm( copyObject() );
}
CanonicalForm
InternalCF::Lc ()
{
return CanonicalForm( copyObject() );
}
CanonicalForm
InternalCF::LC ()
{
return CanonicalForm( copyObject() );
}
/** int InternalCF::degree ()
* @sa CanonicalForm::degree()
**/
int
InternalCF::degree ()
{
if ( isZero() )
return -1;
else
return 0;
}
/** CanonicalForm InternalCF::tailcoeff (), int InternalCF::taildegree ()
* @sa CanonicalForm::tailcoeff(), taildegree()
**/
CanonicalForm
InternalCF::tailcoeff ()
{
return CanonicalForm( copyObject() );
}
int
InternalCF::taildegree ()
{
if ( isZero() )
return -1;
else
return 0;
}
/** InternalCF * InternalCF::num (), den ()
* @sa CanonicalForm::num(), den()
**/
InternalCF *
InternalCF::num ()
{
return copyObject();
}
InternalCF *
InternalCF::den ()
{
return CFFactory::basic( 1 );
}
/** InternalCF * InternalCF::sqrt ()
* @sa CanonicalForm::sqrt()
**/
InternalCF *
InternalCF::sqrt ()
{
ASSERT1( 0, "sqrt() not implemented for class %s", this->classname() );
return 0;
}
/** int InternalCF::ilog2 ()
* @sa CanonicalForm::ilog2()
**/
int
InternalCF::ilog2 ()
{
ASSERT1( 0, "ilog2() not implemented for class %s", this->classname() );
return 0;
}
/** CanonicalForm InternalCF::coeff ( int i )
* @sa CanonicalForm::operator []()
**/
CanonicalForm
InternalCF::coeff ( int i )
{
if ( i == 0 )
return CanonicalForm( copyObject() );
else
return CanonicalForm( 0 );
}
/** InternalCF * InternalCF::bgcdsame, bgcdcoeff ( const InternalCF * const )
* @sa CanonicalForm::bgcd()
**/
InternalCF *
InternalCF::bgcdsame ( const InternalCF * const ) const
{
ASSERT1( 0, "bgcd() not implemented for class %s", this->classname() );
return CFFactory::basic( 0 );
}
InternalCF *
InternalCF::bgcdcoeff ( const InternalCF * const )
{
ASSERT1( 0, "bgcd() not implemented for class %s", this->classname() );
return CFFactory::basic( 0 );
}
/** InternalCF * InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
* @sa CanonicalForm::bextgcd()
**/
InternalCF *
InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
{
ASSERT1( 0, "bextgcd() not implemented for class %s", this->classname() );
a = 0; b = 0;
return CFFactory::basic( 0 );
}
InternalCF *
InternalCF::bextgcdcoeff ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
{
ASSERT1( 0, "bextgcd() not implemented for class %s", this->classname() );
a = 0; b = 0;
return CFFactory::basic( 0 );
}
long
InternalCF::intval() const
{
ASSERT1( 0, "intval() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::invert()
{
ASSERT1( 0, "invert() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::tryMulsame( InternalCF*, const CanonicalForm&)
{
ASSERT1( 0, "tryMulsame() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::tryInvert ( const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryInvert() not implemented for class %s", this->classname() );
return 0;
}
bool
InternalCF::tryDivremsamet ( InternalCF*, InternalCF*&, InternalCF*&, const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryDivremsamet() not implemented for class %s", this->classname() );
return 0;
}
bool
InternalCF::tryDivremcoefft ( InternalCF*, InternalCF*&, InternalCF*&, bool, const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryDivremcoefft() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::tryDivsame ( InternalCF*, const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryDivsame() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::tryDivcoeff ( InternalCF*, bool, const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryDivcoeff() not implemented for class %s", this->classname() );
return 0;
}
InternalCF*
InternalCF::tryDividecoeff ( InternalCF*, bool, const CanonicalForm&, bool&)
{
ASSERT1( 0, "tryDividecoeff() not implemented for class %s", this->classname() );
return 0;
}
canonicalform.h
Header for factory's main class CanonicalForm.
i
int i
Definition cfEzgcd.cc:132
b
CanonicalForm b
Definition cfModGcd.cc:4111
cf_assert.h
assertions for Factory
ASSERT1
#define ASSERT1(expression, message, parameter1)
Definition cf_assert.h:101
cf_defs.h
factory switches.
cf_factory.h
Interface to generate InternalCF's over various domains from intrinsic types or mpz_t's.
CFFactory::basic
static InternalCF * basic(int value)
Definition cf_factory.cc:61
CanonicalForm
factory's main class
Definition canonicalform.h:86
InternalCF
virtual class for internal CanonicalForm's
Definition int_cf.h:47
InternalCF::tryMulsame
virtual InternalCF * tryMulsame(InternalCF *, const CanonicalForm &)
Definition int_cf.cc:179
InternalCF::copyObject
InternalCF * copyObject()
Definition int_cf.h:62
InternalCF::Lc
virtual CanonicalForm Lc()
Definition int_cf.cc:40
InternalCF::tryDivcoeff
virtual InternalCF * tryDivcoeff(InternalCF *, bool, const CanonicalForm &, bool &)
Definition int_cf.cc:214
InternalCF::tailcoeff
virtual CanonicalForm tailcoeff()
CanonicalForm InternalCF::tailcoeff (), int InternalCF::taildegree ().
Definition int_cf.cc:67
InternalCF::lc
virtual CanonicalForm lc()
CanonicalForm InternalCF::lc (), Lc (), LC ().
Definition int_cf.cc:34
InternalCF::classname
virtual const char * classname() const PVIRT_CHARCC("classname")
InternalCF::InternalCF
InternalCF()
Definition int_cf.h:55
InternalCF::tryDivremsamet
virtual bool tryDivremsamet(InternalCF *, InternalCF *&, InternalCF *&, const CanonicalForm &, bool &)
Definition int_cf.cc:193
InternalCF::tryDividecoeff
virtual InternalCF * tryDividecoeff(InternalCF *, bool, const CanonicalForm &, bool &)
Definition int_cf.cc:221
InternalCF::intval
virtual long intval() const
Definition int_cf.cc:165
InternalCF::isZero
virtual bool isZero() const
Definition int_cf.cc:24
InternalCF::tryInvert
virtual InternalCF * tryInvert(const CanonicalForm &, bool &)
Definition int_cf.cc:186
InternalCF::degree
virtual int degree()
int InternalCF::degree ()
Definition int_cf.cc:55
InternalCF::bextgcdsame
virtual InternalCF * bextgcdsame(InternalCF *, CanonicalForm &, CanonicalForm &)
InternalCF * InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b ).
Definition int_cf.cc:149
InternalCF::ilog2
virtual int ilog2()
int InternalCF::ilog2 ()
Definition int_cf.cc:110
InternalCF::LC
virtual CanonicalForm LC()
Definition int_cf.cc:46
InternalCF::num
virtual InternalCF * num()
InternalCF * InternalCF::num (), den ().
Definition int_cf.cc:85
InternalCF::den
virtual InternalCF * den()
Definition int_cf.cc:91
InternalCF::sqrt
virtual InternalCF * sqrt()
InternalCF * InternalCF::sqrt ().
Definition int_cf.cc:100
InternalCF::tryDivremcoefft
virtual bool tryDivremcoefft(InternalCF *, InternalCF *&, InternalCF *&, bool, const CanonicalForm &, bool &)
Definition int_cf.cc:200
InternalCF::invert
virtual InternalCF * invert()
Definition int_cf.cc:172
InternalCF::tryDivsame
virtual InternalCF * tryDivsame(InternalCF *, const CanonicalForm &, bool &)
Definition int_cf.cc:207
InternalCF::bgcdsame
virtual InternalCF * bgcdsame(const InternalCF *const) const
InternalCF * InternalCF::bgcdsame, bgcdcoeff ( const InternalCF * const ).
Definition int_cf.cc:132
InternalCF::coeff
virtual CanonicalForm coeff(int i)
CanonicalForm InternalCF::coeff ( int i ).
Definition int_cf.cc:120
InternalCF::bextgcdcoeff
virtual InternalCF * bextgcdcoeff(InternalCF *, CanonicalForm &, CanonicalForm &)
Definition int_cf.cc:157
InternalCF::isOne
virtual bool isOne() const
bool InternalCF::isOne, isZero () const
Definition int_cf.cc:18
InternalCF::bgcdcoeff
virtual InternalCF * bgcdcoeff(const InternalCF *const)
Definition int_cf.cc:139
InternalCF::taildegree
virtual int taildegree()
Definition int_cf.cc:73
int_cf.h
Factory's internal CanonicalForm's.