#include <BSpline.h>
|
| | BSpline (const T *x, int nx, const T *y, double wl, int bc_type=BSplineBase< T >::BC_ZERO_SECOND, int num_nodes=0) |
| |
| | BSpline (BSplineBase< T > &base, const T *y) |
| |
| bool | solve (const T *y) |
| |
| T | evaluate (T x) |
| |
| T | slope (T x) |
| |
| T | coefficient (int n) |
| |
| | BSplineBase (const T *x, int nx, double wl, int bc_type=BC_ZERO_SECOND, int num_nodes=0) |
| |
|
| BSplineBase (const BSplineBase &bb) |
| | Copy constructor.
|
| |
|
BSplineBase & | operator= (const BSplineBase &right) |
| | Assignment operator.
|
| |
| bool | setDomain (const T *x, int nx, double wl, int bc_type=BC_ZERO_SECOND, int num_nodes=0) |
| |
| BSpline< T > * | apply (const T *y) |
| |
| const T * | nodes (int *nnodes) |
| |
| int | nNodes () |
| |
| int | nX () |
| |
|
T | Xmin () |
| | Minimum x value found.
|
| |
|
T | Xmax () |
| | Maximum x value found.
|
| |
| double | Alpha (double wavelength) |
| |
| double | Alpha () |
| |
| bool | ok () |
| |
|
|
BSplineP< T > * | s |
| |
|
T | mean |
| |
|
double | waveLength |
| |
|
int | NX |
| |
|
int | K |
| |
|
int | BC |
| |
|
T | xmax |
| |
|
T | xmin |
| |
|
int | M |
| |
|
double | DX |
| |
|
double | alpha |
| |
|
bool | OK |
| |
|
std::unique_ptr< Base > | base |
| |
template<class T>
class BSpline< T >
Used to evaluate a BSpline. Inherits the BSplineBase domain information and interface and adds smoothing. See the BSplineBase documentation for a summary of the BSpline interface.
◆ BSpline() [1/2]
Create a single spline with the parameters required to set up the domain and subsequently smooth the given set of y values. The y values must correspond to each of the values in the x array. If either the domain setup fails or the spline cannot be solved, the state will be set to not ok.
- See also
- ok().
- Parameters
-
| x | The array of x values in the domain. |
| nx | The number of values in the x array. |
| y | The array of y values corresponding to each of the nX() x values in the domain. |
| wl | The cutoff wavelength, in the same units as the x values. A wavelength of zero disables the derivative constraint. |
| bc_type | The enumerated boundary condition type. If omitted it defaults to BC_ZERO_SECOND. |
| num_nodes | The number of nodes to use for the cubic b-spline. If less than 2 a "reasonable" number will be calculated automatically, taking into account the given cutoff wavelength. |
◆ BSpline() [2/2]
A BSpline curve can be derived from a separate base and a set of data points y over that base.
◆ coefficient()
template<class T >
| T BSpline< T >::coefficient |
( |
int |
n | ) |
|
Return the n-th basis coefficient, from 0 to M. If the current state is not ok(), or n is out of range, the method returns zero.
◆ evaluate()
Return the evaluation of the smoothed curve at a particular x value. If current state is not ok(), returns 0.
◆ slope()
Return the first derivative of the spline curve at the given x. Returns zero if the current state is not ok().
◆ solve()
template<class T >
| bool BSpline< T >::solve |
( |
const T * |
y | ) |
|
Solve the spline curve for a new set of y values. Returns false if the solution fails.
- Parameters
-
| y | The array of y values corresponding to each of the nX() x values in the domain. |
The documentation for this class was generated from the following files: