Skip to content

Commit

Permalink
Updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Sep 18, 2024
1 parent 8484773 commit ab301b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ sphinx:
- 'sphinx.ext.autodoc'
- 'sphinx.ext.autosummary'
- 'autoapi.extension'
- 'sphinx.ext.coverage'
config:
suppress_warnings: ["mystnb.unknown_mime_type"]
autosummary_generate: True
Expand Down
8 changes: 7 additions & 1 deletion src/random_events/interval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import annotations

import enum
import math
from dataclasses import dataclass
Expand All @@ -8,7 +9,6 @@
from typing_extensions import Self

from . import sigma_algebra
from .sigma_algebra import AbstractCompositeSet


class Bound(enum.Enum):
Expand Down Expand Up @@ -238,6 +238,7 @@ def contained_integers(self) -> int:
def open(left: float, right: float) -> Interval:
"""
Creates an open interval.
:param left: The left bound of the interval.
:param right: The right bound of the interval.
:return: The open interval.
Expand All @@ -248,6 +249,7 @@ def open(left: float, right: float) -> Interval:
def closed(left: float, right: float) -> Interval:
"""
Creates a closed interval.
:param left: The left bound of the interval.
:param right: The right bound of the interval.
:return: The closed interval.
Expand All @@ -258,6 +260,7 @@ def closed(left: float, right: float) -> Interval:
def open_closed(left: float, right: float) -> Interval:
"""
Creates an open-closed interval.
:param left: The left bound of the interval.
:param right: The right bound of the interval.
:return: The open-closed interval.
Expand All @@ -268,6 +271,7 @@ def open_closed(left: float, right: float) -> Interval:
def closed_open(left: float, right: float) -> Interval:
"""
Creates a closed-open interval.
:param left: The left bound of the interval.
:param right: The right bound of the interval.
:return: The closed-open interval.
Expand All @@ -278,6 +282,7 @@ def closed_open(left: float, right: float) -> Interval:
def singleton(value: float) -> Interval:
"""
Creates a singleton interval.
:param value: The value of the interval.
:return: The singleton interval.
"""
Expand All @@ -287,6 +292,7 @@ def singleton(value: float) -> Interval:
def reals() -> Interval:
"""
Creates the set of real numbers.
:return: The set of real numbers.
"""
return SimpleInterval(float('-inf'), float('inf'), Bound.OPEN, Bound.OPEN).as_composite_set()

0 comments on commit ab301b0

Please sign in to comment.