NcmIntegral1dPtr

NcmIntegral1dPtr — Function pointer one dimensional integration object.

Stability Level

Stable, unless otherwise indicated

Functions

Properties

gpointer integrand Read / Write / Construct Only
gpointer userdata Read / Write
gpointer userfree Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── NcmIntegral1d
        ╰── NcmIntegral1dPtr

Includes

#include <numcosmo/math/ncm_integral1d_ptr.h>

Description

This object facilitates one-dimensional integration by employing a function pointer to evaluate the integrand. It's worth mentioning that this object is not well suited for serialization or for integration with GObject introspection bindings, as it relies on raw function pointers.

Functions

NcmIntegral1dPtrF ()

gdouble
(*NcmIntegral1dPtrF) (gpointer userdata,
                      const gdouble x,
                      const gdouble w);

ncm_integral1d_ptr_new ()

NcmIntegral1dPtr *
ncm_integral1d_ptr_new (NcmIntegral1dPtrF F,
                        GDestroyNotify userfree);

Creates a new NcmIntegral1dPtr object for the integrand F .

Parameters

F

a NcmIntegral1dPtrF.

[scope notified]

userfree

GDestroyNotify.

[scope notified]

Returns

the new NcmIntegral1dPtr object.

[transfer full]


ncm_integral1d_ptr_new_full ()

NcmIntegral1dPtr *
ncm_integral1d_ptr_new_full (NcmIntegral1dPtrF F,
                             GDestroyNotify userfree,
                             const gdouble reltol,
                             const gdouble abstol,
                             const guint partition,
                             const guint rule);

Creates a new NcmIntegral1dPtr object for the integrand F .

Parameters

F

a NcmIntegral1dPtrF.

[scope notified]

userfree

GDestroyNotify.

[scope notified]

reltol

the relative tolerance

 

abstol

the absolute tolerance

 

partition

the maximum subdivisions

 

rule

integration rule to use in each subinterval

 

Returns

the new NcmIntegral1dPtr object.

[transfer full]


ncm_integral1d_ptr_ref ()

NcmIntegral1dPtr *
ncm_integral1d_ptr_ref (NcmIntegral1dPtr *int1d_ptr);

Increases the reference count of int1d by one.

Parameters

int1d_ptr

a NcmIntegral1dPtr

 

Returns

int1d .

[transfer full]


ncm_integral1d_ptr_free ()

void
ncm_integral1d_ptr_free (NcmIntegral1dPtr *int1d_ptr);

Decreases the reference count of int1d by one.

Parameters

int1d_ptr

a NcmIntegral1dPtr

 

ncm_integral1d_ptr_clear ()

void
ncm_integral1d_ptr_clear (NcmIntegral1dPtr **int1d_ptr);

If *int1d is different from NULL, decreases the reference count of *int1d by one and sets *int1d to NULL.

Parameters

int1d_ptr

a NcmIntegral1dPtr

 

ncm_integral1d_ptr_set_userdata ()

void
ncm_integral1d_ptr_set_userdata (NcmIntegral1dPtr *int1d_ptr,
                                 gpointer userdata);

Sets user data to userdata .

Parameters

int1d_ptr

a NcmIntegral1dPtr

 

userdata

a gpointer to user data

 

Types and Values

NCM_TYPE_INTEGRAL1D_PTR

#define NCM_TYPE_INTEGRAL1D_PTR (ncm_integral1d_ptr_get_type ())

NcmIntegral1dPtr

typedef struct _NcmIntegral1dPtr NcmIntegral1dPtr;

Property Details

The “integrand” property

  “integrand”                gpointer

Integrand function pointer.

Owner: NcmIntegral1dPtr

Flags: Read / Write / Construct Only


The “userdata” property

  “userdata”                 gpointer

Integrand function user data.

Owner: NcmIntegral1dPtr

Flags: Read / Write


The “userfree” property

  “userfree”                 gpointer

Integrand function user data free function.

Owner: NcmIntegral1dPtr

Flags: Read / Write / Construct Only