@@ -33,6 +33,8 @@ ToeplitzHankelPlan{S,N,M}(T::TP, L::LowR, R::LowR, dims::Dims) where {S,N,M,LowR
3333ToeplitzHankelPlan {S,N} (T, L, R, dims) where {S,N} = ToeplitzHankelPlan {S,N,N+1} (T, L, R, dims)
3434ToeplitzHankelPlan (T:: ToeplitzPlan{S,M} , L:: Matrix , R:: Matrix , dims= 1 ) where {S,M} = ToeplitzHankelPlan {S,M-1,M} ((T,), (L,), (R,), dims)
3535
36+ size (TH:: ToeplitzHankelPlan ) = size (first (TH. T))
37+
3638
3739_reshape_broadcast (d, R, :: Val{N} , M) where N = reshape (R,ntuple (k -> k == d ? size (R,1 ) : 1 , Val (N))... ,M)
3840function _th_applymul! (d, v:: AbstractArray{<:Any,N} , T, L, R, tmp) where N
@@ -52,6 +54,8 @@ function *(P::ToeplitzHankelPlan{<:Any,N}, v::AbstractArray{<:Any,N}) where N
5254 v
5355end
5456
57+ * (P:: ToeplitzHankelPlan , v:: AbstractArray ) = error (" plan applied to wrong-sized array" )
58+
5559
5660# partial cholesky for a Hankel matrix
5761
@@ -158,6 +162,10 @@ function *(P::ChebyshevToLegendrePlanTH, V::AbstractArray{<:Any,N}) where N
158162 V
159163end
160164
165+ _add1tod (d:: Integer , a, b... ) = d == 1 ? (a+ 1 , b... ) : (a, _add1tod (d- 1 , b... )... )
166+ _add1tod (d, a, b... ) = _add1tod (first (d), a, b... )
167+ size (P:: ChebyshevToLegendrePlanTH ) = Base. front (_add1tod (P. toeplitzhankel. dims, size (first (P. toeplitzhankel. T))... ))
168+ inv (P:: ChebyshevToLegendrePlanTH{T} ) where T = plan_th_leg2cheb! (T, size (P), P. toeplitzhankel. dims)
161169
162170
163171function _leg2chebTH_TLC (:: Type{S} , mn, d) where S
0 commit comments