JuliaIntervals / IntervalArithmetic.jl

Library for validated numerics using interval arithmetic
https://juliaintervals.github.io/IntervalArithmetic.jl/
Other
297 stars 71 forks source link

What do you use IntervalArithmetic.jl for? #471

Open dpsanders opened 3 years ago

dpsanders commented 3 years ago

We need information about where IntervalArithmetic.jl is used. We would like to add a page linking to companies, research papers, other packages, etc., where IntervalArithmetic has been or is being used. We ask you to please reply here or send a message with this information. Thanks!

lbenet commented 3 years ago

This is obviously needed to secure funding...

mforets commented 3 years ago

I think it's fair to say IntervalArithmetic.jl is used in most if not all the publications listed here.

lucaferranti commented 3 years ago

(I pinned this to the top of the issues page so that it doesn't get buried. It may increase the visibility if users check the gh repository every now and then)

samuela commented 3 years ago

I'm currently trying to use IntervalArithmetic.jl for a motion planning research project!

lbenet commented 3 years ago

These are some papers I know that cite the use IntervalArithmetic:

kalmarek commented 3 years ago

I'll add three of mine:)

Or a one-sentence explanation: obtaining certified lower bounds for sum of squares optimization in group rings. (hopefully it's not too late)

lbenet commented 3 years ago

@kalmarek, do these works cite IntervalArithmetic.jl orr ValidatedNumerics.jl?

kalmarek commented 3 years ago

@lbenet I'm afraid not ;/ I thought I've asked a question how to cite IA and never got an answer... but your reply in https://github.com/JuliaIntervals/IntervalArithmetic.jl/issues/184#issuecomment-480106748 proves me wrong; I'm very sorry, I must have forgotten ;/

In any case Manifests for the last two contains IntervalArithmetic:

(if that's any good).

I also give credit to IntervalArithmetic.jl explicitly in the reproducing notebook for the last paper.

lbenet commented 3 years ago

Never mind @kalmarek, and sorry if my comment sounded harsh. Citing software is already complicated for the administration to consider, so imagine how would they take "indirect citations" (having it in the Manifest.toml)?

kalmarek commented 3 years ago

@lbenet I didn't received your comment as harsh, no worries ;) What I do is to cite what I like and only enter those discussions if the administration people complain ;) This usually saves lots of trouble for me, since my impression is that they hardly ever complain (in the context of grant applications/reports). But of course proceed at your own discretion.

I think that interval arithmetic is such an important software/topic, but the effort put in it is so undervalued. I wish you luck with the funding!

Datseris commented 2 years ago

It is used in DynamicalSystems.jl to provide a rather convenient function that returns fixed points and their stability for a given dynamical system: https://juliadynamics.github.io/DynamicalSystems.jl/dev/chaos/periodicity/#Fixed-points

dmetivie commented 1 year ago

It is used in the test function of the QuasiMonteCarlo.jl package, (see here). It provides a convenient way to build the “elementary intervals” used in the definition of some low discrepancy sequence for Quasi Monte Carlo estimation.

In the packages, these intervals are used to check if the provided sequences (Sobol, Faure, ...) satisfy the math definition. Thanks to multiple dispatch, your package provides for free rational interval. Hence, one can exactly check if a point (represented by a Rational) belongs to elementary interval.

So yes some people are using Rational interval to answer Issue #495

@ParadaCarleton and myself worked on the function.

For example

using QuasiMonteCarlo, Primes # master version for now
# Faure sequence are exactly (t=0, s)-sequence in base b=nextprime(s)
m = 4
pad = m
λ = 1
t = 0
s = 3

net = Rational{BigInt}.(QuasiMonteCarlo.sample(nextprime(s)^m, s, FaureSample())) # Convert the sequence in Rational{BigInt} (needed to scramble)
# `net` could directly be a Rational{BigInt} without conversion, but this is not yet operational
istmsnet(net; λ, t, m, s, base = nextprime(s)) # true

with

using Combinatorics, IntervalArithmetic
"""
    istmsnet(net::AbstractMatrix{T}; λ::I, t::I, m::I, d::I, base::I) where {I <: Integer, T <: Real}
Test if a point set `net` (`dim×n`) is a `(λ,t,m,s)`-net in base `b`. 

`(λ,t,m,s)`-nets have strict equidistribution properties making them good QMC sequences.
Their definition and properties can be found in the book [Monte Carlo theory, methods, and examples](https://artowen.su.domains/mc/qmcstuff.pdf) by Art B. Owen. 
See Definition 15.7 and for properties see Chapter 15 to 17. 

The test is exact if the element of `net` are of type `Rational`. Indeed, in that case, one can exactly deal with points at the edge of intervals of the form [a,b)ᵈ.
The conversion `Float` to `Rational` is usually possible with usual nets, e.g., Sobol, Faure (may require `Rational{BigInt}.(net)`).
"""
function istmsnet(net::AbstractMatrix{T}; λ::I, t::I, m::I, s::I,
                  base::I) where {I <: Integer, T <: Real}
    pass = true

    @assert size(net, 2)==λ * (base^m) "Number of points must be as size(net, 2) = $(size(net, 2)) == λ * (base^m) = $(λ * (base^m))"
    @assert size(net, 1)==s "Dimension must be as size(net, 2) = $(size(net, 2)) == s = $s"
    @assert all(0 .≤ net .< 1) "All points must be in [0,1)"

    perms = multiexponents(s, m - t)
    for stepsize in perms
        intervals = mince(IntervalBox([interval(zero(T), one(T)) for i in 1:s]),
                          NTuple{s, Int}(base .^ stepsize))
        pass &= all(intervals) do intvl
            λ * base^t == count(point -> inCloseOpen(point, intvl), collect(eachcol((net))))
        end
        if !pass
            println("Errors in direction k = $stepsize")
            return pass
        end
    end
    return pass
end

"""
    in_halfopen(x, a)
Checks if the number `x` is a member of the interval `a` (close on the left and open on the right), treated as a set.
"""
function inCloseOpen(x::T, a::Interval) where {T <: Real}
    isinf(x) && return false
    a.lo <= x < a.hi
end
inCloseOpen(X::AbstractVector, Y::IntervalBox{N, T}) where {N, T} = all(inCloseOpen.(X, Y))
ParadaCarleton commented 1 year ago

It provides a convenient way to build the “elementary intervals” used in the definition of some low discrepancy sequence for Quasi Monte Carlo estimation.

TBF using the entirety of IntervalArithmetic.jl is definitely overkill for this :sweat_smile:

Mostly it's in there because it's a test dependency, so load time doesn't really matter (since users don't usually run tests). I'd definitely prefer if this was moved into a smaller package for working with intervals themselves, like Intervals.jl or IntervalSets.jl (or if there was a clear+consistent standard on this...)

AlCap23 commented 8 months ago

Validity checking of random symbolic expressions ( and for generating those ). ;)

orkolorko commented 6 months ago

We are using it for RigorousInvariantMeasures.jl.

The most recent publication using it is A general framework for the rigorous computation of invariant densities and the coarse-fine strategy.

One comment: the CITATION.bib file in the package is empty; I apologize, in this paper I thought I had cited the package, I will be more careful in the future.