Class: Numo::GSL::WaveletWorkspace
- Inherits:
-
Object
- Object
- Numo::GSL::WaveletWorkspace
- Defined in:
- ext/numo/gsl/wavelet/gsl_wavelet.c
Class Method Summary collapse
-
.new(n) ⇒ Object
allocate instance of WaveletWorkspace class.
Class Method Details
.new(n) ⇒ Object
allocate instance of WaveletWorkspace class.
This function allocates a workspace for the discrete wavelet transform. To perform a one-dimensional transform on n elements, a workspace of size n must be provided. For two-dimensional transforms of n-by-n matrices it is sufficient to allocate a workspace of size n, since the transform operates on individual rows and columns. A null pointer is returned if insufficient memory is available.
128 129 130 131 132 133 134 135 136 137 |
# File 'ext/numo/gsl/wavelet/gsl_wavelet.c', line 128
static VALUE
wavelet_workspace_s_new(VALUE self, VALUE v1)
{
gsl_wavelet_workspace *w;
w = gsl_wavelet_workspace_alloc(NUM2SIZET(v1));
if (!w) {
rb_raise(rb_eNoMemError,"fail to allocate struct");
}
return TypedData_Wrap_Struct(cWaveletWorkspace, &wavelet_workspace_data_type, (void*)w);
}
|