dewittpe / cpr

Control Polygon Reduction: Methods for quick and efficient placement of internal knots for B-splines and tensor products of B-splines.
http://www.peteredewitt.com/cpr/
2 stars 0 forks source link

cpr::bsplines #13

Closed dewittpe closed 7 years ago

dewittpe commented 7 years ago

check that iknots are within the bknots

> str(cpr::bsplines(seq(0, 1, length = 100), iknots = c(-1, 4)))

 cpr_bs [1:100, 1:6] 0 0 0 0 0 0 0 0 0 0 ...
 - attr(*, "order")= num 4
 - attr(*, "iknots")= num [1:2] -1 4
 - attr(*, "bknots")= num [1:2] 0 1
 - attr(*, "xi")= num [1:10] -1 0 0 0 0 1 1 1 1 4
 - attr(*, "xi_star")= num [1:6] 0 0 0.333 0.667 1 ...
 - attr(*, "class")= chr [1:2] "cpr_bs" "matrix"
Warning message:
In cpr::bsplines(seq(0, 1, length = 100), iknots = c(-1, 4)) :
  Sorting knots
dewittpe commented 7 years ago

The warning message is sufficient. I don't need to babysit every possible end user input.