Code Monkey home page Code Monkey logo

Comments (4)

dlfivefifty avatar dlfivefifty commented on September 28, 2024

This has been implemented in approxfun-support, foolishly, since it's just going to make things harder... but it's definitely the right approach I think: I can't see any reason for UnionDomain to benefit from having a Tuple or Vector of domains over a Set.

from domainsets.jl.

dlfivefifty avatar dlfivefifty commented on September 28, 2024

Indeed, foolish: I reverted iit in approxfun-support, since ApproxFun's PiecewiseSpace needs to have an ordering in order to interpret the coefficients, and in places in the code it assumes this ordering is consistent with the ordering of UnionDomain.

I might try making this change again as it still feels "right" for it to be a Set. ApproxFun can work around this by calling domain.(s.spaces) instead of domain(s).domains.

from domainsets.jl.

dlfivefifty avatar dlfivefifty commented on September 28, 2024

JuliaLang/julia#23746 also makes working with Sets annoying, however

from domainsets.jl.

daanhb avatar daanhb commented on September 28, 2024

Currently, the type of the list of domains is a parameter (DD), so it can be chosen freely. The idea was to allow both tuples and vectors: a tuple would be fully typed, making the union domain fast. The vector could allow for a long list of subdomains, but it would be fast only if they all had the same type. Yet, I don't think we ever relied on a UnionDomain being fast.

Set sounds like it would make the code shorter and clearer, which is good. I think we currently also have some code that enumerates over the subdomains, but I'd be surprised if the ordering matters anywhere - it shouldn't and if it does we can fix it.

from domainsets.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.