#include <SqrtEx.h>
|
void | normalize () |
| Normalizes this object, that is extracts as much as possible from the radicand into the factor and cancels the enumerator and denominator afterwards. More...
|
|
|
Poly | m_constant_part |
| The constant part c of this square root expression (c + f * sqrt(r))/d. More...
|
|
Poly | m_factor |
| The factor f of this square root expression (c + f * sqrt(r))/d. More...
|
|
Poly | m_denominator |
| The denominator d of this square root expression (c + f * sqrt(r))/d. More...
|
|
Poly | m_radicand |
| The radicand r of this square root expression (c + f * sqrt(r))/d. More...
|
|
|
template<typename P > |
std::ostream & | operator<< (std::ostream &_out, const SqrtEx< P > &_sqrtEx) |
| Prints the given square root expression on the given stream. More...
|
|
template<typename Poly>
class carl::SqrtEx< Poly >
Definition at line 21 of file SqrtEx.h.
◆ Rational
◆ SqrtEx() [1/6]
Default Constructor.
( constructs (0 + 0 * sqrt( 0 )) / 1 )
◆ SqrtEx() [2/6]
Constructs a square root expression from a polynomial p leading to (p + 0 * sqrt( 0 )) / 1.
- Parameters
-
_poly | The polynomial to construct a square root expression for. |
◆ SqrtEx() [3/6]
◆ SqrtEx() [4/6]
◆ SqrtEx() [5/6]
template<typename Poly >
carl::SqrtEx< Poly >::SqrtEx |
( |
const Poly & |
_constantPart, |
|
|
const Poly & |
_factor, |
|
|
const Poly & |
_denominator, |
|
|
const Poly & |
_radicand |
|
) |
| |
|
inline |
Constructs a square root expression from given constant part, factor, denominator and radicand.
- Parameters
-
_constantPart | The constant part of the square root expression to construct. |
_factor | The factor of the square root expression to construct. |
_denominator | The denominator of the square root expression to construct. |
_radicand | The radicand of the square root expression to construct. |
Definition at line 60 of file SqrtEx.h.
◆ SqrtEx() [6/6]
template<typename Poly >
carl::SqrtEx< Poly >::SqrtEx |
( |
Poly && |
_constantPart, |
|
|
Poly && |
_factor, |
|
|
Poly && |
_denominator, |
|
|
Poly && |
_radicand |
|
) |
| |
◆ as_polynomial()
- Returns
- The square root expression as a polynomial (note that there must be no square root nor denominator
Definition at line 119 of file SqrtEx.h.
◆ asConstant()
- Returns
- This sqrtEx as an integer (note, that it must actually represent an integer then).
Definition at line 138 of file SqrtEx.h.
◆ asRational()
- Returns
- This sqrtEx as a rational (note, that it must actually represent a rational then).
Definition at line 156 of file SqrtEx.h.
◆ constant_part()
- Returns
- A constant reference to the constant part of this square root expression.
Definition at line 69 of file SqrtEx.h.
◆ denominator()
- Returns
- A constant reference to the denominator of this square root expression.
Definition at line 85 of file SqrtEx.h.
◆ factor()
- Returns
- A constant reference to the factor of this square root expression.
Definition at line 77 of file SqrtEx.h.
◆ has_sqrt()
- Returns
- true, if the square root expression has a non trivial radicand; false, otherwise.
Definition at line 102 of file SqrtEx.h.
◆ is_constant()
- Returns
- true, if there is no variable in this square root expression; false, otherwise.
Definition at line 130 of file SqrtEx.h.
◆ is_integer()
- Returns
- true, if the this square root expression corresponds to an integer value; false, otherwise.
Definition at line 178 of file SqrtEx.h.
◆ is_polynomial()
- Returns
- true, if the square root expression can be expressed as a polynomial; false, otherwise.
Definition at line 111 of file SqrtEx.h.
◆ isRational()
- Returns
- true, if there is no variable in this square root expression; false, otherwise.
Definition at line 148 of file SqrtEx.h.
◆ normalize()
Normalizes this object, that is extracts as much as possible from the radicand into the factor and cancels the enumerator and denominator afterwards.
◆ operator*()
- Parameters
-
_factorA | First factor. |
_factorB | Second factor. |
- Returns
- The product of the given square root expressions.
◆ operator+()
- Parameters
-
_summandA | First summand. |
_summandB | Second summand. |
- Returns
- The sum of the given square root expressions.
◆ operator-()
- Parameters
-
_minuend | Minuend. |
_subtrahend | Subtrahend. |
- Returns
- The difference of the given square root expressions.
◆ operator/()
- Parameters
-
_dividend | Dividend. |
_divisor | Divisor. |
- Returns
- The result of the first given square root expression divided by the second one Note that the second argument is not allowed to contain a square root.
◆ operator=()
- Parameters
-
_sqrtEx | A square root expression, which gets the new content of this square root expression. |
- Returns
- A reference to this object.
- Parameters
-
_poly | A polynomial, which gets the new content of this square root expression. |
- Returns
- A reference to this object.
◆ operator==()
- Parameters
-
_sqrtEx | Square root expression to compare with. |
- Returns
- true, if this square root expression and the given one are equal; false, otherwise.
◆ radicand()
- Returns
- A constant reference to the radicand of this square root expression.
Definition at line 93 of file SqrtEx.h.
◆ toString()
template<typename Poly >
std::string carl::SqrtEx< Poly >::toString |
( |
bool |
_infix = false , |
|
|
bool |
_friendlyNames = true |
|
) |
| const |
- Parameters
-
_infix | A string which is printed in the beginning of each row. |
_friendlyNames | A flag that indicates whether to print the variables with their internal representation (false) or with their dedicated names. |
- Returns
- The string representation of this square root expression.
◆ operator<<
template<typename Poly >
template<typename P >
std::ostream& operator<< |
( |
std::ostream & |
_out, |
|
|
const SqrtEx< P > & |
_sqrtEx |
|
) |
| |
|
friend |
Prints the given square root expression on the given stream.
- Parameters
-
_out | The stream to print on. |
_sqrtEx | The square root expression to print. |
- Returns
- The stream after printing the square root expression on it.
◆ m_constant_part
The constant part c of this square root expression (c + f * sqrt(r))/d.
Definition at line 26 of file SqrtEx.h.
◆ m_denominator
The denominator d of this square root expression (c + f * sqrt(r))/d.
Definition at line 30 of file SqrtEx.h.
◆ m_factor
The factor f of this square root expression (c + f * sqrt(r))/d.
Definition at line 28 of file SqrtEx.h.
◆ m_radicand
The radicand r of this square root expression (c + f * sqrt(r))/d.
Definition at line 32 of file SqrtEx.h.
The documentation for this class was generated from the following file: