Control parameterization using quadratic (2nd order) Bspline basis functions.
More...
#include <controlbasis.hpp>
|
| | BSpline2nd (int nsplines, double tstart, double tstop, bool enforceZeroBoundary) |
| | Constructor for quadratic Bsplines.
|
| |
| | ~BSpline2nd () |
| |
| int | getNSplines () |
| | Retrieves the number of splines (default implementation returns 0).
|
| |
| void | enforceBoundary (double *x, int carrier_id) |
| | Sets the first and last two spline coefficients in x to zero for this carrier wave, so that the controls start and end at zero.
|
| |
| void | evaluate (const double t, const std::vector< double > &coeff, int carrier_freq_id, double *Blt1_ptr, double *Blt2_ptr) |
| | Evaluates the control basis at a given time using the provided coefficients.
|
| |
| void | derivative (const double t, const std::vector< double > &coeff, double *coeff_diff, const double valbar1, const double valbar2, int carrier_freq_id) |
| | Evaluates the derivative of the control basis at a given time.
|
| |
| | ControlBasis () |
| |
| | ControlBasis (int nparams_, double tstart, double tstop, bool enforceZeroBoundary) |
| | Constructor with parameters.
|
| |
| virtual | ~ControlBasis () |
| |
| int | getNparams () |
| | Retrieves the number of parameters defining the controls.
|
| |
| double | getTstart () |
| | Retrieves the start time of the interval.
|
| |
| double | getTstop () |
| | Retrieves the stop time of the interval.
|
| |
| ControlType | getType () |
| | Retrieves the type of control parameterization.
|
| |
| void | setSkip (int skip_) |
| | Sets the offset for the starting location in the global control vector.
|
| |
| int | getSkip () |
| | Retrieves the offset for the starting location in the global control vector.
|
| |
| virtual double | computeVariation (std::vector< double > &, int) |
| | Computes the variation of control parameters (default implementation returns 0.0).
|
| |
| virtual void | computeVariation_diff (double *, std::vector< double > &, double, int) |
| | Computes the gradient of the variation (default implementation does nothing).
|
| |
|
| double | basisfunction (int id, double t) |
| | Evaluate one basis function B_i(tau_i(t)).
|
| |
|
| int | nsplines |
| | Number of splines.
|
| |
| double | dtknot |
| | Spacing of time knot vector.
|
| |
| double * | tcenter |
| | Vector of basis function center positions.
|
| |
| double | width |
| | Support of each basis function (m*dtknot).
|
| |
| int | nparams |
| | Number of parameters that define the control pulse.
|
| |
| double | tstart |
| | Start time of the interval where the control basis is applied.
|
| |
| double | tstop |
| | Stop time of the interval where the control basis is applied.
|
| |
| int | skip |
| | Offset to the starting location for this basis inside the global control vector.
|
| |
| ControlType | controltype |
| | Type of control parameterization.
|
| |
| bool | enforceZeroBoundary |
| | Flag to enforce zero boundary conditions for control pulses.
|
| |
Control parameterization using quadratic (2nd order) Bspline basis functions.
Bspline basis functions have local support with width = 3*dtknot, where dtknot = T/(nsplines -2) is the time knot vector spacing.
◆ BSpline2nd()
| BSpline2nd::BSpline2nd |
( |
int |
nsplines, |
|
|
double |
tstart, |
|
|
double |
tstop, |
|
|
bool |
enforceZeroBoundary |
|
) |
| |
Constructor for quadratic Bsplines.
- Parameters
-
| nsplines | Number of splines. |
| tstart | Start time of the interval. |
| tstop | Stop time of the interval. |
| enforceZeroBoundary | Flag to enforce zero boundary conditions. |
◆ ~BSpline2nd()
| BSpline2nd::~BSpline2nd |
( |
| ) |
|
◆ basisfunction()
| double BSpline2nd::basisfunction |
( |
int |
id, |
|
|
double |
t |
|
) |
| |
|
protected |
Evaluate one basis function B_i(tau_i(t)).
- Parameters
-
| id | Index of the basis function. |
| t | Time at which to evaluate. |
- Returns
- double Value of the basis function.
◆ derivative()
| void BSpline2nd::derivative |
( |
const double |
t, |
|
|
const std::vector< double > & |
coeff, |
|
|
double * |
coeff_diff, |
|
|
const double |
valbar1, |
|
|
const double |
valbar2, |
|
|
int |
carrier_freq_id |
|
) |
| |
|
virtual |
Evaluates the derivative of the control basis at a given time.
- Parameters
-
| t | Time at which to evaluate. |
| coeff | Vector of coefficients. |
| coeff_diff | Pointer to the derivative coefficients. |
| valbar1 | Multiplier for the real derivative term. |
| valbar2 | Multiplier for the imaginary derivative term. |
| carrier_freq_id | ID of the carrier frequency. |
Implements ControlBasis.
◆ enforceBoundary()
| void BSpline2nd::enforceBoundary |
( |
double * |
x, |
|
|
int |
carrier_id |
|
) |
| |
|
virtual |
Sets the first and last two spline coefficients in x to zero for this carrier wave, so that the controls start and end at zero.
- Parameters
-
| x | Pointer to the control parameters. |
| carrier_id | ID of the carrier wave. |
Reimplemented from ControlBasis.
◆ evaluate()
| void BSpline2nd::evaluate |
( |
const double |
t, |
|
|
const std::vector< double > & |
coeff, |
|
|
int |
carrier_freq_id, |
|
|
double * |
Blt1, |
|
|
double * |
Blt2 |
|
) |
| |
|
virtual |
Evaluates the control basis at a given time using the provided coefficients.
- Parameters
-
| [in] | t | Time at which to evaluate. |
| [in] | coeff | Vector of parameters (coefficients of the basis parameterization). |
| [in] | carrier_freq_id | ID of the carrier frequency, provided by the oscillator. |
| [out] | Blt1 | Pointer to store the real part of the control parameterization. |
| [out] | Blt2 | Pointer to store the imaginary part of the control parameterization. |
Implements ControlBasis.
◆ getNSplines()
| int BSpline2nd::getNSplines |
( |
| ) |
|
|
inlinevirtual |
Retrieves the number of splines (default implementation returns 0).
- Returns
- int Number of splines.
Reimplemented from ControlBasis.
◆ dtknot
| double BSpline2nd::dtknot |
|
protected |
Spacing of time knot vector.
◆ nsplines
◆ tcenter
| double* BSpline2nd::tcenter |
|
protected |
Vector of basis function center positions.
◆ width
Support of each basis function (m*dtknot).
The documentation for this class was generated from the following files: