Top | ![]() |
![]() |
![]() |
![]() |
BData * | b_val_scalar_new () |
double * | b_val_scalar_get_val () |
void | b_val_scalar_set_val () |
BData * | b_val_vector_new () |
BData * | b_val_vector_new_alloc () |
BData * | b_val_vector_new_copy () |
double * | b_val_vector_get_array () |
void | b_val_vector_replace_array () |
BData * | b_val_matrix_new () |
BData * | b_val_matrix_new_alloc () |
BData * | b_val_matrix_new_copy () |
double * | b_val_matrix_get_array () |
void | b_val_matrix_replace_array () |
GObject ╰── GInitiallyUnowned ╰── BData ├── BMatrix │ ╰── BValMatrix ├── BScalar │ ╰── BValScalar ╰── BVector ╰── BValVector
Data classes BValScalar, BValVector, and BValMatrix. These are the trivial implementations of the abstract data classes BScalar, BVector, and BMatrix.
In these objects, an array (or, in the case of a BValScalar, a single double precision value) is maintained that also serves as the data cache. Therefore, this array should not be freed.
The get_values()
methods can be used to get a const version of the array. To
get a modifiable version, use the get_array()
methods for BValVector and
BValMatrix.
double *
b_val_scalar_get_val (BValScalar *s
);
Gets a pointer to the value of a BValScalar.
void b_val_scalar_set_val (BValScalar *s
,double val
);
Sets the value of a BValScalar.
BData * b_val_vector_new (double *val
,guint n
,GDestroyNotify notify
);
Create a new BValVector from an existing array.
[skip]
val |
array of doubles. |
[array length=n] |
n |
length of array |
|
notify |
the function to be called to free the array when the BData is unreferenced, or |
[nullable] |
BData *
b_val_vector_new_alloc (guint n
);
Create a new BValVector of length n
, initialized to zeros.
BData * b_val_vector_new_copy (const double *val
,guint n
);
Create a new BValVector, copying from an existing array.
double *
b_val_vector_get_array (BValVector *s
);
Get the array of values of vec
.
void b_val_vector_replace_array (BValVector *s
,double *array
,guint n
,GDestroyNotify notify
);
Replace the array of values of s
.
s |
||
array |
array of doubles. |
[array length=n] |
n |
length of array |
|
notify |
the function to be called to free the array when the BData is unreferenced, or |
[nullable] |
BData * b_val_matrix_new (double *val
,guint rows
,guint columns
,GDestroyNotify notify
);
Create a new BValMatrix using an existing array.
[skip]
val |
array of doubles |
|
rows |
number of rows |
|
columns |
number of columns |
|
notify |
the function to be called to free the array when the BData is unreferenced, or |
[nullable] |
BData * b_val_matrix_new_alloc (guint rows
,guint columns
);
Allocate a new array with rows
rows and columns
columns and use it in a new BValMatrix.
BData * b_val_matrix_new_copy (const double *val
,guint rows
,guint columns
);
Create a new BValMatrix, copying from an existing array.
double *
b_val_matrix_get_array (BValMatrix *s
);
Get the array of values of s
.
void b_val_matrix_replace_array (BValMatrix *s
,double *array
,guint rows
,guint columns
,GDestroyNotify notify
);
Get the array of values of s
.
[skip]
s |
||
array |
array of doubles |
|
rows |
number of rows |
|
columns |
number of columns |
|
notify |
the function to be called to free the array when the BData is unreferenced, or |
[nullable] |