basis_bernstein Function
- Seyed Ali Ghasemi
- BSD 3-Clause
- 27 statements
public pure function basis_bernstein(Xt, nc) result(B)
Evaluate all Bernstein basis polynomials of degree nc-1 on [0,1].
The implementation uses an adjacent-term recurrence with explicit
endpoint values. nc=1 returns the constant basis.
nc>=1 is an unchecked caller precondition. Values outside [0,1]
evaluate the same polynomial formula but need not be nonnegative or form
a numerically stable partition. Values within 2*epsilon(rk) of zero or
one are snapped to the corresponding exact endpoint basis vector.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | Xt |
Bernstein parameter, normally in |
||
| integer, | intent(in) | :: | nc |
Number of basis functions; the degree is |