Helper functions that help inspect and debug ndpolator structures.
More...
Helper functions that help inspect and debug ndpolator structures.
These functions are used to validate and inspect ndpolator structures.
◆ ndp_table_print()
Prints ndp_table information.
- Parameters
-
Prints basic information about the ndp_table instance, including vertex (function value) dimension, number of axes, axis lengths, number of basic vertices, and number of undefined vertices.
◆ ndp_hypercube_print()
| void ndp_hypercube_print |
( |
ndp_hypercube * | hc, |
|
|
const char * | prefix ) |
Prints ndp_hypercube information for debugging.
- Parameters
-
| hc | ndp_hypercube instance to print |
| prefix | String to prefix each printed line with (can be NULL) |
Prints basic information about the ndp_hypercube instance, including dimension, vertex dimension (function value length), whether the hypercube is fully defined, and all vertex function values.
◆ ndp_idx2pos()
| int ndp_idx2pos |
( |
ndp_axes * | axes, |
|
|
int | vdim, |
|
|
int * | index, |
|
|
int * | pos ) |
|
extern |
Converts array of indices to integer position in flattened array.
- Parameters
-
| axes | ndp_axes structure with all axis definitions |
| vdim | Vertex dimension (function value length) |
| index | Array of per-axis indices |
| [out] | pos | Integer position in the flattened array |
- Returns
- ndp_status code
For efficiency, all ndpolator arrays are flattened (1-dimensional), where axes are stacked in the usual C order (last axis runs first, i.e. last dimension is stride-1). Referring to grid elements can be done either by position in the 1-dimensional array, or per-axis indices. This function converts index representation to position.
◆ ndp_pos2idx()
| int ndp_pos2idx |
( |
ndp_axes * | axes, |
|
|
int | vdim, |
|
|
int | pos, |
|
|
int * | idx ) |
|
extern |
Converts integer position to array of per-axis indices.
- Parameters
-
| axes | ndp_axes structure with all axis definitions |
| vdim | Function value length (number of values per grid point) |
| pos | Integer position in flattened array |
| [out] | idx | Array of per-axis indices (must be pre-allocated) |
- Returns
- ndp_status code
For efficiency, all ndpolator arrays are flattened (1-dimensional), where axes are stacked in the usual C order (last axis runs first, i.e. last dimension is stride-1). Referring to grid elements can be done either by position in the 1-dimensional array, or per-axis indices. This function converts position representation to index.