SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
smtrat::lra::Numeric Class Reference

#include <Numeric.h>

Public Member Functions

 Numeric ()
 Default constructor. More...
 
 Numeric (const Rational &)
 Constructing from a Rational. More...
 
 Numeric (int)
 Constructing from an integer. More...
 
 Numeric (unsigned int)
 Constructing from an unsigned integer. More...
 
 Numeric (long)
 Constructing from a long integer. More...
 
 Numeric (unsigned long)
 Constructing from an unsigned long integer. More...
 
 Numeric (const char *)
 Constructing from a char array. More...
 
 Numeric (const Numeric &)
 Copy constructor. More...
 
 ~Numeric ()
 
const Rationalcontent () const
 
RationalrContent ()
 
Numericoperator= (int)
 Cast from an integer. More...
 
Numericoperator= (unsigned int)
 Cast from an unsigned inteeger. More...
 
Numericoperator= (long)
 Cast from a long integer. More...
 
Numericoperator= (unsigned long)
 Cast from an unsigned long integer. More...
 
Numericoperator= (const char *)
 Cast from a char array. More...
 
Numericoperator= (const Numeric &)
 Cast from a char array. More...
 
bool operator== (const Numeric &) const
 Compares whether this Numeric and the given one are equal. More...
 
bool operator!= (const Numeric &) const
 Compares whether this Numeric and the given one are not equal. More...
 
bool operator< (const Numeric &) const
 Compares whether this Numeric is less than the given one. More...
 
bool operator<= (const Numeric &) const
 Compares whether this Numeric is less or equal than the given one. More...
 
bool operator> (const Numeric &) const
 Compares whether this Numeric is greater than the given one. More...
 
bool operator>= (const Numeric &) const
 Compares whether this Numeric is greater or equal than the given one. More...
 
Numeric numer () const
 
Numeric denom () const
 
Numeric floor () const
 
bool is_positive () const
 Checks whether this Numeric corresponds to a positive rational number. More...
 
bool is_negative () const
 
bool is_zero () const
 
bool is_integer () const
 

Private Attributes

RationalmContent
 

Detailed Description

Definition at line 21 of file Numeric.h.

Constructor & Destructor Documentation

◆ Numeric() [1/8]

smtrat::lra::Numeric::Numeric ( )

Default constructor.

Definition at line 18 of file Numeric.cpp.

Here is the caller graph for this function:

◆ Numeric() [2/8]

smtrat::lra::Numeric::Numeric ( const Rational _value)

Constructing from a Rational.

Parameters
TheRational.

Definition at line 26 of file Numeric.cpp.

◆ Numeric() [3/8]

smtrat::lra::Numeric::Numeric ( int  _value)

Constructing from an integer.

Parameters
_valueThe integer.

Definition at line 34 of file Numeric.cpp.

◆ Numeric() [4/8]

smtrat::lra::Numeric::Numeric ( unsigned int  _value)

Constructing from an unsigned integer.

Parameters
_valueThe unsigned integer

Definition at line 42 of file Numeric.cpp.

◆ Numeric() [5/8]

smtrat::lra::Numeric::Numeric ( long  _value)

Constructing from a long integer.

Parameters
_valueThe unsigned long integer.

Definition at line 50 of file Numeric.cpp.

◆ Numeric() [6/8]

smtrat::lra::Numeric::Numeric ( unsigned long  _value)

Constructing from an unsigned long integer.

Parameters
_valueThe unsigned long integer.

Definition at line 58 of file Numeric.cpp.

◆ Numeric() [7/8]

smtrat::lra::Numeric::Numeric ( const char *  _value)

Constructing from a char array.

Parameters
_valueThe char array.

Definition at line 66 of file Numeric.cpp.

◆ Numeric() [8/8]

smtrat::lra::Numeric::Numeric ( const Numeric _value)

Copy constructor.

Parameters
_valueThe Numeric to copy.

Definition at line 74 of file Numeric.cpp.

◆ ~Numeric()

smtrat::lra::Numeric::~Numeric ( )

Definition at line 78 of file Numeric.cpp.

Member Function Documentation

◆ content()

const Rational& smtrat::lra::Numeric::content ( ) const
inline

Definition at line 40 of file Numeric.h.

Here is the caller graph for this function:

◆ denom()

Numeric smtrat::lra::Numeric::denom ( ) const
Returns
The denominator of this Numeric.

Definition at line 221 of file Numeric.cpp.

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

◆ floor()

Numeric smtrat::lra::Numeric::floor ( ) const
Returns
The next smaller integer to this Numeric.

Definition at line 229 of file Numeric.cpp.

Here is the call graph for this function:

◆ is_integer()

bool smtrat::lra::Numeric::is_integer ( ) const
Returns
true, if this Numeric is integer; false, otherwise.

Definition at line 266 of file Numeric.cpp.

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

◆ is_negative()

bool smtrat::lra::Numeric::is_negative ( ) const
Returns
true, if this Numeric corresponds to a positive rational number; false, otherwise.

Definition at line 248 of file Numeric.cpp.

Here is the call graph for this function:

◆ is_positive()

bool smtrat::lra::Numeric::is_positive ( ) const

Checks whether this Numeric corresponds to a positive rational number.

Returns
True, if this Numeric corresponds to a positive rational number; False, otherwise.

Definition at line 239 of file Numeric.cpp.

Here is the call graph for this function:

◆ is_zero()

bool smtrat::lra::Numeric::is_zero ( ) const
Returns
true, if this Numeric corresponds to zero; false, otherwise.

Definition at line 257 of file Numeric.cpp.

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

◆ numer()

Numeric smtrat::lra::Numeric::numer ( ) const
Returns
The enumerator of this Numeric.

Definition at line 213 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator!=()

bool smtrat::lra::Numeric::operator!= ( const Numeric _value) const

Compares whether this Numeric and the given one are not equal.

Parameters
_valueThe Numeric to compare with.
Returns
True, if the two Numerics are not equal; False, otherwise.

Definition at line 161 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator<()

bool smtrat::lra::Numeric::operator< ( const Numeric _value) const

Compares whether this Numeric is less than the given one.

Parameters
_valueThe Numeric to compare with.
Returns
True, if this Numeric is less than the given one; False, otherwise.

Definition at line 172 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator<=()

bool smtrat::lra::Numeric::operator<= ( const Numeric _value) const

Compares whether this Numeric is less or equal than the given one.

Parameters
_valueThe Numeric to compare with.
Returns
True, if this Numeric is less or equal than the given one; False, otherwise.

Definition at line 183 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator=() [1/6]

Numeric & smtrat::lra::Numeric::operator= ( const char *  _value)

Cast from a char array.

Parameters
_valueThe char array.
Returns
The corresponding Numeric.

Definition at line 128 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator=() [2/6]

Numeric & smtrat::lra::Numeric::operator= ( const Numeric _value)

Cast from a char array.

Parameters
_valueThe char array.
Returns
The corresponding Numeric.

Definition at line 138 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator=() [3/6]

Numeric & smtrat::lra::Numeric::operator= ( int  _value)

Cast from an integer.

Parameters
_valueThe integer.
Returns
The corresponding Numeric.

Definition at line 88 of file Numeric.cpp.

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

◆ operator=() [4/6]

Numeric & smtrat::lra::Numeric::operator= ( long  _value)

Cast from a long integer.

Parameters
_valueThe long integer.
Returns
The corresponding Numeric.

Definition at line 108 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator=() [5/6]

Numeric & smtrat::lra::Numeric::operator= ( unsigned int  _value)

Cast from an unsigned inteeger.

Parameters
_valueThe unsigned integer.
Returns
The corresponding Numeric.

Definition at line 98 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator=() [6/6]

Numeric & smtrat::lra::Numeric::operator= ( unsigned long  _value)

Cast from an unsigned long integer.

Parameters
_valueThe unsigned long integer.
Returns
The corresponding Numeric.

Definition at line 118 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator==()

bool smtrat::lra::Numeric::operator== ( const Numeric _value) const

Compares whether this Numeric and the given one are equal.

Parameters
_valueThe Numeric to compare with.
Returns
True, if the two Numerics are equal; False, otherwise.

Definition at line 150 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator>()

bool smtrat::lra::Numeric::operator> ( const Numeric _value) const

Compares whether this Numeric is greater than the given one.

Parameters
_valueThe Numeric to compare with.
Returns
True, if this Numeric is greater than the given one; False, otherwise.

Definition at line 194 of file Numeric.cpp.

Here is the call graph for this function:

◆ operator>=()

bool smtrat::lra::Numeric::operator>= ( const Numeric _value) const

Compares whether this Numeric is greater or equal than the given one.

Parameters
_valueThe Numeric to compare with.
Returns
True, if this Numeric is greater or equal than the given one; False, otherwise.

Definition at line 205 of file Numeric.cpp.

Here is the call graph for this function:

◆ rContent()

Rational& smtrat::lra::Numeric::rContent ( )
inline

Definition at line 45 of file Numeric.h.

Here is the caller graph for this function:

Field Documentation

◆ mContent

Rational* smtrat::lra::Numeric::mContent
private

Definition at line 25 of file Numeric.h.


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