Skip to content

Commit bb3ba80

Browse files
committed
fix remaining invalidations
1 parent d2bf084 commit bb3ba80

5 files changed

Lines changed: 0 additions & 12 deletions

File tree

src/helpers/algebra/companion_matrix.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ struct CompanionMatrix{R <: Real, T <: AbstractVector{R}} <: AbstractMatrix{R}
2020
θ::T
2121
end
2222

23-
Base.eltype(::Type{<:CompanionMatrix{R}}) where {R} = R
2423
Base.size(cmatrix::CompanionMatrix) = (length(cmatrix.θ), length(cmatrix.θ))
2524
Base.length(cmatrix::CompanionMatrix) = prod(size(cmatrix))
2625

@@ -40,7 +39,6 @@ struct CompanionMatrixTransposed{R <: Real, T <: AbstractVector{R}} <: AbstractM
4039
θ::T
4140
end
4241

43-
Base.eltype(::Type{<:CompanionMatrixTransposed{R}}) where {R} = R
4442
Base.size(cmatrix::CompanionMatrixTransposed) = (length(cmatrix.θ), length(cmatrix.θ))
4543
Base.length(cmatrix::CompanionMatrixTransposed) = prod(size(cmatrix))
4644

src/helpers/algebra/permutation_matrix.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ function PermutationMatrix(dim::T; switch_first::Bool = true) where {T <: Intege
3939
return PermutationMatrix(ind)
4040
end
4141

42-
# extensions of base functionality
43-
Base.eltype(::Type{<:PermutationMatrix{T}}) where {T} = T
44-
4542
function Base.size(mat::PermutationMatrix)
4643
nr_elements = length(mat.ind)
4744
return (nr_elements, nr_elements)

src/helpers/algebra/standard_basis_vector.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ function StandardBasisVector(length::Int, index::Int, scale::T = one(Int)) where
2828
return StandardBasisVector{T}(length, index, scale)
2929
end
3030

31-
Base.eltype(::Type{StandardBasisVector{T}}) where {T} = T
32-
3331
# extensions of base functionality
3432
Base.size(e::StandardBasisVector) = (length(e),)
3533
Base.size(e::StandardBasisVector, d) = d::Integer == 1 ? length(e) : 1

src/helpers/helpers.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Base.IteratorSize(::Type{<:SkipIndexIterator}) = HasLength()
6464
Base.IteratorEltype(::Type{<:SkipIndexIterator}) = HasEltype()
6565
Base.IndexStyle(::Type{<:SkipIndexIterator}) = IndexLinear()
6666

67-
Base.eltype(::Type{<:SkipIndexIterator{T}}) where {T} = T
6867
Base.length(iter::SkipIndexIterator) = length(iter.iterator) - 1
6968
Base.size(iter::SkipIndexIterator) = (length(iter),)
7069

src/nodes/predefined/autoregressive.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ end
127127
Base.size(precision::ARPrecisionMatrix) = (precision.order, precision.order)
128128
Base.getindex(precision::ARPrecisionMatrix, i::Int, j::Int) = (i === 1 && j === 1) ? precision.γ : ((i === j) ? convert(eltype(precision), huge) : zero(eltype(precision)))
129129

130-
Base.eltype(::Type{<:ARPrecisionMatrix{T}}) where {T} = T
131-
132130
Base.convert(::Type{AbstractArray{T}}, matrix::ARPrecisionMatrix{R}) where {T, R} = ARPrecisionMatrix(matrix.order, convert(T, matrix.γ))
133131
Base.convert(::Type{AbstractArray{T}}, matrix::ARPrecisionMatrix{T}) where {T} = matrix
134132

@@ -163,8 +161,6 @@ end
163161
Base.size(transition::ARTransitionMatrix) = (transition.order, transition.order)
164162
Base.getindex(transition::ARTransitionMatrix, i::Int, j::Int) = (i === 1 && j === 1) ? transition.inv_γ : zero(eltype(transition))
165163

166-
Base.eltype(::Type{<:ARTransitionMatrix{T}}) where {T} = T
167-
168164
Base.convert(::Type{AbstractArray{T}}, matrix::ARTransitionMatrix{R}) where {T, R} = ARTransitionMatrix{T}(matrix.order, convert(T, matrix.inv_γ))
169165
Base.convert(::Type{AbstractArray{T}}, matrix::ARTransitionMatrix{T}) where {T} = matrix
170166

0 commit comments

Comments
 (0)