class rbool.base.Empty[source]

Bases: SubSetR1

Empty class is a singleton that represents an empty set

It’s equivalent to: Empty = {}

instance = None
move(amount: Real) SubSetR1[source]

Translates the entire subset of R1 to the right by given amount

new_set = {x + a for x in old_set}

Parameters

amountReal

The quantity to be translated

Return

SubSetR1

The translated subset

scale(amount: Real) SubSetR1[source]

Scales the entire subset of R1 to the right by given amount

new_set = {a * x for x in old_set}

Negative values are valid.

Parameters

amountReal

The quantity to be scaled. Cannot be zero.

Return

SubSetR1

The scaled subset


class rbool.base.Whole[source]

Bases: SubSetR1

Whole class is a singleton that represents the entire real line

It’s equivalent to: Whole = (-inf, +inf)

instance = None
move(amount: Real) SubSetR1[source]

Translates the entire subset of R1 to the right by given amount

new_set = {x + a for x in old_set}

Parameters

amountReal

The quantity to be translated

Return

SubSetR1

The translated subset

scale(amount: Real) SubSetR1[source]

Scales the entire subset of R1 to the right by given amount

new_set = {a * x for x in old_set}

Negative values are valid.

Parameters

amountReal

The quantity to be scaled. Cannot be zero.

Return

SubSetR1

The scaled subset


class rbool.singles.SingleValue(value: Real)[source]

Bases: SubSetR1

SingleValue stores only one value, being a subset of the real line

Only finite values are acceptable

property internal: Real

Gives the internal real value of the SingleValue

Getter:

Returns the internal value of the SubSetR1

Type:

Real

move(amount: Real) SubSetR1

Translates the entire subset of R1 to the right by given amount

new_set = {x + a for x in old_set}

Parameters

amountReal

The quantity to be translated

Return

SubSetR1

The translated subset

scale(amount: Real) SubSetR1

Scales the entire subset of R1 to the right by given amount

new_set = {a * x for x in old_set}

Negative values are valid.

Parameters

amountReal

The quantity to be scaled. Cannot be zero.

Return

SubSetR1

The scaled subset


class rbool.singles.Interval(start: Real, end: Real, left: bool = True, right: bool = True)[source]

Bases: SubSetR1

Interval stores a continuous set of points on R1

property closed_left: bool

Tells if the interval is closed on the left side

Getter:

Returns a boolean that tells if interval is bounded on bot

Type:

bool

property closed_right: bool

Tells if the interval is closed on the right side

Getter:

Returns a boolean that tells if interval is bounded on top

Type:

bool

move(amount: Real) SubSetR1

Translates the entire subset of R1 to the right by given amount

new_set = {x + a for x in old_set}

Parameters

amountReal

The quantity to be translated

Return

SubSetR1

The translated subset

scale(amount: Real) SubSetR1

Scales the entire subset of R1 to the right by given amount

new_set = {a * x for x in old_set}

Negative values are valid.

Parameters

amountReal

The quantity to be scaled. Cannot be zero.

Return

SubSetR1

The scaled subset


class rbool.singles.Disjoint(items: Iterable[SingleValue | Interval])[source]

Bases: SubSetR1

Stores the union of SingleValue and Interval which are not connected

The direct constructor should not be used. This object should be constructed by the standard boolean operations of the some SingleValue and Interval

property intervals: Tuple[Interval, ...]

Gives all the non-connected intervals that are inside the Disjoint

Getter:

Returns all the non-connected intervals

Type:

Tuple[SingleValue, …]

move(amount: Real) SubSetR1

Translates the entire subset of R1 to the right by given amount

new_set = {x + a for x in old_set}

Parameters

amountReal

The quantity to be translated

Return

SubSetR1

The translated subset

scale(amount: Real) SubSetR1

Scales the entire subset of R1 to the right by given amount

new_set = {a * x for x in old_set}

Negative values are valid.

Parameters

amountReal

The quantity to be scaled. Cannot be zero.

Return

SubSetR1

The scaled subset

property singles: Tuple[SingleValue, ...]

Gives all the isolated nodes that are inside the Disjoint

Getter:

Returns all the isolated points

Type:

Tuple[SingleValue, …]