The current problem is

        f=Fun(x->x^2,Chebyshev(Interval(a,b)))

represents a function on [a,b] as type Fun{Float64,Chebyshev}.  But sometimes 
one needs to convert numbers to functions a la

        convert(typeof(f),5)

e.g., as part of creating the vector [f,5].  Since the parameters a and b are 
not inferable, the current solution is for Chebyshev to support both Interval 
and another type AnyDomain.   This has the bad effect of losing type 
information.

        So I’m currently debating changing to template parameters:

                f=Fun(x->x^2,Chebyshev(Interval{a,b}()))

so that typeof(f) is Fun{Float64,Chebyshev{Interval{a,b}}}.    Then it is 
possible to convert numbers to the correct type.  But this is probably a very 
bad idea, especially since there may be usage cases where the domain is 
continually changing.

        Probably a better option is to replace AnyDomain with Interval(NaN,NaN).


> On 8 Apr 2015, at 2:00 am, Toivo Henningsson <[email protected]> wrote:
> 
> You should make sure that you really need the specialization based on that 
> float parameter value.

Reply via email to