Skip to content

Commit

Permalink
update changebasis_I
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Nov 11, 2023
1 parent e85ec89 commit 678a931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_ChangeBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ function _changebasis_I(P::BSplineSpace{p,T,<:AbstractKnotVector{T}}, P′::BSpl
K′ = [k′[j+p′] - k′[j] for j in 1:n′+1]
K = U[ifelse(k[i+p] k[i], U(1 / (k[i+p] - k[i])), zero(U)) for i in 1:n+1]
Aᵖ⁻¹ = _changebasis_I(_lower_I(P), _lower_I(P′)) # (n-1) × (n′-1) matrix
n_nonzero = exactdim_I(P′)*(p+1) # This is a upper bound of the number of non-zero elements of Aᵖ (rough estimation).
n_nonzero = exactdim_I(P′)*(p+2) # This would be a upper bound of the number of non-zero elements of Aᵖ.
I = Vector{Int32}(undef, n_nonzero)
J = Vector{Int32}(undef, n_nonzero)
V = Vector{U}(undef, n_nonzero)
Expand Down

0 comments on commit 678a931

Please sign in to comment.