-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18df1c5
commit 55a386d
Showing
4 changed files
with
44 additions
and
0 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
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,29 @@ | ||
# TODO: Randjorth Matrix | ||
""" | ||
Randjorth Matrix | ||
================ | ||
This matrix is currently not implemented. | ||
""" | ||
struct Randjorth{T<:Number} <: AbstractMatrix{T} | ||
n::Integer | ||
|
||
function Randjorth{T}(n::Integer) where {T<:Number} | ||
n >= 0 || throw(ArgumentError("$n < 0")) | ||
return new{T}(n) | ||
end | ||
end | ||
|
||
# constructors | ||
Randjorth(n::Integer) = Randjorth{Float64}(n) | ||
|
||
# metadata | ||
@properties Randjorth [:random] | ||
|
||
# properties | ||
size(A::Randjorth) = (A.n, A.n) | ||
|
||
# functions | ||
@inline Base.@propagate_inbounds function getindex(A::Randjorth{T}, i::Integer, j::Integer) where {T} | ||
@boundscheck checkbounds(A, i, j) | ||
return zero(T) | ||
end |
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,11 @@ | ||
# constructors & content (random matrix) | ||
@test allequal([ | ||
size(Randjorth(5)), | ||
size(Randjorth{Float64}(5)), | ||
]) | ||
|
||
# linear algebra functions | ||
run_test_linearalgrbra_functions(Randjorth.(1:5)) | ||
|
||
# eltype | ||
@test test_matrix_elements(Randjorth{Float32}(5)) |