20 template<
typename Poly>
45 explicit SqrtEx(
const Poly& _poly ) :
60 SqrtEx(
const Poly& _constantPart,
const Poly& _factor,
const Poly& _denominator,
const Poly& _radicand ):
61 SqrtEx( Poly( _constantPart ), Poly( _factor ), Poly( _denominator ), Poly( _radicand ) )
64 SqrtEx( Poly&& _constantPart, Poly&& _factor, Poly&& _denominator, Poly&& _radicand );
247 std::string
toString(
bool _infix =
false,
bool _friendlyNames =
true )
const;
250 template<
typename Poly>
265 template<
typename Poly>
266 struct hash<
carl::SqrtEx<Poly>>
carl is the main namespace for the library.
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
bool is_integer(const Interval< Number > &n)
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
bool is_one(const Interval< Number > &i)
Check if this interval is a point-interval containing 1.
A Variable represents an algebraic variable that can be used throughout carl.
T type
A type associated with the type.
Poly m_denominator
The denominator d of this square root expression (c + f * sqrt(r))/d.
SqrtEx operator-(const SqrtEx &rhs) const
bool is_polynomial() const
Poly m_radicand
The radicand r of this square root expression (c + f * sqrt(r))/d.
const Poly & radicand() const
SqrtEx(const Poly &_constantPart, const Poly &_factor, const Poly &_denominator, const Poly &_radicand)
Constructs a square root expression from given constant part, factor, denominator and radicand.
SqrtEx(Poly &&_poly)
Constructs a square root expression from a polynomial p leading to (p + 0 * sqrt( 0 )) / 1.
SqrtEx(const Poly &_poly)
Rational asRational() const
Poly as_polynomial() const
SqrtEx & operator=(const Poly &_poly)
const Poly & constant_part() const
const Poly & denominator() const
friend std::ostream & operator<<(std::ostream &_out, const SqrtEx< P > &_sqrtEx)
Prints the given square root expression on the given stream.
Poly m_factor
The factor f of this square root expression (c + f * sqrt(r))/d.
void normalize()
Normalizes this object, that is extracts as much as possible from the radicand into the factor and ca...
typename UnderlyingNumberType< Poly >::type Rational
std::string toString(bool _infix=false, bool _friendlyNames=true) const
SqrtEx operator*(const SqrtEx &rhs) const
const Poly & factor() const
bool operator==(const SqrtEx &_toCompareWith) const
SqrtEx(Variable::Arg _var)
SqrtEx operator/(const SqrtEx &rhs) const
Poly m_constant_part
The constant part c of this square root expression (c + f * sqrt(r))/d.
SqrtEx()
Default Constructor.
SqrtEx operator+(const SqrtEx &rhs) const
Rational asConstant() const
SqrtEx(Poly &&_constantPart, Poly &&_factor, Poly &&_denominator, Poly &&_radicand)
std::size_t operator()(const carl::SqrtEx< Poly > &_sqrtEx) const