SRTT Sketching¶
-
template<Number T, DataLocation L = Host>
class SRTTSketch¶ Subsampled Trigonometric Transform (SRTT), where the sketching operator \( \mathbf{S} \) is defined as
\[ \mathbf{S} = \mathbf{R} \mathbf{\Theta} \mathbf{E} \mathbf{\Pi}\]The matrix \( \mathbf{\Theta}\) represents one of the following unitary trigonometric transforms:
Discrete Fourier Transform (DFT): when
T
is a complex number.Discrete Cosine Transform (DCT):
kDCT<1,2,3 or 4>
.Discrete Hartley Transform (DHT):
kHartley
.
SRTTSketch will then call the
FFTW
library to compute \(\mathbf{\Theta} \vec{x}\) for some vector \( \mathbf{x} \).- Template Parameters:
T – Data type of the sketching matrix.
L – Location of the data. Must be
Host
.
Public Functions
-
SRTTSketch()¶
Creates a new sketching operator.
-
inline SRTTSketch(const SRTTSketchOptions &options)¶
Creates a new sketching operator according to
options
.- Parameters:
options – [in] sketching parameters
-
virtual ~SRTTSketch()¶
Destructor.
-
void set_params(const SRTTSketchOptions &options)¶
Sets the parameter of the sketching.
- Parameters:
options – [in] sketching parameters
-
struct SRTTSketchOptions¶
Options for the SRTTSketch.
Public Members
-
SRTTType type = kDCT2¶
Type of DCT. When using complex values, this parameter is ignored.
-
uint128_t seed = random::DefaultGenerator::default_seed¶
Random seed for the random number generator.
-
uint128_t stream = random::DefaultGenerator::default_stream¶
Random stream for the random number generator.
-
bool permute_input = false¶
Indicate if the input will be permuted before applying the sketching.
-
SRTTType type = kDCT2¶