Class Bernstein
Class defining a Bernstein polynomial.
Implements
Inherited Members
Namespace: BRIDGES.Arithmetic.Polynomials.Univariate.Specials
Assembly: BRIDGES.dll
Syntax
public class Bernstein : Polynomial, IGroupAction<Polynomial, double>
Constructors
| Improve this Doc View SourceBernstein(Int32, Int32)
Initialises a new instance of Bernstein class by defining its index and degree.
Declaration
public Bernstein(int index, int degree)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the Bernstein polynomial. |
Int32 | degree | Degree of the Bernstein polynomial. |
Properties
| Improve this Doc View SourceIndex
Gets the index of the current Bernstein.
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceEvaluateAt(Double, Int32, Int32)
Evaluates a Bernstein of a given index and degree, at a given value.
Declaration
public static double EvaluateAt(double val, int index, int degree)
Parameters
Type | Name | Description |
---|---|---|
Double | val | Value to evaluate at. |
Int32 | index | Index of the Bernstein to evaluate. |
Int32 | degree | Degree of the Bernstein to evaluate. |
Returns
Type | Description |
---|---|
Double | The value of the Bernstein polynomial at the given value. |
Remarks
The code is adapted from algorithm 1.2 described in the NURBS Book, by L. Piegl and W. Tiller.
EvaluateBasisAt(Double, Int32)
Evaluates a Bernstein polynomial basis of a given degree, at a given value.
Declaration
public static double[] EvaluateBasisAt(double val, int degree)
Parameters
Type | Name | Description |
---|---|---|
Double | val | Value to evaluate at. |
Int32 | degree | Degree of the Bernstein polynomial basis. |
Returns
Type | Description |
---|---|
Double[] | The values of the Bernstein polynomials at the given value. |
Remarks
The code is adapted from algorithm 1.3 described in the NURBS Book, by L. Piegl and W. Tiller.
ToBSpline()
Declaration
public BSpline ToBSpline()
Returns
Type | Description |
---|---|
BSpline | The new BSpline polynomial. |