WaveletBases
The candidate bases of the WDF basis competition, shared by WDF2Classify
and WDF2Reconstruct: the default list, the list of releases 3.0.0 to
3.3.0, the candidate-name parser and the transform of a candidate.
-
struct WaveletBasis
One candidate of the basis competition: its name, its mother (or LocalCos) and its packet depth, 0 for the pyramidal transform.
Public Members
-
std::string name
the candidate name, as in SetBases
-
enum WaveletTransform::WaveletType type
the mother, or LocalCos
-
unsigned int depth
packet depth (log2 M for LocalCos), 0 for the pyramid
-
std::string name
-
const char *tsa::DefaultWaveletBases()
The default candidate list of WDF2Classify and WDF2Reconstruct, comma-separated in competition order: Haar, DaubC4, DaubC8, Sym4, DaubC16, Sym8, Coif3, DaubC24, Sym12, Coif5, ten pyramids ordered by filter length, shortest first, Daubechies before Symlet at equal length. A tie of the window statistic goes to the later candidate.
-
const char *tsa::LegacyWaveletBases()
The default candidate list of releases 3.0.0 to 3.3.0: Haar, DaubC4, DaubC8, DaubC12, DaubC16, DaubC20, Sym4, Sym8, Coif1, Coif2. Passing it to SetBases reproduces the competition of those releases.
-
WaveletBasis tsa::ParseWaveletBasis(const std::string &name, unsigned int window)
Parse one candidate name for a window of the given length.
- Throws:
std::invalid_argument – on an unknown name, packet depth 0, a depth above log2 of the window, or a LocalCos segment that is not a power of 2 from 2 to the window
-
std::vector<WaveletBasis> tsa::ParseWaveletBases(const std::string &names, unsigned int window, unsigned int blockLength)
Parse a comma-separated candidate list; blanks around names are ignored.
- Parameters:
names – the list
window – the window length
blockLength – when non-zero, the block rule’s length L: every packet band or local cosine row (window / 2^depth coefficients) must hold one full block of L
- Throws:
std::invalid_argument – on an invalid name, a repeated name, an empty list, or a band shorter than blockLength
-
void tsa::CheckWaveletBlocks(const std::vector<WaveletBasis> &bases, unsigned int window, unsigned int blockLength)
Throw std::invalid_argument when a band (row) of a candidate, window / 2^depth coefficients, is shorter than blockLength.
-
std::string tsa::JoinWaveletBases(const std::vector<WaveletBasis> &bases)
The names of a candidate list, comma-separated.
-
std::unique_ptr<WaveletTransform> tsa::MakeWaveletTransform(const WaveletBasis &basis, unsigned int window)
The transform of a candidate on a window: its Forward gives the coefficients the competition thresholds, its Inverse inverts them exactly.