Top | ![]() |
![]() |
![]() |
![]() |
Functions
Properties
double | ini-h | Read / Write / Construct |
guint | max-order | Read / Write / Construct |
double | richardson-step | Read / Write / Construct |
double | round-off-pad | Read / Write / Construct |
Functions
ncm_diff_clear ()
void
ncm_diff_clear (NcmDiff **diff
);
Decrease the reference count of diff
by one, and sets the pointer *diff
to
NULL.
ncm_diff_get_max_order ()
guint
ncm_diff_get_max_order (NcmDiff *diff
);
Gets the maximum order used when calculating the derivatives.
ncm_diff_get_richardson_step ()
gdouble
ncm_diff_get_richardson_step (NcmDiff *diff
);
Gets the current Richardson step used in the tables.
ncm_diff_get_round_off_pad ()
gdouble
ncm_diff_get_round_off_pad (NcmDiff *diff
);
Gets the current round-off padding used in calculations.
ncm_diff_get_ini_h ()
gdouble
ncm_diff_get_ini_h (NcmDiff *diff
);
Gets the current initial step used in calculations.
ncm_diff_set_max_order ()
void ncm_diff_set_max_order (NcmDiff *diff
,const guint maxorder
);
Sets the maximum order used when calculating the derivatives to maxorder
.
ncm_diff_set_richardson_step ()
void ncm_diff_set_richardson_step (NcmDiff *diff
,const gdouble rs
);
Sets the Richardson step used in the tables.
ncm_diff_set_round_off_pad ()
void ncm_diff_set_round_off_pad (NcmDiff *diff
,const gdouble roff_pad
);
Sets the round-off padding used in the calculations.
ncm_diff_set_ini_h ()
void ncm_diff_set_ini_h (NcmDiff *diff
,const gdouble ini_h
);
Sets the initial step used in the calculations.
ncm_diff_log_central_tables ()
void
ncm_diff_log_central_tables (NcmDiff *diff
);
Logs all central tables.
ncm_diff_log_forward_tables ()
void
ncm_diff_log_forward_tables (NcmDiff *diff
);
Logs all central tables.
ncm_diff_log_backward_tables ()
void
ncm_diff_log_backward_tables (NcmDiff *diff
);
Logs all central tables.
ncm_diff_rf_d1_N_to_M ()
GArray * ncm_diff_rf_d1_N_to_M (NcmDiff *diff
,GArray *x_a
,const guint dim
,NcmDiffFuncNtoM f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the forward method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N\to \mathbb{R}^M$,
where $N = $ length of x_a
and $M = $ dim
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d1_N_to_M ()
GArray * ncm_diff_rc_d1_N_to_M (NcmDiff *diff
,GArray *x_a
,const guint dim
,NcmDiffFuncNtoM f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N\to \mathbb{R}^M$,
where $N = $ length of x_a
and $M = $ dim
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d2_N_to_M ()
GArray * ncm_diff_rc_d2_N_to_M (NcmDiff *diff
,GArray *x_a
,const guint dim
,NcmDiffFuncNtoM f
,gpointer user_data
,GArray **Eerr
);
Calculates the second derivative of f
: $\partial_i^2 f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N\to \mathbb{R}^M$,
where $N = $ length of x_a
and $M = $ dim
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rf_d1_1_to_M ()
GArray * ncm_diff_rf_d1_1_to_M (NcmDiff *diff
,const gdouble x
,const guint dim
,NcmDiffFunc1toM f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the forward method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d1_1_to_M ()
GArray * ncm_diff_rc_d1_1_to_M (NcmDiff *diff
,const gdouble x
,const guint dim
,NcmDiffFunc1toM f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d2_1_to_M ()
GArray * ncm_diff_rc_d2_1_to_M (NcmDiff *diff
,const gdouble x
,const guint dim
,NcmDiffFunc1toM f
,gpointer user_data
,GArray **Eerr
);
Calculates the second derivative of f
: $\partial_i^2 f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
dim |
dimension of |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rf_d1_N_to_1 ()
GArray * ncm_diff_rf_d1_N_to_1 (NcmDiff *diff
,GArray *x_a
,NcmDiffFuncNto1 f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the forward method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d1_N_to_1 ()
GArray * ncm_diff_rc_d1_N_to_1 (NcmDiff *diff
,GArray *x_a
,NcmDiffFuncNto1 f
,gpointer user_data
,GArray **Eerr
);
Calculates the first derivative of f
: $\partial_i f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rc_d2_N_to_1 ()
GArray * ncm_diff_rc_d2_N_to_1 (NcmDiff *diff
,GArray *x_a
,NcmDiffFuncNto1 f
,gpointer user_data
,GArray **Eerr
);
Calculates the second derivative of f
: $\partial_i^2 f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rf_Hessian_N_to_1 ()
GArray * ncm_diff_rf_Hessian_N_to_1 (NcmDiff *diff
,GArray *x_a
,NcmDiffFuncNto1 f
,gpointer user_data
,GArray **Eerr
);
Calculates the Hessian of f
$\partial_i\partial_j f$ using the forward method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$,
where $N = $ length of x_a
.
Parameters
diff |
a NcmDiff |
|
x_a |
function argument. |
[array][element-type double][in] |
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
Eerr |
estimated errors. |
[array][element-type double][out][transfer full] |
ncm_diff_rf_d1_1_to_1 ()
gdouble ncm_diff_rf_d1_1_to_1 (NcmDiff *diff
,const gdouble x
,NcmDiffFunc1to1 f
,gpointer user_data
,gdouble *err
);
Calculates the first derivative of f
: $\partial_i f$ using the forward method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R} \to \mathbb{R}$.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
err |
estimated error. |
[out][nullable] |
ncm_diff_rc_d1_1_to_1 ()
gdouble ncm_diff_rc_d1_1_to_1 (NcmDiff *diff
,const gdouble x
,NcmDiffFunc1to1 f
,gpointer user_data
,gdouble *err
);
Calculates the first derivative of f
: $\partial_i f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R} \to \mathbb{R}$.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
err |
estimated error. |
[out][nullable] |
ncm_diff_rc_d2_1_to_1 ()
gdouble ncm_diff_rc_d2_1_to_1 (NcmDiff *diff
,const gdouble x
,NcmDiffFunc1to1 f
,gpointer user_data
,gdouble *err
);
Calculates the second derivative of f
: $\partial_i^2 f$ using the central method plus
Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R} \to \mathbb{R}$.
Parameters
diff |
a NcmDiff |
|
x |
function argument |
|
f |
function to differentiate. |
[scope call] |
user_data |
function user data. |
[nullable] |
err |
estimated error. |
[out][nullable] |
Property Details
The “ini-h”
property
“ini-h” double
Initial h.
Owner: NcmDiff
Flags: Read / Write / Construct
Allowed values: >= 2.22045e-16
Default value: 0.0110485
The “max-order”
property
“max-order” guint
Maximum order.
Owner: NcmDiff
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 30
The “richardson-step”
property
“richardson-step” double
Richardson extrapolation step.
Owner: NcmDiff
Flags: Read / Write / Construct
Allowed values: >= 1.1
Default value: 2