Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for changebasis #345

Merged
merged 13 commits into from
Dec 9, 2023
Merged

Conversation

hyrodium
Copy link
Owner

@hyrodium hyrodium commented Nov 13, 2023

This PR fixes #346.

Before this PR

julia> using BasicBSpline

julia> P = BSplineSpace{4, Int64, KnotVector{Int64}}(KnotVector([1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 7]))
BSplineSpace{4, Int64, KnotVector{Int64}}(KnotVector([1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 7]))

julia> P′ = BSplineSpace{5, Int64, KnotVector{Int64}}(KnotVector([1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6]))
BSplineSpace{5, Int64, KnotVector{Int64}}(KnotVector([1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6]))

julia> changebasis_I(P, P′)
6×10 SparseArrays.SparseMatrixCSC{Float64, Int32} with 27 stored entries:
       2.8   0.4                                 
      -4.4   2.0   0.8                            
  2.8   2.8  -1.6   0.4  0.8  0.45  0.05  0.05  0.05  0.05
 -0.2  -0.2   0.2  -0.2  0.2  0.5   0.5   0.5   0.5   0.5
                         0.05  0.45              
                                               

After this PR

julia> using BasicBSpline

julia> P = BSplineSpace{4, Int64, KnotVector{Int64}}(KnotVector([1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 7]))
BSplineSpace{4, Int64, KnotVector{Int64}}(KnotVector([1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 7]))

julia> P′ = BSplineSpace{5, Int64, KnotVector{Int64}}(KnotVector([1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6]))
BSplineSpace{5, Int64, KnotVector{Int64}}(KnotVector([1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6]))

julia> changebasis_I(P, P′)
6×10 SparseMatrixCSC{Float64, Int32} with 19 stored entries:
      2.8   0.4                               
     -4.4   2.0   0.8                          
      2.8  -1.6   0.4  0.8  0.45  0.05            
     -0.2   0.2  -0.2  0.2  0.5   0.5             
                        0.05  0.45            
                                           

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a649f92) 96.43% compared to head (4538c3d) 96.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #345      +/-   ##
==========================================
- Coverage   96.43%   96.13%   -0.31%     
==========================================
  Files          14       14              
  Lines        1571     1603      +32     
==========================================
+ Hits         1515     1541      +26     
- Misses         56       62       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hyrodium hyrodium merged commit 6a0cb27 into main Dec 9, 2023
12 of 13 checks passed
@hyrodium hyrodium deleted the feature/update_test_changebasis_I branch December 9, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect changebasis_I
1 participant