TheBB/NURBS.jl — pull request #2 by TheBB (2014-11-27 19:31:29+00:00)
Title: Start work on better interface

When this PR is done, the following should be supported **and tested** for B-Spline bases.

- [ ] **Length**: `length(basis) => 5`
- [ ] **Size**: `size(basis) => (5,)`
- [ ] **Indexing**: `basis[i] => BSpline(...)`
- [ ] **Domain**: `domain(basis) => (lft, rgt)`
- [ ] **Evaluation**:
- [ ] Single point, no derivatives, no coefficients: `basis(x) => (vals, idxs)`
- [ ] Several points, no derivatives, no coefficients: `basis(xs) => [(vals, idxs)]`
- [ ] Single point, derivatives, no coefficients: `deriv(basis[, ord])(x) => (vals, idxs)`
- [ ] Several points, derivatives, no coefficients: `deriv(basis[, ord])(xs) => [(vals, idxs)]`
- [ ] Single point, no derivatives, coefficients: `basis(x, cs) => val`
- [ ] Several points, no derivatives, coefficients: `basis(xs, cs) => [val]`
- [ ] Single point, derivatives, coefficients: `deriv(basis[, ord])(x, cs) => val`
- [ ] Several points, derivatives, coefficients: `deriv(basis[, ord])(xs, cs) => [val]`

And the following for basis functions.

- [ ] **Domain**: `domain(b) => (lft, rgt)`
- [ ] **Evaluation**:
- [ ] Single point, no derivatives: `b(x) => (vals, idxs)`
- [ ] Several points, no derivatives: `b(xs) => [(vals, idxs)]`
- [ ] Single point, derivatives: `deriv(b[, ord])(x) => (vals, idxs)`
- [ ] Several points, derivatives: `deriv(b[, ord])(xs) => [(vals, idxs)]`

Auxiliary tools:

- [ ] Interval type for domains.