Functions of Multiplication operators
Should we implement something to the effect of F(Multiplication(f,space(f))) = Multiplication(F(f),space(f))? I'd like to have a discussion before proceeding. The end goal is for the functional calculus in SpectralMeasures.jl. At present,
f = Fun(x->cos(x))
M = Multiplication(f,space(f))
F = x-> x^2
F(M)
returns a TimesOperator, and
G = x->exp(x)
G(M)
returns an OperatorFunction that is devoid of usable content.
I don’t think it’s possible to override for all functions.
You could loop over calculus functions to get those at least.
OperatorFunction is useful for diagonal operators. @MikaelSlevinsky added it for exp integrators.
I didn't mean OperatorFunction is not useful. I meant that the OperatorFunction that is returned from the code above is useless at present. As far as I can tell...
Do you see any issues for the difference between F(M) returning a times operator and F(M) returning a new multiplication operator? As I see it, applying to a vector requires (slightly) fewer floating point multiplications with the latter implementation.
I think it’s a good idea. But as I said it’s impossible to do for all F, so would be restricted to whatever you explicitly override.
Sure 👍🏻