Class: Numo::GSL::InterpAccel
- Inherits:
-
Object
- Object
- Numo::GSL::InterpAccel
- Defined in:
- ext/numo/gsl/interp/gsl_interp.c
Class Method Summary collapse
-
.new ⇒ Object
allocate instance of InterpAccel class.
Instance Method Summary collapse
-
#reset ⇒ Object
This function reinitializes the accelerator object acc.
Class Method Details
.new ⇒ Object
allocate instance of InterpAccel class.
This function returns a pointer to an accelerator object, which is a kind of iterator for interpolation lookups. It tracks the state of lookups, thus allowing for application of various acceleration strategies.
99 100 101 102 103 104 105 106 107 108 |
# File 'ext/numo/gsl/interp/gsl_interp.c', line 99
static VALUE
interp_accel_s_new(VALUE self)
{
gsl_interp_accel *w;
w = gsl_interp_accel_alloc();
if (!w) {
rb_raise(rb_eNoMemError,"fail to allocate struct");
}
return TypedData_Wrap_Struct(cInterpAccel, &interp_accel_data_type, (void*)w);
}
|
Instance Method Details
#reset ⇒ Object
This function reinitializes the accelerator object acc. It should be used when the cached information is no longer applicable—for example, when switching to a new dataset.
119 120 121 122 123 124 125 126 127 |
# File 'ext/numo/gsl/interp/gsl_interp.c', line 119
static VALUE
interp_accel_reset(VALUE self)
{
gsl_interp_accel *w;
TypedData_Get_Struct(self, gsl_interp_accel, &interp_accel_data_type, w);
gsl_interp_accel_reset(w);
return self;
}
|