Comments (2)
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.
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)
- spelling error
- evaluate orthogonal polynomials HOT 2
- Compatibility with Symbolics.jl HOT 3
- Computing the Zernike polynomials coefficients? HOT 1
- Precompile fails on binder HOT 1
- Domain properties of functions not consistent HOT 2
- Document about solving Volterra equation (second kind) HOT 8
- Trouble with the Fourier representaion of a constant matrix with trailing zero element HOT 2
- Tag v1, write JOSS paper? HOT 1
- WARNING: both ApproxFunFourier and DomainSets export "Disk"; uses of it in module ApproxFun must be qualified HOT 1
- An issue with the built-in solver using ultraspherical spectral method
- Add the option to specify the number of coefficients HOT 2
- Newton for simple PDE gives NaN result HOT 1
- Cumsum fails when used on the output of sign()
- Rounding errors lead to empty domain error when using abs
- Changing operand order causes incorrect calculation of the infinity norm
- Creating a Fun of tanh returns the zero Fun HOT 2
- Division by Fun with root fails: `setdomain(::PiecewiseSpace,::ClosedInterval)` not implement
- L2 operator
- typos HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from approxfun.jl.