Skip to content

Commit

Permalink
Add basic usage to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsanders committed May 18, 2024
1 parent 8211259 commit 4085318
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,41 @@
[![Build Status](https://github.com/dpsanders/IntervalBoxes.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/dpsanders/IntervalBoxes.jl/actions/workflows/CI.yml?query=branch%3Amain)


Multi-dimensional interval boxes in Julia.
## Multi-dimensional interval boxes in Julia.

These are Cartesian products of `Interval`s (actually `BareInterval`s) defined in [IntervalArithmetic.jl](https://github.com/JuliaIntervals/IntervalArithmetic.jl).
An **interval box** is a Cartesian product of `Interval`s (actually `BareInterval`s), as defined in [IntervalArithmetic.jl](https://github.com/JuliaIntervals/IntervalArithmetic.jl).
An interval box of dimension $n$ thus represents an axis-aligned *set* in Euclidean space $\mathbb{R}^n$.


## Basic usage

```jl
julia> X = IntervalBox(1..3, 4..6)
[1.0, 3.0] × [4.0, 6.0]

julia> Y = IntervalBox(2..5, 2)
[2.0, 5.0

julia> X Y
[2.0, 3.0] × [4.0, 5.0]

julia> X Y
[1.0, 5.0] × [2.0, 6.0]

julia> [2, 5] X Y
true
```

We treat `IntervalBox`es as sets as much as possible, and extend Julia's set operations
to act on these objects.

Note that the `` operator produces the *interval hull* of the union
(i.e. the smallest interval box that contains the union).

[This code was originally in that repo but was removed. The git history can be found there.]

## Authors
Copyright by JuliaIntervals contributors 2017–2024
Copyright by JuliaIntervals contributors 2017–2024.

This code was originally in `IntervalArithmetic.jl`, but was removed.
The git history can be found in that repo.

2 comments on commit 4085318

@dpsanders
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: "Pre-release version not allowed"

Please sign in to comment.