Skip to content

Commit

Permalink
Somehow thje code in quickstart.md is not working :(
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Jun 18, 2024
1 parent 6a0767c commit d102b5a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
4 changes: 2 additions & 2 deletions book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ bibtex_bibfiles:

# Information about where the book exists on the web
repository:
url: https://github.com/tomsch420/Random Events # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
url: https://github.com/tomsch420/random_events/ # Online location of your book
path_to_book: book # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
Expand Down
36 changes: 28 additions & 8 deletions book/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,66 @@ This is a quickstart guide to get you up and running with the `random_events` li

## Installation

To install the library, run the following command:
To install the library, run the following command

[//]: # (```bash)

[//]: # (pip install random_events)

[//]: # (```)

Next, import the necessary functionality:

```{code-cell} ipython3
:tags: []
from random_events.variable import Symbolic, Continuous
from random_events.product_algebra import SimpleEvent, Event
from random_events.interval import SimpleInterval, Interval, closed, closed_open
from random_events.set import SetElement, Set
import plotly
import plotly.graph_objects as go
plotly.offline.init_notebook_mode()
````
```


## Intervals


Intervals are a fundamental concept in the `random_events` library.

They are used to represent the range of possible values that a variable can take.

There are two classes to interact with intervals: `SimpleInterval` and `Interval`.

However, it is **strongly recommended** to use the `Interval` class,

as it provides an API implementing all set operations.


First, create two simple intervals:


```{code-cell} ipython3
:tags: []
si1 = SimpleInterval(0, 1)
si2 = SimpleInterval(0.5, 1.5)
si1, si2
````
```



## Sets
Expand Down

0 comments on commit d102b5a

Please sign in to comment.