![]() |
![]() |
![]() |
liboscats Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
gdouble (*OscatsIntegrateFunction) (const GGslVector *x
,gpointer data
); struct OscatsIntegrate; void oscats_integrate_set_tol (OscatsIntegrate *integrator
,gdouble tol
); void oscats_integrate_set_c_function (OscatsIntegrate *integrator
,guint dims
,OscatsIntegrateFunction f
); gdouble oscats_integrate_cube (OscatsIntegrate *integrator
,GGslVector *mu
,gdouble delta
,gpointer data
); gdouble oscats_integrate_box (OscatsIntegrate *integrator
,GGslVector *min
,GGslVector *max
,gpointer data
); gdouble oscats_integrate_ellipse (OscatsIntegrate *integrator
,GGslVector *mu
,GGslMatrix *Sigma
,gdouble c
,gpointer data
); gdouble oscats_integrate_space (OscatsIntegrate *integrator
,gpointer data
); void oscats_integrate_link_point (OscatsIntegrate *integrator
,OscatsPoint *point
);
void oscats_integrate_set_tol (OscatsIntegrate *integrator
,gdouble tol
);
Sets the integration tolerance. The default is 1e-6.
|
an OscatsIntegrate |
|
a tolerance level |
void oscats_integrate_set_c_function (OscatsIntegrate *integrator
,guint dims
,OscatsIntegrateFunction f
);
Sets the function to integrate.
|
an OscatsIntegrate |
|
the dimension of the function |
|
the function to integrate |
gdouble oscats_integrate_cube (OscatsIntegrate *integrator
,GGslVector *mu
,gdouble delta
,gpointer data
);
Integrates the set function over [mu-delta, mu+delta].
|
an OscatsIntegrate object with function set |
|
a vector indicating the center of the cube (or NULL for the origin) |
|
the half-width of the cube |
|
parameters for the function (or NULL ) |
Returns : |
the value of the integral |
gdouble oscats_integrate_box (OscatsIntegrate *integrator
,GGslVector *min
,GGslVector *max
,gpointer data
);
Integrates the set function over [min, max]
|
an OscatsIntegrate object with function set |
|
the lower bounds |
|
the upper bounds |
|
parameters for the function (or NULL ) |
Returns : |
the value of the integral |
gdouble oscats_integrate_ellipse (OscatsIntegrate *integrator
,GGslVector *mu
,GGslMatrix *Sigma
,gdouble c
,gpointer data
);
Integrates the set function over the ellipse defined by: (x-mu)' Sigma^-1 (x-mu) <= c.
This is accomplished by transformation of variables:
x = Bz + mu,
where B is the Cholesky decomposition of Sigma: c Sigma = BB'.
The integration is then performed over the sphere ||z||^2 <= 1.
Note that Sigma
must be symmetric and positive definite.
|
an OscatsIntegrate object with function set |
|
the center of the ellipse (or NULL for the origin) |
|
the orientation and shape of the ellipse (or NULL for a sphere) |
|
the dilation size of the ellipse (> 0) |
|
parameters for the function (or NULL ) |
Returns : |
the value of the integral |
gdouble oscats_integrate_space (OscatsIntegrate *integrator
,gpointer data
);
Integrates the set function over the whole space R^n.
|
an OscatsIntegrate object with function set |
|
parameters for the function (or NULL ) |
Returns : |
the value of the integral |
void oscats_integrate_link_point (OscatsIntegrate *integrator
,OscatsPoint *point
);
Links the internal integration variable used by integrator
with the
continuous dimensions of point
so that when the integration variable is
changed, point
is moved as well. The continuous dimension of point
must
be the same as the integration dimensions.
|
an OscatsIntegrate object with function already set |
|
an OscatsPoint to link |