-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to handle complex - needs better organization
- Loading branch information
1 parent
65c8c0f
commit ff32f4a
Showing
3 changed files
with
94 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
matvec | ||
dim::Int | ||
sym::Bool | ||
""" | ||
mutable struct LinOpMat{T} <: AbstractMatrix{T} | ||
matvec | ||
dim::Int | ||
sym::Bool | ||
end | ||
|
||
Base.size(lop::LinOpMat{T}) where {T} = return (lop.dim,lop.dim) | ||
Base.:(*)(lop::LinOpMat{T}, v::AbstractVector{T}) where {T} = return lop.matvec(v) | ||
Base.:(*)(lop::LinOpMat{T}, v::AbstractMatrix{T}) where {T} = return lop.matvec(v) | ||
issymmetric(lop::LinOpMat{T}) where {T} = return lop.sym |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters