Git Product home page Git Product logo

Comments (2)

dlfivefifty avatar dlfivefifty commented on June 21, 2024
Ah good point, since the intervals are different.  I think I just need to override maxspace to say we can convert to piecewise with all pieces…

PiecewiseSpace is far from well-developed

On 24 Nov 2014, at 3:28 pm, Gustavo Goretkin [email protected] wrote:

julia> s = Fun(sin, [0., 7.]);

julia> c = Fun(cos, [0., 7.]);

julia> as = abs(s);

julia> ac = abs(c);

julia> ac+as;
ERROR: assertion failed: domainscompatible(a,b)
in conversion_rule at /Users/goretkin/.julia/v0.3/ApproxFun/src/Spaces/Ultraspherical/UltrasphericalOperators.jl:273
in maxspace at /Users/goretkin/.julia/v0.3/ApproxFun/src/Fun/FunctionSpace.jl:109
in maxspace at /Users/goretkin/.julia/v0.3/ApproxFun/src/Spaces/Modifier/VectorSpace.jl:149
in + at /Users/goretkin/.julia/v0.3/ApproxFun/src/Fun/Fun.jl:119
I spent a couple of hours trying to figure out how I should implement this but I don't know enough about ApproxFun. I put what I started in a gist https://gist.github.com/goretkin/5d4fb776b9ef09f4bd1f https://gist.github.com/goretkin/5d4fb776b9ef09f4bd1f
I think the point here is to add ac + as without recomputing the coefficients, though one stopgap could be to override the addition method on Fun{PiecewiseSpace} directly and compute Fun( (x)-> ac[x] + as[x], unique(merge_sorted(breaks(ac.space), breaks(as.space))))


Reply to this email directly or view it on GitHub https://github.com/dlfivefifty/ApproxFun.jl/issues/45.

from approxfun.jl.

dlfivefifty avatar dlfivefifty commented on June 21, 2024

OK, this should work now for PiecewiseSpace{ChebyshevSpace}. I override union to determine a space that contains two other spaces.

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