Class: Numo::GSL::Multifit::LinearWorkspace
- Inherits:
-
Object
- Object
- Numo::GSL::Multifit::LinearWorkspace
- Defined in:
- ext/numo/gsl/multifit/gsl_multifit.c
Class Method Summary collapse
-
.new(n, p) ⇒ Object
allocate instance of LinearWorkspace class.
Class Method Details
.new(n, p) ⇒ Object
allocate instance of LinearWorkspace class.
This function allocates a workspace for fitting a model to a maximum of n observations using a maximum of p parameters. The user may later supply a smaller least squares system if desired. The size of the workspace is O(np + p^2).
70 71 72 73 74 75 76 77 78 79 |
# File 'ext/numo/gsl/multifit/gsl_multifit.c', line 70
static VALUE
multifit_linear_workspace_s_new(VALUE klass, VALUE v1, VALUE v2)
{
gsl_multifit_linear_workspace *w;
w = gsl_multifit_linear_alloc(NUM2SIZET(v1), NUM2SIZET(v2));
if (!w) {
rb_raise(rb_eNoMemError,"fail to allocate struct");
}
return TypedData_Wrap_Struct(cLinearWorkspace, &multifit_linear_workspace_data_type, (void*)w);
}
|