Skip to content

Commit 07b5fcf

Browse files
add extra conversions from NTuple{*, Float64}
1 parent 03b7bf5 commit 07b5fcf

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

examples/sphericalisometries.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ UR = threshold!(P\VR, 100eps())
9494
@test U UR
9595
norm(U-UR)
9696

97+
F = f.(x, y, z)
98+
V = PA*F
99+
U = threshold!(P\V, 100eps())
100+
FastTransforms.execute_sph_reflection!(J, (W[1], W[2], W[3]), U)
101+
FR = f.(u, v, w)
102+
VR = PA*FR
103+
UR = threshold!(P\VR, 100eps())
104+
@test U UR
105+
norm(U-UR)
97106

98107
# Random orthogonal transformation
99108
Random.seed!(0)

src/libfasttransforms.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ function convert(::Type{ft_orthogonal_transformation}, Q::AbstractMatrix)
771771
@assert size(Q, 1) 3 && size(Q, 2) 3
772772
return ft_orthogonal_transformation((Q[1, 1], Q[2, 1], Q[3, 1], Q[1, 2], Q[2, 2], Q[3, 2], Q[1, 3], Q[2, 3], Q[3, 3]))
773773
end
774+
convert(::Type{ft_orthogonal_transformation}, Q::NTuple{9, Float64}) = ft_orthogonal_transformation(Q)
774775

775776
function execute_sph_orthogonal_transformation!(p::FTPlan{Float64, 2, SPHERICALISOMETRY}, Q, x::Matrix{Float64})
776777
checksize(p, x)
@@ -798,6 +799,7 @@ function convert(::Type{ft_reflection}, w::AbstractVector)
798799
@assert length(w) 3
799800
return ft_reflection((w[1], w[2], w[3]))
800801
end
802+
convert(::Type{ft_reflection}, w::NTuple{3, Float64}) = ft_reflection(w)
801803

802804
function execute_sph_reflection!(p::FTPlan{Float64, 2, SPHERICALISOMETRY}, w, x::Matrix{Float64})
803805
checksize(p, x)

0 commit comments

Comments
 (0)