Skip to content

Commit 51d2ad9

Browse files
committed
plan_transform! for TensorSpace
1 parent 984120b commit 51d2ad9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Multivariate/TensorSpace.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,15 @@ function plan_transform(sp::TensorSpace, ::Type{T}, n::Integer) where {T}
368368
TransformPlan(sp,((plan_transform(sp.spaces[1],T,N),N),
369369
(plan_transform(sp.spaces[2],T,M),M)),
370370
Val{false})
371-
end
371+
end
372+
373+
function plan_transform!(sp::TensorSpace, ::Type{T}, n::Integer) where {T}
374+
P = plan_transform(sp, T, n)
375+
TransformPlan(sp, P.plan, Val{true})
376+
end
372377

373378
plan_transform(sp::TensorSpace, v::AbstractVector) = plan_transform(sp,eltype(v),length(v))
379+
plan_transform!(sp::TensorSpace, v::AbstractVector) = plan_transform!(sp,eltype(v),length(v))
374380

375381
function plan_itransform(sp::TensorSpace, v::AbstractVector{T}) where {T}
376382
N,M = size(totensor(sp, v)) # wasteful

0 commit comments

Comments
 (0)