From fa882cd01aa16a164f430caad79d5d4d849a0eb9 Mon Sep 17 00:00:00 2001 From: Tianbai Xiao Date: Sat, 15 May 2021 10:19:38 +0200 Subject: [PATCH] Unify Matrix to AbstractMatrix --- src/polynomial_chaos.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polynomial_chaos.jl b/src/polynomial_chaos.jl index 55dd26a6..864cb973 100644 --- a/src/polynomial_chaos.jl +++ b/src/polynomial_chaos.jl @@ -244,7 +244,7 @@ end evaluatePCE(x::AbstractVector{<:Real},ξ::Real,α::AbstractVector{<:Real},β::AbstractVector{<:Real}) = evaluatePCE(x,[ξ],α,β) evaluatePCE(x::AbstractVector{<:Real},ξ::AbstractVector{<:Real},op::AbstractOrthoPoly) = evaluatePCE(x,ξ,op.α,op.β) -function evaluatePCE(x::AbstractVector{<:Real},ξ::Matrix{<:Real},α::AbstractVector{<:AbstractVector{<:Real}},β::AbstractVector{<:AbstractVector{<:Real}},ind::AbstractMatrix{Int}) +function evaluatePCE(x::AbstractVector{<:Real},ξ::AbstractMatrix{<:Real},α::AbstractVector{<:AbstractVector{<:Real}},β::AbstractVector{<:AbstractVector{<:Real}},ind::AbstractMatrix{Int}) Nsmpl = size(ξ,1) _checkNumberOfSamples(Nsmpl) !(length(α) == length(β) == size(ξ,2) == size(ind,2)) && throw(InconsistencyError("inconsistent number of coefficients")) @@ -256,7 +256,7 @@ function evaluatePCE(x::AbstractVector{<:Real},ξ::Matrix{<:Real},α::AbstractVe end ϕ*x end -function evaluatePCE(x::AbstractVector{<:Real},ξ::Matrix{<:Real},mOP::MultiOrthoPoly) +function evaluatePCE(x::AbstractVector{<:Real},ξ::AbstractMatrix{<:Real},mOP::MultiOrthoPoly) a,b = coeffs(mOP) evaluatePCE(x,ξ,a,b,mOP.ind) end