SMTStabilizer API
Public API documentation for SMTStabilizer
Loading...
Searching...
No Matches
stabilizer::parser::Interval Class Reference

#include <interval.h>

Collaboration diagram for stabilizer::parser::Interval:

Public Member Functions

 Interval (Number lower=Number::zero(), Number upper=Number::zero(), bool leftClosed=true, bool rightClosed=true)
 
 Interval (const Interval &other)
 
Intervaloperator= (const Interval &other)
 
 ~Interval ()
 
void setLower (const Number &lower)
 
void setUpper (const Number &upper)
 
void setLeftClosed (bool leftClosed)
 
void setRightClosed (bool rightClosed)
 
Number getLower () const
 
Number getUpper () const
 
bool isLeftClosed () const
 
bool isRightClosed () const
 
bool isLeftUnbounded () const
 
bool isRightUnbounded () const
 
Number midpoint () const
 
std::string toString () const
 
void getIntegers (std::vector< Number > &integers) const
 
bool isPoint () const
 
bool isEmpty () const
 
Number width () const
 
bool contains (const Number &value) const
 
bool isSubsetOf (const Interval &other) const
 
bool isSubsetEqOf (const Interval &other) const
 
bool isSupersetOf (const Interval &other) const
 
bool isDisjointFrom (const Interval &other) const
 
bool isIntersectingWith (const Interval &other) const
 
Interval intersection (const Interval &other) const
 
Interval unionWith (const Interval &other) const
 
std::vector< Intervaldifference (const Interval &other) const
 
size_t getIntervalIntCount () const
 
Interval operator++ () const
 
Interval operator-- () const
 
Interval operator- () const
 
Interval operator+ () const
 
Interval operator~ () const
 
Interval operator! () const
 
Interval operator++ (int) const
 
Interval operator-- (int) const
 
Interval negate () const
 
Interval abs () const
 
Interval lb () const
 
Interval ln () const
 
Interval lg () const
 
Interval pow2 () const
 
Interval exp () const
 
Interval sqrt () const
 
Interval safeSqrt () const
 
Interval sin () const
 
Interval cos () const
 
Interval tan () const
 
Interval cot () const
 
Interval sec () const
 
Interval csc () const
 
Interval asin () const
 
Interval acos () const
 
Interval atan () const
 
Interval acot () const
 
Interval asec () const
 
Interval acsc () const
 
Interval sinh () const
 
Interval cosh () const
 
Interval tanh () const
 
Interval coth () const
 
Interval sech () const
 
Interval csch () const
 
Interval asinh () const
 
Interval acosh () const
 
Interval atanh () const
 
Interval acoth () const
 
Interval asech () const
 
Interval acsch () const
 
Interval operator+ (const Number &value) const
 
Interval operator- (const Number &value) const
 
Interval operator* (const Number &value) const
 
Interval operator/ (const Number &value) const
 
Interval operator% (const Number &value) const
 
Interval operator^ (const Number &value) const
 
Interval operator+ (const Interval &other) const
 
Interval operator- (const Interval &other) const
 
Interval operator* (const Interval &other) const
 
Interval operator/ (const Interval &other) const
 
Interval operator% (const Interval &other) const
 
Interval operator^ (const Interval &other) const
 
Interval add (const Number &value) const
 
Interval add (const Interval &other) const
 
Interval sub (const Number &value) const
 
Interval sub (const Interval &other) const
 
Interval mul (const Number &value) const
 
Interval mul (const Interval &other) const
 
Interval divReal (const Number &value) const
 
Interval divReal (const Interval &other) const
 
Interval divInt (const Number &value) const
 
Interval divInt (const Interval &other) const
 
Interval mod (const Number &value) const
 
Interval mod (const Interval &other) const
 
Interval pow (const Number &exp) const
 
Interval pow (const Interval &exp) const
 
Interval atan2 (const Number &x) const
 
Interval atan2 (const Interval &x) const
 
Interval log (const Number &base) const
 
Interval log (const Interval &base) const
 
Interval operate (const NODE_KIND &kind) const
 
Interval operate (const NODE_KIND &kind, const Number &value) const
 
Interval operate (const NODE_KIND &kind, const Interval &other) const
 
bool operator== (const Interval &other) const
 
bool operator!= (const Interval &other) const
 
bool operator< (const Interval &other) const
 
bool operator<= (const Interval &other) const
 
bool operator> (const Interval &other) const
 
bool operator>= (const Interval &other) const
 
Intervaloperator+= (const Number &value)
 
Intervaloperator-= (const Number &value)
 
Intervaloperator*= (const Number &value)
 
Intervaloperator/= (const Number &value)
 

Static Public Member Functions

static std::vector< IntervalunionMulti (const std::vector< Interval > &intervals)
 

Private Attributes

Number lower
 
Number upper
 
bool leftClosed
 
bool rightClosed
 

Detailed Description

Definition at line 41 of file interval.h.

Constructor & Destructor Documentation

◆ Interval() [1/2]

stabilizer::parser::Interval::Interval ( Number  lower = Number::zero(),
Number  upper = Number::zero(),
bool  leftClosed = true,
bool  rightClosed = true 
)

Definition at line 35 of file interval.cpp.

◆ Interval() [2/2]

stabilizer::parser::Interval::Interval ( const Interval other)

Definition at line 38 of file interval.cpp.

◆ ~Interval()

stabilizer::parser::Interval::~Interval ( )

Definition at line 41 of file interval.cpp.

Member Function Documentation

◆ abs()

Interval stabilizer::parser::Interval::abs ( ) const

◆ acos()

Interval stabilizer::parser::Interval::acos ( ) const

◆ acosh()

◆ acot()

Interval stabilizer::parser::Interval::acot ( ) const

◆ acoth()

Interval stabilizer::parser::Interval::acoth ( ) const

◆ acsc()

Interval stabilizer::parser::Interval::acsc ( ) const

◆ acsch()

Interval stabilizer::parser::Interval::acsch ( ) const

◆ add() [1/2]

Interval stabilizer::parser::Interval::add ( const Interval other) const

Definition at line 1460 of file interval.cpp.

◆ add() [2/2]

Interval stabilizer::parser::Interval::add ( const Number value) const

Definition at line 1458 of file interval.cpp.

◆ asec()

Interval stabilizer::parser::Interval::asec ( ) const

◆ asech()

Interval stabilizer::parser::Interval::asech ( ) const

◆ asin()

◆ asinh()

◆ atan()

◆ atan2() [1/2]

◆ atan2() [2/2]

◆ atanh()

◆ contains()

bool stabilizer::parser::Interval::contains ( const Number value) const

Definition at line 129 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by cot(), csc(), divReal(), and sec().

◆ cos()

◆ cosh()

◆ cot()

◆ coth()

◆ csc()

◆ csch()

◆ difference()

std::vector< Interval > stabilizer::parser::Interval::difference ( const Interval other) const

Definition at line 269 of file interval.cpp.

References isDisjointFrom(), isSubsetOf(), isSupersetOf(), leftClosed, lower, rightClosed, and upper.

◆ divInt() [1/2]

Interval stabilizer::parser::Interval::divInt ( const Interval other) const

◆ divInt() [2/2]

Interval stabilizer::parser::Interval::divInt ( const Number value) const

Definition at line 1548 of file interval.cpp.

References stabilizer::parser::EmptyInterval, isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by operate(), and operate().

◆ divReal() [1/2]

Interval stabilizer::parser::Interval::divReal ( const Interval other) const

◆ divReal() [2/2]

Interval stabilizer::parser::Interval::divReal ( const Number value) const

Definition at line 1478 of file interval.cpp.

References stabilizer::parser::EmptyInterval, isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by operate(), operate(), and operator/().

◆ exp()

◆ getIntegers()

void stabilizer::parser::Interval::getIntegers ( std::vector< Number > &  integers) const

◆ getIntervalIntCount()

size_t stabilizer::parser::Interval::getIntervalIntCount ( ) const

◆ getLower()

Number stabilizer::parser::Interval::getLower ( ) const

Definition at line 1470 of file interval.cpp.

References lower.

Referenced by atan2(), csch(), pow(), and sech().

◆ getUpper()

Number stabilizer::parser::Interval::getUpper ( ) const

Definition at line 1472 of file interval.cpp.

References upper.

Referenced by atan2(), csch(), pow(), and sech().

◆ intersection()

Interval stabilizer::parser::Interval::intersection ( const Interval other) const

Definition at line 193 of file interval.cpp.

References stabilizer::parser::EmptyInterval, isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by operate().

◆ isDisjointFrom()

bool stabilizer::parser::Interval::isDisjointFrom ( const Interval other) const

Definition at line 170 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by difference(), isIntersectingWith(), operate(), unionMulti(), and unionWith().

◆ isEmpty()

◆ isIntersectingWith()

bool stabilizer::parser::Interval::isIntersectingWith ( const Interval other) const

Definition at line 185 of file interval.cpp.

References isDisjointFrom(), and isEmpty().

Referenced by operate().

◆ isLeftClosed()

bool stabilizer::parser::Interval::isLeftClosed ( ) const

Definition at line 1474 of file interval.cpp.

References leftClosed.

Referenced by atan2(), pow(), and pow2().

◆ isLeftUnbounded()

bool stabilizer::parser::Interval::isLeftUnbounded ( ) const

Definition at line 82 of file interval.cpp.

References stabilizer::parser::Number::isInfinity(), and lower.

◆ isPoint()

bool stabilizer::parser::Interval::isPoint ( ) const

Definition at line 115 of file interval.cpp.

References lower, and upper.

Referenced by getIntervalIntCount(), and pow().

◆ isRightClosed()

bool stabilizer::parser::Interval::isRightClosed ( ) const

Definition at line 1476 of file interval.cpp.

References rightClosed.

Referenced by atan2(), pow(), and pow2().

◆ isRightUnbounded()

bool stabilizer::parser::Interval::isRightUnbounded ( ) const

Definition at line 84 of file interval.cpp.

References stabilizer::parser::Number::isInfinity(), and upper.

◆ isSubsetEqOf()

bool stabilizer::parser::Interval::isSubsetEqOf ( const Interval other) const

Definition at line 234 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

◆ isSubsetOf()

bool stabilizer::parser::Interval::isSubsetOf ( const Interval other) const

Definition at line 137 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by difference().

◆ isSupersetOf()

bool stabilizer::parser::Interval::isSupersetOf ( const Interval other) const

Definition at line 154 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by difference().

◆ lb()

◆ lg()

◆ ln()

◆ log() [1/2]

Interval stabilizer::parser::Interval::log ( const Interval base) const

◆ log() [2/2]

Interval stabilizer::parser::Interval::log ( const Number base) const

◆ midpoint()

Number stabilizer::parser::Interval::midpoint ( ) const

Definition at line 86 of file interval.cpp.

References lower, and upper.

◆ mod() [1/2]

Interval stabilizer::parser::Interval::mod ( const Interval other) const

◆ mod() [2/2]

Interval stabilizer::parser::Interval::mod ( const Number value) const

◆ mul() [1/2]

Interval stabilizer::parser::Interval::mul ( const Interval other) const

Definition at line 1468 of file interval.cpp.

◆ mul() [2/2]

Interval stabilizer::parser::Interval::mul ( const Number value) const

Definition at line 1466 of file interval.cpp.

◆ negate()

Interval stabilizer::parser::Interval::negate ( ) const

◆ operate() [1/3]

◆ operate() [2/3]

◆ operate() [3/3]

◆ operator!()

Interval stabilizer::parser::Interval::operator! ( ) const

◆ operator!=()

bool stabilizer::parser::Interval::operator!= ( const Interval other) const

Definition at line 58 of file interval.cpp.

◆ operator%() [1/2]

Interval stabilizer::parser::Interval::operator% ( const Interval other) const

Definition at line 1686 of file interval.cpp.

References mod().

◆ operator%() [2/2]

Interval stabilizer::parser::Interval::operator% ( const Number value) const

Definition at line 1690 of file interval.cpp.

References mod().

◆ operator*() [1/2]

Interval stabilizer::parser::Interval::operator* ( const Interval other) const

◆ operator*() [2/2]

Interval stabilizer::parser::Interval::operator* ( const Number value) const

◆ operator*=()

Interval & stabilizer::parser::Interval::operator*= ( const Number value)

Definition at line 2247 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator+() [1/3]

Interval stabilizer::parser::Interval::operator+ ( ) const

Definition at line 390 of file interval.cpp.

References stabilizer::parser::EmptyInterval, and isEmpty().

◆ operator+() [2/3]

Interval stabilizer::parser::Interval::operator+ ( const Interval other) const

◆ operator+() [3/3]

Interval stabilizer::parser::Interval::operator+ ( const Number value) const

Definition at line 1356 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator++() [1/2]

Interval stabilizer::parser::Interval::operator++ ( ) const

◆ operator++() [2/2]

Interval stabilizer::parser::Interval::operator++ ( int  ) const

◆ operator+=()

Interval & stabilizer::parser::Interval::operator+= ( const Number value)

Definition at line 2235 of file interval.cpp.

References lower, and upper.

◆ operator-() [1/3]

Interval stabilizer::parser::Interval::operator- ( ) const

◆ operator-() [2/3]

Interval stabilizer::parser::Interval::operator- ( const Interval other) const

◆ operator-() [3/3]

Interval stabilizer::parser::Interval::operator- ( const Number value) const

Definition at line 1360 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator--() [1/2]

Interval stabilizer::parser::Interval::operator-- ( ) const

◆ operator--() [2/2]

Interval stabilizer::parser::Interval::operator-- ( int  ) const

◆ operator-=()

Interval & stabilizer::parser::Interval::operator-= ( const Number value)

Definition at line 2241 of file interval.cpp.

References lower, and upper.

◆ operator/() [1/2]

Interval stabilizer::parser::Interval::operator/ ( const Interval other) const

Definition at line 1454 of file interval.cpp.

References divReal().

◆ operator/() [2/2]

Interval stabilizer::parser::Interval::operator/ ( const Number value) const

◆ operator/=()

Interval & stabilizer::parser::Interval::operator/= ( const Number value)

Definition at line 2263 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator<()

bool stabilizer::parser::Interval::operator< ( const Interval other) const

Definition at line 2191 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

◆ operator<=()

bool stabilizer::parser::Interval::operator<= ( const Interval other) const

Definition at line 2204 of file interval.cpp.

References isEmpty().

◆ operator=()

Interval & stabilizer::parser::Interval::operator= ( const Interval other)

Definition at line 43 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator==()

bool stabilizer::parser::Interval::operator== ( const Interval other) const

Definition at line 53 of file interval.cpp.

References leftClosed, lower, rightClosed, and upper.

◆ operator>()

bool stabilizer::parser::Interval::operator> ( const Interval other) const

Definition at line 2213 of file interval.cpp.

References isEmpty(), leftClosed, lower, rightClosed, and upper.

◆ operator>=()

bool stabilizer::parser::Interval::operator>= ( const Interval other) const

Definition at line 2226 of file interval.cpp.

References isEmpty().

◆ operator^() [1/2]

Interval stabilizer::parser::Interval::operator^ ( const Interval other) const

Definition at line 1694 of file interval.cpp.

References pow().

◆ operator^() [2/2]

Interval stabilizer::parser::Interval::operator^ ( const Number value) const

Definition at line 1698 of file interval.cpp.

References pow().

◆ operator~()

Interval stabilizer::parser::Interval::operator~ ( ) const

◆ pow() [1/2]

◆ pow() [2/2]

◆ pow2()

◆ safeSqrt()

◆ sec()

◆ sech()

Interval stabilizer::parser::Interval::sech ( ) const

◆ setLeftClosed()

void stabilizer::parser::Interval::setLeftClosed ( bool  leftClosed)

Definition at line 76 of file interval.cpp.

References leftClosed.

◆ setLower()

void stabilizer::parser::Interval::setLower ( const Number lower)

Definition at line 62 of file interval.cpp.

References lower, and upper.

◆ setRightClosed()

void stabilizer::parser::Interval::setRightClosed ( bool  rightClosed)

Definition at line 78 of file interval.cpp.

References rightClosed.

◆ setUpper()

void stabilizer::parser::Interval::setUpper ( const Number upper)

Definition at line 69 of file interval.cpp.

References lower, and upper.

◆ sin()

◆ sinh()

◆ sqrt()

◆ sub() [1/2]

Interval stabilizer::parser::Interval::sub ( const Interval other) const

Definition at line 1464 of file interval.cpp.

◆ sub() [2/2]

Interval stabilizer::parser::Interval::sub ( const Number value) const

Definition at line 1462 of file interval.cpp.

◆ tan()

◆ tanh()

◆ toString()

std::string stabilizer::parser::Interval::toString ( ) const

◆ unionMulti()

std::vector< Interval > stabilizer::parser::Interval::unionMulti ( const std::vector< Interval > &  intervals)
static

Definition at line 324 of file interval.cpp.

References isDisjointFrom(), leftClosed, lower, rightClosed, and upper.

◆ unionWith()

Interval stabilizer::parser::Interval::unionWith ( const Interval other) const

Definition at line 209 of file interval.cpp.

References stabilizer::parser::EmptyInterval, isDisjointFrom(), isEmpty(), leftClosed, lower, rightClosed, and upper.

Referenced by operate().

◆ width()

Number stabilizer::parser::Interval::width ( ) const

Definition at line 121 of file interval.cpp.

References isEmpty(), lower, and upper.

Member Data Documentation

◆ leftClosed

◆ lower

◆ rightClosed

◆ upper


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