-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmatrixfunctions.jl
More file actions
39 lines (34 loc) · 1.16 KB
/
matrixfunctions.jl
File metadata and controls
39 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ================================
# EXPONENTIAL ALGORITHMS
# ================================
"""
MatrixFunctionViaLA()
Algorithm type to denote finding the exponential of `A` via the implementation of `LinearAlgebra`.
"""
@algdef MatrixFunctionViaLA
"""
MatrixFunctionViaEigh()
Algorithm type to denote finding the exponential `A` by computing the hermitian eigendecomposition of `A`.
The `eigh_alg` specifies which hermitian eigendecomposition implementation to use.
"""
struct MatrixFunctionViaEigh{A <: AbstractAlgorithm} <: AbstractAlgorithm
eigh_alg::A
end
function Base.show(io::IO, alg::MatrixFunctionViaEigh)
print(io, "MatrixFunctionViaEigh(")
_show_alg(io, alg.eigh_alg)
return print(io, ")")
end
"""
MatrixFunctionViaEig()
Algorithm type to denote finding the exponential `A` by computing the eigendecomposition of `A`.
The `eig_alg` specifies which eigendecomposition implementation to use.
"""
struct MatrixFunctionViaEig{A <: AbstractAlgorithm} <: AbstractAlgorithm
eig_alg::A
end
function Base.show(io::IO, alg::MatrixFunctionViaEig)
print(io, "MatrixFunctionViaEig(")
_show_alg(io, alg.eig_alg)
return print(io, ")")
end