#include <BPFTmplDec.hxx>
Public Member Functions | |
BPFTmpl () | |
Default constructor: takes interpolation to be linear by default. | |
BPFTmpl (const EInterpolation &eInterpolation) | |
Constructor from a given interpolation type. | |
BPFTmpl (TSize size) | |
Constructor from a given interpolation type and an initial size. | |
BPFTmpl (TSize size, const EInterpolation &eInterpolation) | |
Constructor from a given interpolation type and an initial size. | |
BPFTmpl (const BPFTmpl< TX, TY > &orig) | |
Copy Constructor. | |
void | Init () |
Special initializer. | |
const char * | GetClassName () const |
Returns the class name. | |
TSize | AllocatedSize (void) const |
Allocated Size of the member array of points. | |
TSize | Size (void) const |
Size of the member array of points, points with a higher index may be allocated but are not used. | |
void | SetSize (TSize newSize) |
Sets the size of the member array of points, points with a higher index may be allocated but are not used. | |
void | Resize (TSize newSize) |
Sets the allocated size of the member array of points, points with a higher index may be allocated but are not used. | |
TIndex | Insert (const PointTmpl< TX, TY > &point) |
Inserts a point in the correct position. | |
TIndex | Insert (const TX &x, const TX &y) |
Inserts a point made of an X and a Y value in the correct position. | |
void | DeleteIndex (TIndex index) |
Deletes the point found at the given index. | |
void | DeleteThroughXValue (const TX &x) |
Deletes the point with a closest X value to the one given. | |
void | DeleteBetweenIndex (TIndex leftIndex, TIndex rightIndex) |
Deletes the points between indices given. | |
void | DeleteBetweenXValues (const TX &leftX, const TX &rightX) |
Deletes the points having an X value in between the ones given. | |
void | SetValue (TIndex index, const TY &y) |
Setting Y value of a point. | |
void | SetXValue (TIndex index, const TX &x) |
void | SetIntpType (const EInterpolation &eInterpolation) |
Setting a different interpolation type. | |
void | SetStep (TSize step) |
Setting Step for resizing the array when needed. | |
TSize | GetStep () |
Querying for step used for resizing the array when needed. | |
TY | GetValueFromIndex (TIndex index) const |
Getting the value of the point located at a given position. | |
TY | GetValue (const TX &x) const |
Getting the value of a point from the value of its X component. | |
TY | GetValue (const TX &x, const EInterpolation &eInterpolation) const |
Getting the value of a point from the value of its X component. | |
const TX & | GetXValue (TIndex index) const |
Get X value from a given Index. | |
TIndex | GetPosition (const TX &x) const |
Get point position in BPf from X value. | |
void | GetnClosest (TIndex foundIndex) const |
Fills the interpolation points index buffer with the n closest points to the selected point, trying to keep n/2 points to the right and n/2 to the left whenever possible, being n the interpolation order plus one. | |
BPFTmpl< TX, TY > & | operator= (const BPFTmpl< TX, TY > &originalBPF) |
= operator, TODO: check!!!! | |
void | UpdateSplineTable () |
Updates Spline table creating it from scratch. | |
void | SetLeftDerivative (TData val) |
Changes the BPF border conditions. | |
void | UnsetLeftDerivative (void) |
void | SetRightDerivative (TData val) |
Changes the BPF border conditions. | |
void | UnsetRightDerivative (void) |
const EInterpolation & | GetInterpolation () const |
Inspector for getting the Interpolation type. | |
Array< PointTmpl< TX, TY > > & | GetPointArray () |
Accesor to the member array of points. | |
Protected Member Functions | |
TY | BPFPolInt (const TX &x, const Array< TIndex > &closestPointsIndex, TData &errorEstimate) const |
Member protected method Performs the actual polynomial interpolation algorithm. | |
void | CreateSplineTable () |
Member protected method creates spline table from current points in BPF. | |
TY | BPFSplineInt (const TX &x) const |
Member protected method Performs the actual 3rd order spline interpolation algorithm. | |
void | StoreOn (Storage &storage) const |
Stores component's subitems on the given Storage. | |
void | LoadFrom (Storage &storage) |
Loads component's subitems from the given Storage. | |
Protected Attributes | |
EInterpolation | meInterpolation |
Interpolation Type. | |
TSize | mnPoints |
Current number of points, does not need to be the same as size. | |
Array< PointTmpl< TX, TY > > | mArray |
Actual array of points. | |
SearchArray< PointTmpl< TX, TY > > | mSearch |
Implements search functionality based on locate and hunt. | |
Array< TIndex > | mClosestPoints |
mutable member: just used for optimizing access speed holds the closest points for the last get or set operation | |
Array< TY > | mc |
mutable member: just used for optimizing access speed holds auxiliary arrays for polynomic interpolation | |
Array< TY > | md |
int | mOrder |
auxiliary member: just used for optimizing access speed holds the order of the current interpolation (only makes sense if it is polynomic) | |
TIndex | mLastIndex |
mutable member: just used for optimizing access speed holds the last index used in a search | |
TX | mLastX |
mutable member: just used for optimizing access speed holds the last X value returned from a search | |
Array< TY > | mSplineTable |
Member variable for spline interpolation holds the actual spline table. | |
bool | mIsSplineUpdated |
Member variable for spline interpolation keps track of whether spline table is updated. | |
TData | mLeftDerivative |
Member variable for spline interpolation. | |
TData | mRightDerivative |
Member variable for spline interpolation. |
Definition at line 40 of file BPFTmplDec.hxx.
CLAM::BPFTmpl< TX, TY >::BPFTmpl | ( | ) | [inline] |
Default constructor: takes interpolation to be linear by default.
Definition at line 38 of file BPFTmplDef.hxx.
References CLAM::Array< T >::AllocatedSize(), CLAM::EInterpolation::eLinear, CLAM::BPFTmpl< TX, TY >::mc, CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::md, CLAM::BPFTmpl< TX, TY >::meInterpolation, and CLAM::Array< T >::SetSize().
CLAM::BPFTmpl< TX, TY >::BPFTmpl | ( | const EInterpolation & | eInterpolation | ) | [inline] |
Constructor from a given interpolation type.
Interpolation | Type: EInterpolation (linear, polynomical, spline...) |
Definition at line 63 of file BPFTmplDef.hxx.
References CLAM::Array< T >::AllocatedSize(), CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::SetIntpType(), and CLAM::Array< T >::SetSize().
CLAM::BPFTmpl< TX, TY >::BPFTmpl | ( | TSize | size | ) | [inline] |
Constructor from a given interpolation type and an initial size.
The initial size is used to allocate the member mArray. Is the one to use for efficiency whenever a maximum size of the BPF is known beforehand.
size | Allocation size for the member array of points. | |
eInterpolation | Kind of interpolation: (linear, polynomical, spline...) |
The initial size is used to allocate the member mArray. Is the one to use for efficiency whenever a maximum size of the BPF is known beforehand.
size,: | Allocation size for the member array of points. | |
Interpolation | Type: EInterpolation (linear, polynomical, spline...) |
Definition at line 89 of file BPFTmplDef.hxx.
References CLAM::Array< T >::AllocatedSize(), CLAM::EInterpolation::eLinear, CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::SetIntpType(), CLAM::BPFTmpl< TX, TY >::SetSize(), and CLAM::Array< T >::SetSize().
CLAM::BPFTmpl< TX, TY >::BPFTmpl | ( | TSize | size, | |
const EInterpolation & | eInterpolation | |||
) | [inline] |
Constructor from a given interpolation type and an initial size.
The initial size is used to allocate the member mArray. Is the one to use for efficiency whenever a maximum size of the BPF is known beforehand.
size,: | Allocation size for the member array of points. | |
Interpolation | Type: EInterpolation (linear, polynomical, spline...) |
Definition at line 115 of file BPFTmplDef.hxx.
References CLAM::Array< T >::AllocatedSize(), CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::SetIntpType(), CLAM::BPFTmpl< TX, TY >::SetSize(), and CLAM::Array< T >::SetSize().
CLAM::BPFTmpl< TX, TY >::BPFTmpl | ( | const BPFTmpl< TX, TY > & | orig | ) | [inline] |
Copy Constructor.
orig | BPF to be copied | |
originalBPF |
Definition at line 138 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::mc, CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::md, CLAM::BPFTmpl< TX, TY >::mnPoints, CLAM::BPFTmpl< TX, TY >::mSearch, CLAM::SearchArray< T >::Set(), CLAM::Array< T >::SetSize(), and CLAM::Array< T >::Size().
TSize CLAM::BPFTmpl< TX, TY >::AllocatedSize | ( | void | ) | const [inline] |
Allocated Size of the member array of points.
Definition at line 90 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::Init().
TY CLAM::BPFTmpl< TX, TY >::BPFPolInt | ( | const TX & | x, | |
const Array< TIndex > & | closestPointsIndex, | |||
TData & | errorEstimate | |||
) | const [inline, protected] |
Member protected method Performs the actual polynomial interpolation algorithm.
Definition at line 587 of file BPFTmplDef.hxx.
References CLAM::Abs(), and CLAM_ASSERT.
TY CLAM::BPFTmpl< TX, TY >::BPFSplineInt | ( | const TX & | x | ) | const [inline, protected] |
Member protected method Performs the actual 3rd order spline interpolation algorithm.
Definition at line 687 of file BPFTmplDef.hxx.
References CLAM_ASSERT, CLAM::BPFTmpl< TX, TY >::GetValueFromIndex(), CLAM::BPFTmpl< TX, TY >::GetXValue(), CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::mSplineTable, and CLAM::Array< T >::Size().
void CLAM::BPFTmpl< TX, TY >::CreateSplineTable | ( | ) | [inline, protected] |
Member protected method creates spline table from current points in BPF.
Definition at line 636 of file BPFTmplDef.hxx.
References CLAM_ASSERT, CLAM::BPFTmpl< TX, TY >::GetValueFromIndex(), CLAM::BPFTmpl< TX, TY >::GetXValue(), CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::mLeftDerivative, CLAM::BPFTmpl< TX, TY >::mRightDerivative, CLAM::BPFTmpl< TX, TY >::mSplineTable, CLAM::Array< T >::Resize(), CLAM::Array< T >::SetSize(), and CLAM::Array< T >::Size().
Referenced by CLAM::BPFTmpl< TX, TY >::UpdateSplineTable().
void CLAM::BPFTmpl< TX, TY >::DeleteBetweenIndex | ( | TIndex | leftIndex, | |
TIndex | rightIndex | |||
) | [inline] |
Deletes the points between indices given.
leftIndex | left index | |
rightIndex | right index | |
: | left index | |
: | right index |
Definition at line 264 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::DeleteIndex(), and CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated.
Referenced by CLAM::BPFTmpl< TX, TY >::DeleteBetweenXValues().
void CLAM::BPFTmpl< TX, TY >::DeleteBetweenXValues | ( | const TX & | leftX, | |
const TX & | rightX | |||
) | [inline] |
Deletes the points having an X value in between the ones given.
leftX | left X value | |
rightX | right X value | |
: | left X value | |
: | right X value |
Definition at line 278 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::DeleteBetweenIndex(), CLAM::BPFTmpl< TX, TY >::GetPosition(), and CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated.
void CLAM::BPFTmpl< TX, TY >::DeleteIndex | ( | TIndex | index | ) | [inline] |
Deletes the point found at the given index.
index | Index of the point to delete | |
: | index of the point to delete |
Definition at line 242 of file BPFTmplDef.hxx.
References CLAM::Array< T >::DeleteElem(), CLAM::BPFTmpl< TX, TY >::mArray, and CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated.
Referenced by CLAM::BPFTmpl< TX, TY >::DeleteBetweenIndex().
void CLAM::BPFTmpl< TX, TY >::DeleteThroughXValue | ( | const TX & | x | ) | [inline] |
Deletes the point with a closest X value to the one given.
x | X value of the point to delete | |
: | X value of the point to delete |
Definition at line 252 of file BPFTmplDef.hxx.
References CLAM::Array< T >::DeleteElem(), CLAM::BPFTmpl< TX, TY >::GetPosition(), CLAM::BPFTmpl< TX, TY >::mArray, and CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated.
const char* CLAM::BPFTmpl< TX, TY >::GetClassName | ( | ) | const [inline, virtual] |
Returns the class name.
This implementation returns a NULL pointer
Implements CLAM::Component.
Definition at line 83 of file BPFTmplDec.hxx.
const EInterpolation& CLAM::BPFTmpl< TX, TY >::GetInterpolation | ( | ) | const [inline] |
Inspector for getting the Interpolation type.
Definition at line 277 of file BPFTmplDec.hxx.
void CLAM::BPFTmpl< TX, TY >::GetnClosest | ( | TIndex | foundIndex | ) | const [inline] |
Fills the interpolation points index buffer with the n closest points to the selected point, trying to keep n/2 points to the right and n/2 to the left whenever possible, being n the interpolation order plus one.
When the point are too near the BPF edges, selected points are adjusted to this edge. When n is an even value, only n/2-1 points are selected at the left side of the selected index.
foundIndex | The index of the central point. |
Definition at line 446 of file BPFTmplDef.hxx.
References CLAM_ASSERT, CLAM::BPFTmpl< TX, TY >::mClosestPoints, CLAM::BPFTmpl< TX, TY >::mOrder, and CLAM::BPFTmpl< TX, TY >::Size().
Array<PointTmpl<TX,TY> >& CLAM::BPFTmpl< TX, TY >::GetPointArray | ( | ) | [inline] |
Accesor to the member array of points.
Definition at line 284 of file BPFTmplDec.hxx.
TIndex CLAM::BPFTmpl< TX, TY >::GetPosition | ( | const TX & | x | ) | const [inline] |
Get point position in BPf from X value.
x | X value |
: | X value |
Definition at line 513 of file BPFTmplDef.hxx.
References CLAM::SearchArray< T >::Find(), and CLAM::BPFTmpl< TX, TY >::mSearch.
Referenced by CLAM::BPFTmpl< TX, TY >::DeleteBetweenXValues(), and CLAM::BPFTmpl< TX, TY >::DeleteThroughXValue().
TSize CLAM::BPFTmpl< TX, TY >::GetStep | ( | ) | [inline] |
Querying for step used for resizing the array when needed.
Definition at line 196 of file BPFTmplDec.hxx.
TY CLAM::BPFTmpl< TX, TY >::GetValue | ( | const TX & | x, | |
const EInterpolation & | eInterpolation | |||
) | const [inline] |
Getting the value of a point from the value of its X component.
Performs the kind of interpolation passed as parameter
x | X value | |
eInterpolation | interpolation type |
Performs the kind of interpolation passed as parameter
: | X value | |
: | interpolation type |
Definition at line 354 of file BPFTmplDef.hxx.
References CLAM_ASSERT, CLAM::EInterpolation::eLinear, CLAM::EInterpolation::ePolynomial2, CLAM::EInterpolation::ePolynomial3, CLAM::EInterpolation::ePolynomial4, CLAM::EInterpolation::ePolynomial5, CLAM::EInterpolation::ePolynomialn, CLAM::EInterpolation::eRound, CLAM::EInterpolation::eSpline, and CLAM::EInterpolation::eStep.
TY CLAM::BPFTmpl< TX, TY >::GetValue | ( | const TX & | x | ) | const [inline] |
Getting the value of a point from the value of its X component.
Performs the kind of interpolation set at that moment
x | X value |
Definition at line 214 of file BPFTmplDec.hxx.
Referenced by CLAM::SpectralEnvelopeApply::Do(), CLAM::EnvelopeGenerator::Do(), and CLAM::BPFTmpl< TData, TData >::GetValue().
TY CLAM::BPFTmpl< TX, TY >::GetValueFromIndex | ( | TIndex | index | ) | const [inline] |
Getting the value of the point located at a given position.
index |
Definition at line 203 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFSplineInt(), CLAM::ConvertToArray(), CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::FDFilterGen::Do(), CLAM::Spectrum::ToDB(), and CLAM::Spectrum::ToLinear().
const TX& CLAM::BPFTmpl< TX, TY >::GetXValue | ( | TIndex | index | ) | const [inline] |
Get X value from a given Index.
index |
Definition at line 232 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFSplineInt(), CLAM::ConvertToArray(), CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::SMSSpectralShapeShift::Do(), and CLAM::BPFTmpl< TX, TY >::Insert().
void CLAM::BPFTmpl< TX, TY >::Init | ( | ) | [inline] |
Special initializer.
All points up to the allocated size are initialized with the X value being the actual index in the array.
Definition at line 165 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::AllocatedSize(), CLAM::BPFTmpl< TX, TY >::mArray, CLAM::Array< T >::SetSize(), and CLAM::BPFTmpl< TX, TY >::SetValue().
TIndex CLAM::BPFTmpl< TX, TY >::Insert | ( | const TX & | x, | |
const TX & | y | |||
) | [inline] |
Inserts a point made of an X and a Y value in the correct position.
Note that points in the array are always sorted according to their X value. Must therefore perform a previous serch.
x | X value | |
y | Y value |
Note that points in the array are always sorted according to their X value. Must therefore perform a previous serch.
: | X value | |
: | Y value |
Definition at line 231 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::Insert().
TIndex CLAM::BPFTmpl< TX, TY >::Insert | ( | const PointTmpl< TX, TY > & | point | ) | [inline] |
Inserts a point in the correct position.
Note that points in the array are always sorted according to their X value. Must therefore perform a previous serch.
point | the point to be inserted |
Note that points in the array are always sorted according to their X value. Must therefore perform a previous serch.
point | to insert |
Definition at line 184 of file BPFTmplDef.hxx.
References CLAM::Array< T >::AddElem(), CLAM::SearchArray< T >::Find(), CLAM::PointTmpl< TX, TY >::GetX(), CLAM::BPFTmpl< TX, TY >::GetXValue(), CLAM::PointTmpl< TX, TY >::GetY(), CLAM::Array< T >::InsertElem(), CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, CLAM::BPFTmpl< TX, TY >::mSearch, CLAM::BPFTmpl< TX, TY >::SetValue(), CLAM::BPFTmpl< TX, TY >::Size(), and CLAM::Array< T >::Size().
Referenced by CLAM::SegmentSMSMorphConfig::DefaultValues(), and CLAM::BPFTmpl< TX, TY >::Insert().
void CLAM::BPFTmpl< TX, TY >::LoadFrom | ( | Storage & | storage | ) | [inline, protected, virtual] |
Loads component's subitems from the given Storage.
storage | The given storage where the subitem will be loaded from |
Implements CLAM::Component.
Definition at line 714 of file BPFTmplDef.hxx.
References CLAM::Storage::Load(), CLAM::BPFTmpl< TX, TY >::mArray, and CLAM::BPFTmpl< TX, TY >::meInterpolation.
BPFTmpl< TX, TY > & CLAM::BPFTmpl< TX, TY >::operator= | ( | const BPFTmpl< TX, TY > & | originalBPF | ) | [inline] |
= operator, TODO: check!!!!
Definition at line 523 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::meInterpolation, CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, CLAM::BPFTmpl< TX, TY >::mnPoints, CLAM::BPFTmpl< TX, TY >::mOrder, CLAM::BPFTmpl< TX, TY >::mSearch, CLAM::BPFTmpl< TX, TY >::mSplineTable, and CLAM::SearchArray< T >::Set().
void CLAM::BPFTmpl< TX, TY >::Resize | ( | TSize | newSize | ) | [inline] |
Sets the allocated size of the member array of points, points with a higher index may be allocated but are not used.
Actually does a new memory allocation
newSize | new allocated size |
Definition at line 116 of file BPFTmplDec.hxx.
Referenced by CLAM::SMSSineFilter::InitBPF().
void CLAM::BPFTmpl< TX, TY >::SetIntpType | ( | const EInterpolation & | eInterpolation | ) | [inline] |
Setting a different interpolation type.
Auxiliary member arrays mc and md are resized if necessary.
new | interpolation type |
Auxiliary member arrays mc and md are resized if necessary.
: | new interpolation type |
Definition at line 292 of file BPFTmplDef.hxx.
References CLAM_ASSERT, CLAM::EInterpolation::eLinear, CLAM::EInterpolation::ePolynomial2, CLAM::EInterpolation::ePolynomial3, CLAM::EInterpolation::ePolynomial4, CLAM::EInterpolation::ePolynomial5, CLAM::EInterpolation::ePolynomialn, CLAM::EInterpolation::eSpline, CLAM::BPFTmpl< TX, TY >::mc, CLAM::BPFTmpl< TX, TY >::md, CLAM::BPFTmpl< TX, TY >::meInterpolation, CLAM::BPFTmpl< TX, TY >::mOrder, CLAM::Array< T >::Resize(), CLAM::Array< T >::SetSize(), and CLAM::BPFTmpl< TX, TY >::Size().
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl().
void CLAM::BPFTmpl< TX, TY >::SetLeftDerivative | ( | TData | val | ) | [inline] |
Changes the BPF border conditions.
Definition at line 550 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, and CLAM::BPFTmpl< TX, TY >::mLeftDerivative.
void CLAM::BPFTmpl< TX, TY >::SetRightDerivative | ( | TData | val | ) | [inline] |
Changes the BPF border conditions.
Definition at line 567 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, and CLAM::BPFTmpl< TX, TY >::mRightDerivative.
void CLAM::BPFTmpl< TX, TY >::SetSize | ( | TSize | newSize | ) | [inline] |
Sets the size of the member array of points, points with a higher index may be allocated but are not used.
Actual allocated size is left untouched
newSize | new logical size |
Definition at line 107 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), and CLAM::SMSSineFilter::InitBPF().
void CLAM::BPFTmpl< TX, TY >::SetStep | ( | TSize | step | ) | [inline] |
Setting Step for resizing the array when needed.
step | Allocation step value |
Definition at line 190 of file BPFTmplDec.hxx.
void CLAM::BPFTmpl< TX, TY >::SetValue | ( | TIndex | index, | |
const TY & | y | |||
) | [inline] |
Setting Y value of a point.
index | The index where the point is found | |
y | The new value for the Y |
Definition at line 167 of file BPFTmplDec.hxx.
Referenced by CLAM::ConvertToBPF(), CLAM::SegmentSMSMorphConfig::DefaultValues(), CLAM::FDFilterGen::Do(), CLAM::BPFTmpl< TX, TY >::Init(), CLAM::SMSSineFilter::InitBPF(), CLAM::BPFTmpl< TX, TY >::Insert(), CLAM::Spectrum::ToDB(), CLAM::Spectrum::ToLinear(), and CLAM::SegmentSMSHarmonizer::UpdateBPF().
void CLAM::BPFTmpl< TX, TY >::SetXValue | ( | TIndex | index, | |
const TX & | x | |||
) | [inline] |
Definition at line 173 of file BPFTmplDec.hxx.
Referenced by CLAM::ConvertToBPF(), CLAM::SegmentSMSMorphConfig::DefaultValues(), and CLAM::SMSSpectralShapeShift::Do().
TSize CLAM::BPFTmpl< TX, TY >::Size | ( | void | ) | const [inline] |
Size of the member array of points, points with a higher index may be allocated but are not used.
Definition at line 98 of file BPFTmplDec.hxx.
Referenced by CLAM::ConvertToArray(), CLAM::ConvertToBPF(), CLAM::SMSSpectralShapeShift::Do(), CLAM::BPFTmpl< TX, TY >::GetnClosest(), CLAM::BPFTmpl< TX, TY >::Insert(), CLAM::BPFTmpl< TX, TY >::SetIntpType(), and CLAM::SegmentSMSHarmonizer::UpdateBPF().
void CLAM::BPFTmpl< TX, TY >::StoreOn | ( | Storage & | storage | ) | const [inline, protected, virtual] |
Stores component's subitems on the given Storage.
storage | The given storage where the subitem will be stored |
Implements CLAM::Component.
Definition at line 706 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mArray, CLAM::BPFTmpl< TX, TY >::meInterpolation, and CLAM::Storage::Store().
void CLAM::BPFTmpl< TX, TY >::UnsetLeftDerivative | ( | void | ) | [inline] |
Definition at line 556 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, and CLAM::BPFTmpl< TX, TY >::mLeftDerivative.
void CLAM::BPFTmpl< TX, TY >::UnsetRightDerivative | ( | void | ) | [inline] |
Definition at line 573 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated, CLAM::BPFTmpl< TX, TY >::mLeftDerivative, and CLAM::BPFTmpl< TX, TY >::mRightDerivative.
void CLAM::BPFTmpl< TX, TY >::UpdateSplineTable | ( | ) | [inline] |
Updates Spline table creating it from scratch.
Definition at line 539 of file BPFTmplDef.hxx.
References CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), and CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated.
Referenced by CLAM::SMSSpectralShapeShift::Do().
Array<PointTmpl<TX,TY> > CLAM::BPFTmpl< TX, TY >::mArray [protected] |
Actual array of points.
Definition at line 303 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TData, TData >::AllocatedSize(), CLAM::BPFTmpl< TX, TY >::BPFSplineInt(), CLAM::BPFTmpl< TX, TY >::BPFTmpl(), CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::BPFTmpl< TX, TY >::DeleteIndex(), CLAM::BPFTmpl< TX, TY >::DeleteThroughXValue(), CLAM::BPFTmpl< TData, TData >::GetPointArray(), CLAM::BPFTmpl< TData, TData >::GetStep(), CLAM::BPFTmpl< TData, TData >::GetValueFromIndex(), CLAM::BPFTmpl< TData, TData >::GetXValue(), CLAM::BPFTmpl< TX, TY >::Init(), CLAM::BPFTmpl< TX, TY >::Insert(), CLAM::BPFTmpl< TX, TY >::LoadFrom(), CLAM::BPFTmpl< TX, TY >::operator=(), CLAM::BPFTmpl< TData, TData >::Resize(), CLAM::BPFTmpl< TData, TData >::SetSize(), CLAM::BPFTmpl< TData, TData >::SetStep(), CLAM::BPFTmpl< TData, TData >::SetValue(), CLAM::BPFTmpl< TData, TData >::SetXValue(), CLAM::BPFTmpl< TData, TData >::Size(), and CLAM::BPFTmpl< TX, TY >::StoreOn().
Array<TY> CLAM::BPFTmpl< TX, TY >::mc [mutable, protected] |
mutable member: just used for optimizing access speed holds auxiliary arrays for polynomic interpolation
Definition at line 318 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), and CLAM::BPFTmpl< TX, TY >::SetIntpType().
Array<TIndex> CLAM::BPFTmpl< TX, TY >::mClosestPoints [mutable, protected] |
mutable member: just used for optimizing access speed holds the closest points for the last get or set operation
Definition at line 313 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), and CLAM::BPFTmpl< TX, TY >::GetnClosest().
Array<TY> CLAM::BPFTmpl< TX, TY >::md [mutable, protected] |
Definition at line 318 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), and CLAM::BPFTmpl< TX, TY >::SetIntpType().
EInterpolation CLAM::BPFTmpl< TX, TY >::meInterpolation [protected] |
Interpolation Type.
Definition at line 294 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), CLAM::BPFTmpl< TData, TData >::GetInterpolation(), CLAM::BPFTmpl< TData, TData >::GetValue(), CLAM::BPFTmpl< TX, TY >::LoadFrom(), CLAM::BPFTmpl< TX, TY >::operator=(), CLAM::BPFTmpl< TX, TY >::SetIntpType(), and CLAM::BPFTmpl< TX, TY >::StoreOn().
bool CLAM::BPFTmpl< TX, TY >::mIsSplineUpdated [protected] |
Member variable for spline interpolation keps track of whether spline table is updated.
Definition at line 344 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::DeleteBetweenIndex(), CLAM::BPFTmpl< TX, TY >::DeleteBetweenXValues(), CLAM::BPFTmpl< TX, TY >::DeleteIndex(), CLAM::BPFTmpl< TX, TY >::DeleteThroughXValue(), CLAM::BPFTmpl< TX, TY >::Insert(), CLAM::BPFTmpl< TX, TY >::operator=(), CLAM::BPFTmpl< TX, TY >::SetLeftDerivative(), CLAM::BPFTmpl< TX, TY >::SetRightDerivative(), CLAM::BPFTmpl< TData, TData >::SetValue(), CLAM::BPFTmpl< TData, TData >::SetXValue(), CLAM::BPFTmpl< TX, TY >::UnsetLeftDerivative(), CLAM::BPFTmpl< TX, TY >::UnsetRightDerivative(), and CLAM::BPFTmpl< TX, TY >::UpdateSplineTable().
TIndex CLAM::BPFTmpl< TX, TY >::mLastIndex [mutable, protected] |
mutable member: just used for optimizing access speed holds the last index used in a search
Definition at line 328 of file BPFTmplDec.hxx.
TX CLAM::BPFTmpl< TX, TY >::mLastX [mutable, protected] |
mutable member: just used for optimizing access speed holds the last X value returned from a search
Definition at line 333 of file BPFTmplDec.hxx.
TData CLAM::BPFTmpl< TX, TY >::mLeftDerivative [protected] |
Member variable for spline interpolation.
stores the value of the first derivative at the left point. If equal or greater to 1e30, zero second derivative is used as left boundary condition.
Definition at line 353 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::BPFTmpl< TX, TY >::SetLeftDerivative(), CLAM::BPFTmpl< TX, TY >::UnsetLeftDerivative(), and CLAM::BPFTmpl< TX, TY >::UnsetRightDerivative().
TSize CLAM::BPFTmpl< TX, TY >::mnPoints [protected] |
Current number of points, does not need to be the same as size.
Definition at line 298 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), and CLAM::BPFTmpl< TX, TY >::operator=().
int CLAM::BPFTmpl< TX, TY >::mOrder [protected] |
auxiliary member: just used for optimizing access speed holds the order of the current interpolation (only makes sense if it is polynomic)
Definition at line 323 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::GetnClosest(), CLAM::BPFTmpl< TX, TY >::operator=(), and CLAM::BPFTmpl< TX, TY >::SetIntpType().
TData CLAM::BPFTmpl< TX, TY >::mRightDerivative [protected] |
Member variable for spline interpolation.
stores the value of the first derivative at the right point. If equal or greater to 1e30, zero second derivative is used as right boundary condition.
Definition at line 362 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::BPFTmpl< TX, TY >::SetRightDerivative(), and CLAM::BPFTmpl< TX, TY >::UnsetRightDerivative().
SearchArray<PointTmpl<TX,TY> > CLAM::BPFTmpl< TX, TY >::mSearch [protected] |
Implements search functionality based on locate and hunt.
Definition at line 308 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFTmpl(), CLAM::BPFTmpl< TX, TY >::GetPosition(), CLAM::BPFTmpl< TX, TY >::Insert(), and CLAM::BPFTmpl< TX, TY >::operator=().
Array<TY> CLAM::BPFTmpl< TX, TY >::mSplineTable [protected] |
Member variable for spline interpolation holds the actual spline table.
Definition at line 339 of file BPFTmplDec.hxx.
Referenced by CLAM::BPFTmpl< TX, TY >::BPFSplineInt(), CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), and CLAM::BPFTmpl< TX, TY >::operator=().