From 131933ae3d8a15ac09ddc5fb7a9eb87d4ee67896 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 25 Jan 2024 21:10:59 +0530 Subject: [PATCH] Limit factorization size method to Circulant (#130) --- src/ToeplitzMatrices.jl | 2 -- src/special.jl | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ToeplitzMatrices.jl b/src/ToeplitzMatrices.jl index 2447b8c..9a2a92c 100644 --- a/src/ToeplitzMatrices.jl +++ b/src/ToeplitzMatrices.jl @@ -99,8 +99,6 @@ struct ToeplitzFactorization{T,A<:AbstractToeplitz{T},S<:Number,P<:Plan{S}} <: F tmp::Vector{S} dft::P end -Base.size(T::ToeplitzFactorization) = (s = size(T.dft,1); (s, s)) -Base.size(T::ToeplitzFactorization, i::Integer) = size(T)[i] include("toeplitz.jl") include("special.jl") diff --git a/src/special.jl b/src/special.jl index 3fc572c..9195903 100644 --- a/src/special.jl +++ b/src/special.jl @@ -257,3 +257,7 @@ end function Base.replace_in_print_matrix(A::LowerTriangularToeplitz, i::Integer, j::Integer, s::AbstractString) i >= j ? s : Base.replace_with_centered_mark(s) end + +# size for factorize +size(T::ToeplitzFactorization{<:Any, <:Circulant}) = (s = size(T.dft,1); (s, s)) +size(T::ToeplitzFactorization{<:Any, <:Circulant}, i::Integer) = size(T)[i]