Giter Club home page Giter Club logo

Comments (6)

OlivierHnt avatar OlivierHnt commented on August 24, 2024

We removed those also because of silence errors. Base.∪ and Base.∩ can be found in generic code for both scalars (not just numbers) and containers, so re-defining it with the interval definition is conflicting.
It is unfortunate how prevalent the union, intersect, etc, are in Base.

May I ask why you said that you need it? What is wrong with intersect_interval and hull?

from intervalarithmetic.jl.

dpsanders avatar dpsanders commented on August 24, 2024

Hmm I see.

I need them so I can write readable mathematical code :)

from intervalarithmetic.jl.

OlivierHnt avatar OlivierHnt commented on August 24, 2024

hehe yes I can sympathise with that :)

In this circonstance, I think the best is to add the following, without importing and from Base,

(a::BareInterval, b::BareInterval) = intersect_interval(a, b)
(a::BareInterval, b::BareInterval) = hull(a, b)

in IntervalConstraintProgramming.jl
Then, you will have your own and inside the module, without conflicting with Base.
Of course outside the scope of the module this may still be confusing to have both IntervalConstraintProgramming.:∩ and Base.:∩.

from intervalarithmetic.jl.

dpsanders avatar dpsanders commented on August 24, 2024

Huh, interesting idea, thanks!

from intervalarithmetic.jl.

dpsanders avatar dpsanders commented on August 24, 2024

Another possibility is to use \sqcup and \sqcap (square versions of the intersection and union symbols), which have no meaning in Julia but are available as symbols that can be defined. Indeed \sqcap is one of the standard symbols for "interval hull"!

from intervalarithmetic.jl.

OlivierHnt avatar OlivierHnt commented on August 24, 2024

Yes we can add symbols to IntervalArithmetic.Symbols. , or even (\cupdot), ⩀ (\capdot).

from intervalarithmetic.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.