Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix functions #527

Open
MikaelSlevinsky opened this issue Aug 28, 2017 · 1 comment
Open

Matrix functions #527

MikaelSlevinsky opened this issue Aug 28, 2017 · 1 comment
Labels

Comments

@MikaelSlevinsky
Copy link
Member

After Julia 1.0 (JuliaLang/julia#23233), the following should "just work:"

julia> using ApproxFun

julia> Fun(exp)(rand(2,2))
ERROR: MethodError: no method matching isless(::Array{Float64,2}, ::Int64)
Closest candidates are:
  isless(::ApproxFun.Infinity{Bool}, ::Number) at /Users/Mikael/.julia/v0.6/ApproxFun/src/LinearAlgebra/helper.jl:517
  isless(::AbstractFloat, ::Real) at operators.jl:98
  isless(::Real, ::Real) at operators.jl:266
  ...
Stacktrace:
 [1] in(::Array{Float64,2}, ::ApproxFun.Segment{Float64}) at /Users/Mikael/.julia/v0.6/ApproxFun/src/Fun/Domain.jl:113
 [2] evaluate at /Users/Mikael/.julia/v0.6/ApproxFun/src/Spaces/PolynomialSpace.jl:19 [inlined]
 [3] evaluate(::ApproxFun.Fun{ApproxFun.Chebyshev{ApproxFun.Segment{Float64},Float64},Float64,Array{Float64,1}}, ::Array{Float64,2}) at /Users/Mikael/.julia/v0.6/ApproxFun/src/Fun/Fun.jl:189
 [4] (::ApproxFun.Fun{ApproxFun.Chebyshev{ApproxFun.Segment{Float64},Float64},Float64,Array{Float64,1}})(::Array{Float64,2}, ::Vararg{Array{Float64,2},N} where N) at /Users/Mikael/.julia/v0.6/ApproxFun/src/Fun/Fun.jl:193

Of course, it's a design decision whether or not it should be up to the user to decide if the Chebyshev series is a good approximation on an open superset of spectrum of the matrix.

@MikaelSlevinsky
Copy link
Member Author

Reference on matrix polynomials in monomial and Chebyshev polynomial bases:

W. Liang, R. Baer, C. Saravanan, Y. Shao, A. T. Bell, and M. Head-Gordon. Fast methods for resumming matrix polynomials and Chebyshev matrix polynomials. J. Comp. Phys., 194:575–587, 2004.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant