Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ThickNumbers

[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://timholy.github.io/ThickNumbers.jl/dev/)
[![Build Status](https://github.com/timholy/ThickNumbers.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/timholy/ThickNumbers.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/timholy/ThickNumbers.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/timholy/ThickNumbers.jl)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://HolyLab.github.io/ThickNumbers.jl/dev/)
[![Build Status](https://github.com/HolyLab/ThickNumbers.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/HolyLab/ThickNumbers.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/HolyLab/ThickNumbers.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/HolyLab/ThickNumbers.jl)

This package defines a new abstract type, `ThickNumber{T}`, which is like Julia's `Number` but represents numbers that may have a "thickness" or "width". Such numbers generally support arithmetic but also act like sets, in the sense that they contain spans of "point" numbers. Prominent examples of such numbers include [intervals](https://en.wikipedia.org/wiki/Interval_arithmetic) and [gaussian random variables](https://en.wikipedia.org/wiki/Algebra_of_random_variables).
This package defines a new abstract type, `ThickNumber{T}`, which is like Julia's `Number` but represents numbers that may have a "thickness" or "width". Such numbers generally support arithmetic but also act like sets, in the sense that they contain spans of "point" numbers. Prominent examples of such numbers include [intervals](https://en.wikipedia.org/wiki/Interval_arithmetic) and [Gaussian random variables](https://en.wikipedia.org/wiki/Algebra_of_random_variables).

It also defines a common API for working with ThickNumber types, making it possible to write code that supports multiple `ThickNumber` subtypes simultaneously. See the [documentation](https://timholy.github.io/ThickNumbers.jl/dev/) for details.
It also defines a common API for working with ThickNumber types, making it possible to write code that supports multiple `ThickNumber` subtypes simultaneously. See the [documentation](https://HolyLab.github.io/ThickNumbers.jl/dev/) for details.
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ DocMeta.setdocmeta!(ThickNumbers, :DocTestSetup, :(using ThickNumbers); recursiv
makedocs(;
modules=[ThickNumbers],
authors="Tim Holy <[email protected]> and contributors",
repo="https://github.com/timholy/ThickNumbers.jl/blob/{commit}{path}#{line}",
repo="https://github.com/HolyLab/ThickNumbers.jl/blob/{commit}{path}#{line}",
sitename="ThickNumbers.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://timholy.github.io/ThickNumbers.jl",
repolink="https://github.com/timholy/ThickNumbers.jl",
canonical="https://HolyLab.github.io/ThickNumbers.jl",
repolink="https://github.com/HolyLab/ThickNumbers.jl",
edit_link="main",
assets=String[],
),
Expand All @@ -25,7 +25,7 @@ makedocs(;
)

deploydocs(;
repo="github.com/timholy/ThickNumbers.jl",
repo="github.com/HolyLab/ThickNumbers.jl",
devbranch="main",
push_preview=false, # see also the corresponding flag in .github/workflows/CleanPreview.yml
)
2 changes: 1 addition & 1 deletion docs/src/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If possible, you should also define:
If you cannot define this for your type (e.g., `MyType` requires more than two arguments to construct), it is likely that you'll have to specialize some of the [User API](@ref) functions for `MyType`, since the default implementations of some of them rely on `lohi`.

There are also numerous optional methods you can specialize if it makes `MyType` operate more
efficiently. For example, a gaussian random variable package might want to implement [`midrad(MyType{T}, center, σ)`](@ref) to construct values directly, assuming this is the natural parametrization
efficiently. For example, a Gaussian random variable package might want to implement [`midrad(MyType{T}, center, σ)`](@ref) to construct values directly, assuming this is the natural parametrization
of this type.

## Ensuring compliance with the ThickNumbers interface
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CurrentModule = ThickNumbers
# ThickNumbers

A `ThickNumber{T}` is an abstract type denoting objects that act like numbers--they have standard algebraic operations `+`, `-`, `*`, and `/`--but also
have properties of a [connected set](https://en.wikipedia.org/wiki/Connected_space), specifically occupying some "width," e.g., a segment of the real number line. Examples of possible concrete subtypes include [intervals](https://en.wikipedia.org/wiki/Interval_arithmetic), [gaussian random variables](https://en.wikipedia.org/wiki/Algebra_of_random_variables), and potentially others. While the parameter `T` in `ThickNumber` does not necessarily have to be `T<:Real`, it should have an ordering so that "width" has some meaning.
have properties of a [connected set](https://en.wikipedia.org/wiki/Connected_space), specifically occupying some "width," e.g., a segment of the real number line. Examples of possible concrete subtypes include [intervals](https://en.wikipedia.org/wiki/Interval_arithmetic), [Gaussian random variables](https://en.wikipedia.org/wiki/Algebra_of_random_variables), and potentially others. While the parameter `T` in `ThickNumber` does not necessarily have to be `T<:Real`, it should have an ordering so that "width" has some meaning.

This documentation is aimed at:

Expand Down Expand Up @@ -47,7 +47,7 @@ Let `x` and `y` refer to a standard "point" numbers and `X` and `Y` correspondin

With only a few exceptions, the names of these come from the Interval Arithmetic Standard (IEEE Std 1788-2015).

- [`loval(X)`](@ref): return the "lower bound" (which may not be "fuzzy" for some ThickNumber subtypes) of `X` (similar to `inf` in the IEEE standard, but without promising the true infimum)
- [`loval(X)`](@ref): return the "lower bound" of `X` (similar to `inf` in the IEEE standard, but without promising the true infimum: this is directed at types like Gaussian random variables which, strictly speaking, all have a infimum of -∞ but for which the bulk of the distribution has finite lower bound)
- [`hival(X)`](@ref): return the "upper bound" of `X` (similar to `sup` in the IEEE standard)
- [`mid(X)`](@ref): return the midpoint of `X`
- [`wid(X)`](@ref): return the width (`hival - loval`) of `X`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/user_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ valuetype

## Query functions

API functions from the Interval Arithmetic Standard (IEEE Std 1788-2015), Table 9.2 are supported. One (deliberate) exception is `inf` and `sup`, which are replaced by [`loval`](@ref) and [`hival`](@ref): `inf` and `sup` have well-defined mathematical meanings that may not be appropriate for all `ThickNumber` subtypes (e.g., gaussian random variables don't have finite lower and upper bounds). If you are creating an interval arithmetic package, of course you can choose to define
API functions from the Interval Arithmetic Standard (IEEE Std 1788-2015), Table 9.2 are supported. One (deliberate) exception is `inf` and `sup`, which are replaced by [`loval`](@ref) and [`hival`](@ref): `inf` and `sup` have well-defined mathematical meanings that may not be appropriate for all `ThickNumber` subtypes (e.g., Gaussian random variables don't have finite lower and upper bounds). If you are creating an interval arithmetic package, of course you can choose to define

```
inf(x::MyInterval) = loval(x)
Expand Down
Loading