Skip to content

Commit

Permalink
Merge ca72461 into 0c4ebdc
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler committed Jan 2, 2023
2 parents 0c4ebdc + ca72461 commit 9b2dd05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/companion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ end

# Linear algebra

# 3-argument mul! mutates first argument: y <= C * x
# 3-argument mul! mutates first argument: y C * x
function mul!(y::Vector, C::Companion, x::AbstractVector)
Base.require_one_based_indexing(x)
@boundscheck length(y) == length(x) == size(C, 1) ||
throw(DimensionMismatch("mul! arguments incompatible sizes"))
z = x[end]
Expand Down
3 changes: 3 additions & 0 deletions src/vandermonde.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ size(V::Vandermonde) = (length(V.c), length(V.c))
# solvers

function \(V::Adjoint{T1,<:Vandermonde{T1}}, y::AbstractVecOrMat{T2}) where {T1, T2}
Base.require_one_based_indexing(y)
T = vandtype(T1,T2)
x = Array{T}(undef, size(y))
copyto!(x, y)
Expand All @@ -84,6 +85,7 @@ function \(V::Adjoint{T1,<:Vandermonde{T1}}, y::AbstractVecOrMat{T2}) where {T1,
end

function \(V::Transpose{T1,<:Vandermonde{T1}}, y::AbstractVecOrMat{T2}) where {T1, T2}
Base.require_one_based_indexing(y)
T = vandtype(T1,T2)
x = Array{T}(undef, size(y))
copyto!(x, y)
Expand All @@ -92,6 +94,7 @@ function \(V::Transpose{T1,<:Vandermonde{T1}}, y::AbstractVecOrMat{T2}) where {T
end

function \(V::Vandermonde{T1}, y::AbstractVecOrMat{T2}) where {T1, T2}
Base.require_one_based_indexing(y)
T = vandtype(T1,T2)
x = Array{T}(undef, size(y))
copyto!(x, y)
Expand Down

0 comments on commit 9b2dd05

Please sign in to comment.