stormvogel.model.value

Attributes

Classes

Interval

Represent an interval value for interval models.

Functions

is_zero(→ bool)

Returns whether a value is zero.

value_to_string(→ str)

Convert a Value to a string.

Module Contents

stormvogel.model.value.Number
class stormvogel.model.value.Interval

Represent an interval value for interval models.

Parameters:
  • bottom – The bottom (left) element of the interval.

  • top – The top (right) element of the interval.

lower: Number
upper: Number
__lt__(other)
__str__()
stormvogel.model.value.Value
stormvogel.model.value.is_zero(value: Value) bool

Returns whether a value is zero.

stormvogel.model.value.value_to_string(n: Value, use_fractions: bool = True, round_digits: int = 4, denom_limit: int = 1000) str

Convert a Value to a string.

Parameters:
  • n – The value to convert.

  • use_fractions – If True, represent numbers as fractions.

  • round_digits – Number of decimal places when not using fractions.

  • denom_limit – Maximum denominator when limiting fractions.

Returns:

String representation of the value.