carl  24.04
Computer ARithmetic Library
carl::RationalFunction< Pol, AutoSimplify > Class Template Reference

#include <RationalFunction.h>

Public Types

using PolyType = Pol
 
using CoeffType = typename Pol::CoeffType
 
using NumberType = typename Pol::NumberType
 

Public Member Functions

 RationalFunction ()
 
 RationalFunction (int v)
 
 RationalFunction (const CoeffType &c)
 
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
 RationalFunction (Variable v)
 
 RationalFunction (const Pol &p)
 
 RationalFunction (Pol &&p)
 
 RationalFunction (const Pol &nom, const Pol &denom)
 
 RationalFunction (Pol &&nom, Pol &&denom)
 
 RationalFunction (std::optional< std::pair< Pol, Pol >> &&quotient, const CoeffType &num, bool simplified)
 
 RationalFunction (const RationalFunction &_rf)=default
 
 RationalFunction (RationalFunction &&_rf)=default
 
 ~RationalFunction () noexcept=default
 
RationalFunctionoperator= (const RationalFunction &_rf)=default
 
RationalFunctionoperator= (RationalFunction &&_rf)=default
 
Pol nominator () const
 
Pol denominator () const
 
const PolnominatorAsPolynomial () const
 
const PoldenominatorAsPolynomial () const
 
CoeffType nominatorAsNumber () const
 
CoeffType denominatorAsNumber () const
 
bool isSimplified () const
 Checks if this rational function has been simplified since it's last modification. More...
 
void simplify ()
 
RationalFunction inverse () const
 Returns the inverse of this rational function. More...
 
bool is_zero () const
 Check whether the rational function is zero. More...
 
bool is_one () const
 
bool is_constant () const
 
CoeffType constant_part () const
 
std::set< VariablegatherVariables () const
 Collect all occurring variables. More...
 
void gatherVariables (std::set< Variable > &vars) const
 Add all occurring variables to the set vars. More...
 
CoeffType evaluate (const std::map< Variable, CoeffType > &substitutions) const
 Evaluate the polynomial at the point described by substitutions. More...
 
RationalFunction substitute (const std::map< Variable, CoeffType > &substitutions) const
 
RationalFunction derivative (const Variable &x, unsigned nth=1) const
 Derivative of the rational function with respect to variable x. More...
 
std::string toString (bool infix=true, bool friendlyNames=true) const
 
In-place addition operators
RationalFunctionoperator+= (const RationalFunction &rhs)
 Add something to this rational function and return the changed rational function. More...
 
RationalFunctionoperator+= (const Pol &rhs)
 Add something to this rational function and return the changed rational function. More...
 
RationalFunctionoperator+= (const Term< CoeffType > &rhs)
 Add something to this rational function and return the changed rational function. More...
 
RationalFunctionoperator+= (const Monomial::Arg &rhs)
 Add something to this rational function and return the changed rational function. More...
 
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunctionoperator+= (Variable rhs)
 Add something to this rational function and return the changed rational function. More...
 
RationalFunctionoperator+= (const CoeffType &rhs)
 Add something to this rational function and return the changed rational function. More...
 
In-place subtraction operators
RationalFunctionoperator-= (const RationalFunction &rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
RationalFunctionoperator-= (const Pol &rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
RationalFunctionoperator-= (const Term< CoeffType > &rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
RationalFunctionoperator-= (const Monomial::Arg &rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunctionoperator-= (Variable rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
RationalFunctionoperator-= (const CoeffType &rhs)
 Subtract something from this rational function and return the changed rational function. More...
 
In-place multiplication operators
RationalFunctionoperator*= (const RationalFunction &rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
RationalFunctionoperator*= (const Pol &rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
RationalFunctionoperator*= (const Term< CoeffType > &rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
RationalFunctionoperator*= (const Monomial::Arg &rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunctionoperator*= (Variable rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
RationalFunctionoperator*= (const CoeffType &rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
RationalFunctionoperator*= (carl::sint rhs)
 Multiply something with this rational function and return the changed rational function. More...
 
In-place division operators
RationalFunctionoperator/= (const RationalFunction &rhs)
 Divide this rational function by something and return the changed rational function. More...
 
RationalFunctionoperator/= (const Pol &rhs)
 Divide this rational function by something and return the changed rational function. More...
 
RationalFunctionoperator/= (const Term< CoeffType > &rhs)
 Divide this rational function by something and return the changed rational function. More...
 
RationalFunctionoperator/= (const Monomial::Arg &rhs)
 Divide this rational function by something and return the changed rational function. More...
 
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunctionoperator/= (Variable rhs)
 Divide this rational function by something and return the changed rational function. More...
 
RationalFunctionoperator/= (const CoeffType &rhs)
 Divide this rational function by something and return the changed rational function. More...
 
RationalFunctionoperator/= (unsigned long rhs)
 Divide this rational function by something and return the changed rational function. More...
 

Private Member Functions

void eliminateCommonFactor (bool _justNormalize)
 Helper function for simplify which eliminates the common factor. More...
 
template<bool byInverse = false>
RationalFunctionadd (const RationalFunction &rhs)
 
template<bool byInverse = false>
RationalFunctionadd (const Pol &rhs)
 
template<bool byInverse = false, typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunctionadd (Variable rhs)
 
template<bool byInverse = false>
RationalFunctionadd (const CoeffType &rhs)
 

Private Attributes

std::optional< std::pair< Pol, Pol > > mPolynomialQuotient
 
CoeffType mNumberQuotient
 
bool mIsSimplified
 

Friends

template<typename PolA , bool ASA>
bool operator== (const RationalFunction< PolA, ASA > &lhs, const RationalFunction< PolA, ASA > &rhs)
 
template<typename PolA , bool ASA>
bool operator< (const RationalFunction< PolA, ASA > &lhs, const RationalFunction< PolA, ASA > &rhs)
 
template<typename PolA , bool ASA>
std::ostream & operator<< (std::ostream &os, const RationalFunction< PolA, ASA > &rhs)
 

Detailed Description

template<typename Pol, bool AutoSimplify = false>
class carl::RationalFunction< Pol, AutoSimplify >

Definition at line 21 of file RationalFunction.h.

Member Typedef Documentation

◆ CoeffType

template<typename Pol , bool AutoSimplify = false>
using carl::RationalFunction< Pol, AutoSimplify >::CoeffType = typename Pol::CoeffType

Definition at line 24 of file RationalFunction.h.

◆ NumberType

template<typename Pol , bool AutoSimplify = false>
using carl::RationalFunction< Pol, AutoSimplify >::NumberType = typename Pol::NumberType

Definition at line 25 of file RationalFunction.h.

◆ PolyType

template<typename Pol , bool AutoSimplify = false>
using carl::RationalFunction< Pol, AutoSimplify >::PolyType = Pol

Definition at line 23 of file RationalFunction.h.

Constructor & Destructor Documentation

◆ RationalFunction() [1/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( )
inline

Definition at line 33 of file RationalFunction.h.

Here is the caller graph for this function:

◆ RationalFunction() [2/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( int  v)
inlineexplicit

Definition at line 37 of file RationalFunction.h.

◆ RationalFunction() [3/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( const CoeffType c)
inlineexplicit

Definition at line 41 of file RationalFunction.h.

◆ RationalFunction() [4/11]

template<typename Pol , bool AutoSimplify = false>
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( Variable  v)
inlineexplicit

Definition at line 46 of file RationalFunction.h.

◆ RationalFunction() [5/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( const Pol p)
inlineexplicit

Definition at line 51 of file RationalFunction.h.

◆ RationalFunction() [6/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( Pol &&  p)
inlineexplicit

Definition at line 60 of file RationalFunction.h.

◆ RationalFunction() [7/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( const Pol nom,
const Pol denom 
)
inlineexplicit

Definition at line 69 of file RationalFunction.h.

Here is the call graph for this function:

◆ RationalFunction() [8/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( Pol &&  nom,
Pol &&  denom 
)
inlineexplicit

Definition at line 82 of file RationalFunction.h.

Here is the call graph for this function:

◆ RationalFunction() [9/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( std::optional< std::pair< Pol, Pol >> &&  quotient,
const CoeffType num,
bool  simplified 
)
inlineexplicit

Definition at line 90 of file RationalFunction.h.

◆ RationalFunction() [10/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( const RationalFunction< Pol, AutoSimplify > &  _rf)
default

◆ RationalFunction() [11/11]

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::RationalFunction ( RationalFunction< Pol, AutoSimplify > &&  _rf)
default

◆ ~RationalFunction()

template<typename Pol , bool AutoSimplify = false>
carl::RationalFunction< Pol, AutoSimplify >::~RationalFunction ( )
defaultnoexcept

Member Function Documentation

◆ add() [1/4]

template<typename Pol , bool AutoSimplify = false>
template<bool byInverse = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::add ( const CoeffType rhs)
private

◆ add() [2/4]

template<typename Pol , bool AutoSimplify = false>
template<bool byInverse = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::add ( const Pol rhs)
private

◆ add() [3/4]

template<typename Pol , bool AutoSimplify = false>
template<bool byInverse = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::add ( const RationalFunction< Pol, AutoSimplify > &  rhs)
private

◆ add() [4/4]

template<typename Pol , bool AutoSimplify = false>
template<bool byInverse = false, typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::add ( Variable  rhs)
private

◆ constant_part()

template<typename Pol , bool AutoSimplify = false>
CoeffType carl::RationalFunction< Pol, AutoSimplify >::constant_part ( ) const
inline

Definition at line 207 of file RationalFunction.h.

Here is the call graph for this function:

◆ denominator()

template<typename Pol , bool AutoSimplify = false>
Pol carl::RationalFunction< Pol, AutoSimplify >::denominator ( ) const
inline
Returns
The denominator

Definition at line 118 of file RationalFunction.h.

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

◆ denominatorAsNumber()

template<typename Pol , bool AutoSimplify = false>
CoeffType carl::RationalFunction< Pol, AutoSimplify >::denominatorAsNumber ( ) const
inline
Returns
The denominator as a polynomial.

Definition at line 151 of file RationalFunction.h.

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

◆ denominatorAsPolynomial()

template<typename Pol , bool AutoSimplify = false>
const Pol& carl::RationalFunction< Pol, AutoSimplify >::denominatorAsPolynomial ( ) const
inline
Returns
The denominator as a polynomial.

Definition at line 135 of file RationalFunction.h.

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

◆ derivative()

template<typename Pol , bool AutoSimplify = false>
RationalFunction carl::RationalFunction< Pol, AutoSimplify >::derivative ( const Variable x,
unsigned  nth = 1 
) const

Derivative of the rational function with respect to variable x.

Parameters
xthe main variable
nthwhich derivative one should take
Returns
Todo:

Currently only nth = 1 is supported

Curretnly only factorized polynomials are supported

◆ eliminateCommonFactor()

template<typename Pol , bool AutoSimplify = false>
void carl::RationalFunction< Pol, AutoSimplify >::eliminateCommonFactor ( bool  _justNormalize)
private

Helper function for simplify which eliminates the common factor.

Parameters
_justNormalize
Here is the caller graph for this function:

◆ evaluate()

template<typename Pol , bool AutoSimplify = false>
CoeffType carl::RationalFunction< Pol, AutoSimplify >::evaluate ( const std::map< Variable, CoeffType > &  substitutions) const
inline

Evaluate the polynomial at the point described by substitutions.

Parameters
substitutionsA mapping from variable to constant values.
Returns
The result of the substitution

Definition at line 239 of file RationalFunction.h.

Here is the call graph for this function:

◆ gatherVariables() [1/2]

template<typename Pol , bool AutoSimplify = false>
std::set<Variable> carl::RationalFunction< Pol, AutoSimplify >::gatherVariables ( ) const
inline

Collect all occurring variables.

Returns
All occcurring variables

Definition at line 217 of file RationalFunction.h.

◆ gatherVariables() [2/2]

template<typename Pol , bool AutoSimplify = false>
void carl::RationalFunction< Pol, AutoSimplify >::gatherVariables ( std::set< Variable > &  vars) const
inline

Add all occurring variables to the set vars.

Parameters
vars

Definition at line 227 of file RationalFunction.h.

Here is the call graph for this function:

◆ inverse()

template<typename Pol , bool AutoSimplify = false>
RationalFunction carl::RationalFunction< Pol, AutoSimplify >::inverse ( ) const
inline

Returns the inverse of this rational function.

Returns
Inverse of this.

Definition at line 176 of file RationalFunction.h.

Here is the call graph for this function:

◆ is_constant()

template<typename Pol , bool AutoSimplify = false>
bool carl::RationalFunction< Pol, AutoSimplify >::is_constant ( ) const
inline

Definition at line 203 of file RationalFunction.h.

Here is the caller graph for this function:

◆ is_one()

template<typename Pol , bool AutoSimplify = false>
bool carl::RationalFunction< Pol, AutoSimplify >::is_one ( ) const
inline

Definition at line 196 of file RationalFunction.h.

Here is the call graph for this function:

◆ is_zero()

template<typename Pol , bool AutoSimplify = false>
bool carl::RationalFunction< Pol, AutoSimplify >::is_zero ( ) const
inline

Check whether the rational function is zero.

Returns
true if it is

Definition at line 189 of file RationalFunction.h.

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

◆ isSimplified()

template<typename Pol , bool AutoSimplify = false>
bool carl::RationalFunction< Pol, AutoSimplify >::isSimplified ( ) const
inline

Checks if this rational function has been simplified since it's last modification.

Note that if AutoSimplify is true, this should always return true.

Returns
If this is simplified.

Definition at line 161 of file RationalFunction.h.

◆ nominator()

template<typename Pol , bool AutoSimplify = false>
Pol carl::RationalFunction< Pol, AutoSimplify >::nominator ( ) const
inline
Returns
The nominator

Definition at line 108 of file RationalFunction.h.

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

◆ nominatorAsNumber()

template<typename Pol , bool AutoSimplify = false>
CoeffType carl::RationalFunction< Pol, AutoSimplify >::nominatorAsNumber ( ) const
inline
Returns
The nominator as a polynomial.

Definition at line 143 of file RationalFunction.h.

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

◆ nominatorAsPolynomial()

template<typename Pol , bool AutoSimplify = false>
const Pol& carl::RationalFunction< Pol, AutoSimplify >::nominatorAsPolynomial ( ) const
inline
Returns
The nominator as a polynomial.

Definition at line 127 of file RationalFunction.h.

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

◆ operator*=() [1/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( carl::sint  rhs)

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator*=() [2/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( const CoeffType rhs)

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator*=() [3/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( const Monomial::Arg rhs)
inline

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 368 of file RationalFunction.h.

◆ operator*=() [4/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( const Pol rhs)

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator*=() [5/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( const RationalFunction< Pol, AutoSimplify > &  rhs)

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator*=() [6/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( const Term< CoeffType > &  rhs)
inline

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 365 of file RationalFunction.h.

◆ operator*=() [7/7]

template<typename Pol , bool AutoSimplify = false>
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator*= ( Variable  rhs)

Multiply something with this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator+=() [1/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( const CoeffType rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 318 of file RationalFunction.h.

◆ operator+=() [2/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( const Monomial::Arg rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 308 of file RationalFunction.h.

◆ operator+=() [3/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( const Pol rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 299 of file RationalFunction.h.

◆ operator+=() [4/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( const RationalFunction< Pol, AutoSimplify > &  rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 295 of file RationalFunction.h.

◆ operator+=() [5/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( const Term< CoeffType > &  rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 303 of file RationalFunction.h.

◆ operator+=() [6/6]

template<typename Pol , bool AutoSimplify = false>
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator+= ( Variable  rhs)
inline

Add something to this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 314 of file RationalFunction.h.

◆ operator-=() [1/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( const CoeffType rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 351 of file RationalFunction.h.

◆ operator-=() [2/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( const Monomial::Arg rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 342 of file RationalFunction.h.

◆ operator-=() [3/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( const Pol rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 334 of file RationalFunction.h.

◆ operator-=() [4/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( const RationalFunction< Pol, AutoSimplify > &  rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 330 of file RationalFunction.h.

◆ operator-=() [5/6]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( const Term< CoeffType > &  rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 338 of file RationalFunction.h.

◆ operator-=() [6/6]

template<typename Pol , bool AutoSimplify = false>
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator-= ( Variable  rhs)
inline

Subtract something from this rational function and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 347 of file RationalFunction.h.

◆ operator/=() [1/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( const CoeffType rhs)

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator/=() [2/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( const Monomial::Arg rhs)
inline

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 389 of file RationalFunction.h.

◆ operator/=() [3/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( const Pol rhs)

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator/=() [4/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( const RationalFunction< Pol, AutoSimplify > &  rhs)

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator/=() [5/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( const Term< CoeffType > &  rhs)
inline

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

Definition at line 386 of file RationalFunction.h.

◆ operator/=() [6/7]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( unsigned long  rhs)

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator/=() [7/7]

template<typename Pol , bool AutoSimplify = false>
template<typename P = Pol, DisableIf< needs_cache_type< P >> = dummy>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator/= ( Variable  rhs)

Divide this rational function by something and return the changed rational function.

Parameters
rhsRight hand side.
Returns
Changed rational function.

◆ operator=() [1/2]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator= ( const RationalFunction< Pol, AutoSimplify > &  _rf)
default

◆ operator=() [2/2]

template<typename Pol , bool AutoSimplify = false>
RationalFunction& carl::RationalFunction< Pol, AutoSimplify >::operator= ( RationalFunction< Pol, AutoSimplify > &&  _rf)
default

◆ simplify()

template<typename Pol , bool AutoSimplify = false>
void carl::RationalFunction< Pol, AutoSimplify >::simplify ( )
inline

Definition at line 165 of file RationalFunction.h.

Here is the call graph for this function:

◆ substitute()

template<typename Pol , bool AutoSimplify = false>
RationalFunction carl::RationalFunction< Pol, AutoSimplify >::substitute ( const std::map< Variable, CoeffType > &  substitutions) const
inline

Definition at line 247 of file RationalFunction.h.

Here is the call graph for this function:

◆ toString()

template<typename Pol , bool AutoSimplify = false>
std::string carl::RationalFunction< Pol, AutoSimplify >::toString ( bool  infix = true,
bool  friendlyNames = true 
) const

Friends And Related Function Documentation

◆ operator<

template<typename Pol , bool AutoSimplify = false>
template<typename PolA , bool ASA>
bool operator< ( const RationalFunction< PolA, ASA > &  lhs,
const RationalFunction< PolA, ASA > &  rhs 
)
friend

◆ operator<<

template<typename Pol , bool AutoSimplify = false>
template<typename PolA , bool ASA>
std::ostream& operator<< ( std::ostream &  os,
const RationalFunction< PolA, ASA > &  rhs 
)
friend

◆ operator==

template<typename Pol , bool AutoSimplify = false>
template<typename PolA , bool ASA>
bool operator== ( const RationalFunction< PolA, ASA > &  lhs,
const RationalFunction< PolA, ASA > &  rhs 
)
friend

Field Documentation

◆ mIsSimplified

template<typename Pol , bool AutoSimplify = false>
bool carl::RationalFunction< Pol, AutoSimplify >::mIsSimplified
private

Definition at line 30 of file RationalFunction.h.

◆ mNumberQuotient

template<typename Pol , bool AutoSimplify = false>
CoeffType carl::RationalFunction< Pol, AutoSimplify >::mNumberQuotient
private

Definition at line 29 of file RationalFunction.h.

◆ mPolynomialQuotient

template<typename Pol , bool AutoSimplify = false>
std::optional<std::pair<Pol, Pol> > carl::RationalFunction< Pol, AutoSimplify >::mPolynomialQuotient
private

Definition at line 28 of file RationalFunction.h.


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