carl  24.04
Computer ARithmetic Library
carl::ReductorEntry< Polynomial > Class Template Reference

An entry in the reduction polynomial. More...

#include <ReductorEntry.h>

Collaboration diagram for carl::ReductorEntry< Polynomial >:

Public Member Functions

 ReductorEntry (const Term< Coeff > &multiple, const Polynomial &pol)
 Constructor with a factor and a polynomial. More...
 
 ReductorEntry (const Term< Coeff > &pol)
 Constructor with implicit factor = 1. More...
 
const Polynomial & getTail () const
 
const Term< Coeff > & getLead () const
 
const Term< Coeff > & getMultiple () const
 
void removeLeadingTerm ()
 Calculate p - lt(p). More...
 
bool addCoefficient (const Coeff &coeffToBeAdded)
 
bool empty () const
 
void print (std::ostream &os=std::cout)
 Output the current polynomial. More...
 

Protected Types

using Coeff = typename Polynomial::CoeffType
 

Protected Attributes

Polynomial mTail
 
Term< CoeffmLead
 
Term< CoeffmMultiple
 

Friends

template<class C >
std::ostream & operator<< (std::ostream &os, const ReductorEntry< C > rhs)
 

Detailed Description

template<class Polynomial>
class carl::ReductorEntry< Polynomial >

An entry in the reduction polynomial.

The class decodes a polynomial given by mLead + mMultiple * mTail.

Definition at line 24 of file ReductorEntry.h.

Member Typedef Documentation

◆ Coeff

template<class Polynomial >
using carl::ReductorEntry< Polynomial >::Coeff = typename Polynomial::CoeffType
protected

Definition at line 27 of file ReductorEntry.h.

Constructor & Destructor Documentation

◆ ReductorEntry() [1/2]

template<class Polynomial >
carl::ReductorEntry< Polynomial >::ReductorEntry ( const Term< Coeff > &  multiple,
const Polynomial &  pol 
)
inline

Constructor with a factor and a polynomial.

Parameters
multiple
polResulting polynomial = multiple * pol.

Definition at line 39 of file ReductorEntry.h.

Here is the call graph for this function:

◆ ReductorEntry() [2/2]

template<class Polynomial >
carl::ReductorEntry< Polynomial >::ReductorEntry ( const Term< Coeff > &  pol)
inlineexplicit

Constructor with implicit factor = 1.

Parameters
pol

Definition at line 49 of file ReductorEntry.h.

Member Function Documentation

◆ addCoefficient()

template<class Polynomial >
bool carl::ReductorEntry< Polynomial >::addCoefficient ( const Coeff coeffToBeAdded)
inline
Parameters
coeffToBeAdded
Returns

Definition at line 96 of file ReductorEntry.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ empty()

template<class Polynomial >
bool carl::ReductorEntry< Polynomial >::empty ( ) const
inline
Returns
true iff the polynomial equals zero

Definition at line 121 of file ReductorEntry.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLead()

template<class Polynomial >
const Term<Coeff>& carl::ReductorEntry< Polynomial >::getLead ( ) const
inline
Returns

Definition at line 66 of file ReductorEntry.h.

Here is the caller graph for this function:

◆ getMultiple()

template<class Polynomial >
const Term<Coeff>& carl::ReductorEntry< Polynomial >::getMultiple ( ) const
inline
Returns

Definition at line 75 of file ReductorEntry.h.

◆ getTail()

template<class Polynomial >
const Polynomial& carl::ReductorEntry< Polynomial >::getTail ( ) const
inline
Returns
The tail of the polynomial, not multiplied by the correct factor!

Definition at line 57 of file ReductorEntry.h.

◆ print()

template<class Polynomial >
void carl::ReductorEntry< Polynomial >::print ( std::ostream &  os = std::cout)
inline

Output the current polynomial.

Parameters
os

Definition at line 131 of file ReductorEntry.h.

Here is the call graph for this function:

◆ removeLeadingTerm()

template<class Polynomial >
void carl::ReductorEntry< Polynomial >::removeLeadingTerm ( )
inline

Calculate p - lt(p).

Definition at line 83 of file ReductorEntry.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

template<class Polynomial >
template<class C >
std::ostream& operator<< ( std::ostream &  os,
const ReductorEntry< C >  rhs 
)
friend

Definition at line 150 of file ReductorEntry.h.

Field Documentation

◆ mLead

template<class Polynomial >
Term<Coeff> carl::ReductorEntry< Polynomial >::mLead
protected

Definition at line 29 of file ReductorEntry.h.

◆ mMultiple

template<class Polynomial >
Term<Coeff> carl::ReductorEntry< Polynomial >::mMultiple
protected

Definition at line 30 of file ReductorEntry.h.

◆ mTail

template<class Polynomial >
Polynomial carl::ReductorEntry< Polynomial >::mTail
protected

Definition at line 28 of file ReductorEntry.h.


The documentation for this class was generated from the following file: