GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#include <grass/N_pde.h>
Go to the source code of this file.
N_gradient_2d* N_alloc_gradient_2d | ( | void | ) |
Allocate a N_gradient_2d structure.
Definition at line 27 of file n_gradient.c.
References G_calloc.
Referenced by N_create_gradient_2d().
N_gradient_3d* N_alloc_gradient_3d | ( | void | ) |
Allocate a N_gradient_3d structure.
Definition at line 151 of file n_gradient.c.
References G_calloc.
Referenced by N_create_gradient_3d().
N_gradient_field_2d* N_alloc_gradient_field_2d | ( | int | cols, |
int | rows | ||
) |
Allocate a N_gradient_field_2d.
The field arrays are of type DCELL.
rows | - number of rows of the 2d array from which the gradient should be calculated |
cols | - number of cols of the 2d array from which the gradient should be calculated |
Definition at line 920 of file n_gradient.c.
References Cell_head::cols, N_gradient_field_2d::cols, DCELL_TYPE, G_calloc, G_debug(), N_alloc_array_2d(), Cell_head::rows, N_gradient_field_2d::rows, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
Referenced by N_compute_gradient_field_2d().
N_gradient_field_3d* N_alloc_gradient_field_3d | ( | int | cols, |
int | rows, | ||
int | depths | ||
) |
Allocate a N_gradient_field_3d.
The field arrays are always of type DCELL_TYPE.
cols | - number of cols of the 3d array from which the gradient should be calculated |
rows | - number of rows of the 3d array from which the gradient should be calculated |
depths | - number of depths of the 3d array from which the gradient should be calculated |
Definition at line 1018 of file n_gradient.c.
References Cell_head::cols, N_gradient_field_3d::cols, DCELL_TYPE, Cell_head::depths, N_gradient_field_3d::depths, G_calloc, G_debug(), N_alloc_array_3d(), Cell_head::rows, N_gradient_field_3d::rows, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.
Referenced by N_compute_gradient_field_3d().
N_gradient_neighbours_2d* N_alloc_gradient_neighbours_2d | ( | void | ) |
Allocate a N_gradient_neighbours_2d structure.
This structure contains all neighbour gradients in all directions of one cell in a 2d raster layer
Definition at line 587 of file n_gradient.c.
References G_calloc, N_alloc_gradient_neighbours_x(), N_alloc_gradient_neighbours_y(), N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.
Referenced by N_create_gradient_neighbours_2d().
N_gradient_neighbours_3d* N_alloc_gradient_neighbours_3d | ( | void | ) |
Allocate a N_gradient_neighbours_3d structure.
This structure contains all neighbour gradients in all directions of one cell in a 3d raster layer
Definition at line 769 of file n_gradient.c.
References G_calloc, N_alloc_gradient_neighbours_x(), N_alloc_gradient_neighbours_y(), N_alloc_gradient_neighbours_z(), N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.
Referenced by N_create_gradient_neighbours_3d().
N_gradient_neighbours_x* N_alloc_gradient_neighbours_x | ( | void | ) |
Allocate a N_gradient_neighbours_x structure.
This structure contains all neighbour gradients in x direction of one cell
Definition at line 290 of file n_gradient.c.
References G_calloc.
Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_x().
N_gradient_neighbours_y* N_alloc_gradient_neighbours_y | ( | void | ) |
Allocate a N_gradient_neighbours_y structure.
This structure contains all neighbour gradients in y direction of one cell
Definition at line 386 of file n_gradient.c.
References G_calloc.
Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_y().
N_gradient_neighbours_z* N_alloc_gradient_neighbours_z | ( | void | ) |
Allocate a N_gradient_neighbours_z structure.
This structure contains all neighbour gradients in z direction of one cell
Definition at line 481 of file n_gradient.c.
References G_calloc.
Referenced by N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_z().
int N_copy_gradient_2d | ( | N_gradient_2d * | source, |
N_gradient_2d * | target | ||
) |
copy a N_gradient_2d structure
source | - the source N_gradient_2d struct |
target | - the target N_gradient_2d struct |
Definition at line 85 of file n_gradient.c.
References N_gradient_2d::EC, G_debug(), N_gradient_2d::NC, N_gradient_2d::SC, and N_gradient_2d::WC.
int N_copy_gradient_3d | ( | N_gradient_3d * | source, |
N_gradient_3d * | target | ||
) |
copy a N_gradient_3d structure
source | - the source N_gradient_3d struct |
target | - the target N_gradient_3d struct |
Definition at line 214 of file n_gradient.c.
References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_gradient_3d::NC, N_gradient_3d::SC, N_gradient_3d::TC, and N_gradient_3d::WC.
int N_copy_gradient_field_2d | ( | N_gradient_field_2d * | source, |
N_gradient_field_2d * | target | ||
) |
Copy N_gradient_field_2d structure from source to target.
source | - the source N_gradient_field_2d struct |
target | - the target N_gradient_field_2d struct |
Definition at line 966 of file n_gradient.c.
References G_debug(), N_copy_array_2d(), N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
int N_copy_gradient_field_3d | ( | N_gradient_field_3d * | source, |
N_gradient_field_3d * | target | ||
) |
Copy N_gradient_field_3d structure from source to target.
source | - the source N_gradient_field_3d struct |
target | - the target N_gradient_field_3d struct |
Definition at line 1069 of file n_gradient.c.
References G_debug(), N_copy_array_3d(), N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.
int N_copy_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | source, |
N_gradient_neighbours_2d * | target | ||
) |
copy a N_gradient_neighbours_2d structure
source | - the source N_gradient_neighbours_2d struct |
target | - the target N_gradient_neighbours_2d struct |
Definition at line 663 of file n_gradient.c.
References G_debug(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.
Referenced by N_get_gradient_neighbours_2d().
int N_copy_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | source, |
N_gradient_neighbours_3d * | target | ||
) |
copy a N_gradient_neighbours_3d structure
source | - the source N_gradient_neighbours_3d struct |
target | - the target N_gradient_neighbours_3d struct |
Definition at line 875 of file n_gradient.c.
References G_debug(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.
int N_copy_gradient_neighbours_x | ( | N_gradient_neighbours_x * | source, |
N_gradient_neighbours_x * | target | ||
) |
copy a N_gradient_neighbours_x structure
source | - the source N_gradient_neighbours_x struct |
target | - the target N_gradient_neighbours_x struct |
Definition at line 360 of file n_gradient.c.
References N_gradient_neighbours_x::EC, G_debug(), N_gradient_neighbours_x::NEN, N_gradient_neighbours_x::NWN, N_gradient_neighbours_x::SES, N_gradient_neighbours_x::SWS, and N_gradient_neighbours_x::WC.
Referenced by N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_create_gradient_neighbours_2d(), and N_create_gradient_neighbours_3d().
int N_copy_gradient_neighbours_y | ( | N_gradient_neighbours_y * | source, |
N_gradient_neighbours_y * | target | ||
) |
copy a N_gradient_neighbours_y structure
source | - the source N_gradient_neighbours_y struct |
target | - the target N_gradient_neighbours_y struct |
Definition at line 455 of file n_gradient.c.
References G_debug(), N_gradient_neighbours_y::NC, N_gradient_neighbours_y::NEE, N_gradient_neighbours_y::NWW, N_gradient_neighbours_y::SC, N_gradient_neighbours_y::SEE, and N_gradient_neighbours_y::SWW.
Referenced by N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_create_gradient_neighbours_2d(), and N_create_gradient_neighbours_3d().
int N_copy_gradient_neighbours_z | ( | N_gradient_neighbours_z * | source, |
N_gradient_neighbours_z * | target | ||
) |
copy a N_gradient_neighbours_z structure
source | - the source N_gradient_neighbours_z struct |
target | - the target N_gradient_neighbours_z struct |
Definition at line 557 of file n_gradient.c.
References N_gradient_neighbours_z::CZ, N_gradient_neighbours_z::EZ, G_debug(), N_gradient_neighbours_z::NEZ, N_gradient_neighbours_z::NWZ, N_gradient_neighbours_z::NZ, N_gradient_neighbours_z::SEZ, N_gradient_neighbours_z::SWZ, N_gradient_neighbours_z::SZ, and N_gradient_neighbours_z::WZ.
Referenced by N_copy_gradient_neighbours_3d(), and N_create_gradient_neighbours_3d().
N_gradient_2d* N_create_gradient_2d | ( | double | NC, |
double | SC, | ||
double | WC, | ||
double | EC | ||
) |
allocate and initialize a N_gradient_2d structure
NC | double - the gradient between northern and center cell |
SC | double - the gradient between southern and center cell |
WC | double - the gradient between western and center cell |
EC | double - the gradient between eastern and center cell |
Definition at line 60 of file n_gradient.c.
References N_gradient_2d::EC, G_debug(), N_alloc_gradient_2d(), N_gradient_2d::NC, N_gradient_2d::SC, and N_gradient_2d::WC.
Referenced by N_get_gradient_2d().
N_gradient_3d* N_create_gradient_3d | ( | double | NC, |
double | SC, | ||
double | WC, | ||
double | EC, | ||
double | TC, | ||
double | BC | ||
) |
allocate and initialize a N_gradient_3d structure
NC | double - the gradient between northern and center cell |
SC | double - the gradient between southern and center cell |
WC | double - the gradient between western and center cell |
EC | double - the gradient between eastern and center cell |
TC | double - the gradient between top and center cell |
BC | double - the gradient between bottom and center cell |
Definition at line 187 of file n_gradient.c.
References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_alloc_gradient_3d(), N_gradient_3d::NC, N_gradient_3d::SC, N_gradient_3d::TC, and N_gradient_3d::WC.
N_gradient_neighbours_2d* N_create_gradient_neighbours_2d | ( | N_gradient_neighbours_x * | x, |
N_gradient_neighbours_y * | y | ||
) |
Allocate and initialize a N_gradient_neighbours_2d structure.
The parameter N_gradient_neighbours x and y are copied into the new allocated structure and can be deleted after the initializing
Definition at line 630 of file n_gradient.c.
References G_debug(), N_alloc_gradient_neighbours_2d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_free_gradient_neighbours_2d(), NULL, N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.
Referenced by N_get_gradient_neighbours_2d().
N_gradient_neighbours_3d* N_create_gradient_neighbours_3d | ( | N_gradient_neighbours_x * | xt, |
N_gradient_neighbours_x * | xc, | ||
N_gradient_neighbours_x * | xb, | ||
N_gradient_neighbours_y * | yt, | ||
N_gradient_neighbours_y * | yc, | ||
N_gradient_neighbours_y * | yb, | ||
N_gradient_neighbours_z * | zt, | ||
N_gradient_neighbours_z * | zb | ||
) |
Allocate and initialize a N_gradient_neighbours_3d structure.
The parameter N_gradient_neighbours x(tcb) and y(tcb) and z(tb) are copied into the new allocated structure and can be deleted after the initializing
Definition at line 825 of file n_gradient.c.
References G_debug(), N_alloc_gradient_neighbours_3d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), NULL, N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.
N_gradient_neighbours_x* N_create_gradient_neighbours_x | ( | double | NWN, |
double | NEN, | ||
double | WC, | ||
double | EC, | ||
double | SWS, | ||
double | SES | ||
) |
Allocate and initialize a N_gradient_neighbours_x structure.
NWN | double - the gradient between north-west and northern cell |
NEN | double - the gradient between north-east and northern cell |
WC | double - the gradient between western and center cell |
EC | double - the gradient between eastern and center cell |
SWS | double - the gradient between south-west and southern cell |
SES | double - the gradient between south-east and southern cell |
Definition at line 329 of file n_gradient.c.
References N_gradient_neighbours_x::EC, G_debug(), N_alloc_gradient_neighbours_x(), N_gradient_neighbours_x::NEN, N_gradient_neighbours_x::NWN, N_gradient_neighbours_x::SES, N_gradient_neighbours_x::SWS, and N_gradient_neighbours_x::WC.
Referenced by N_get_gradient_neighbours_2d().
N_gradient_neighbours_y* N_create_gradient_neighbours_y | ( | double | NWW, |
double | NEE, | ||
double | NC, | ||
double | SC, | ||
double | SWW, | ||
double | SEE | ||
) |
Allocate and initialize a N_gradient_neighbours_y structure.
NWW | double - the gradient between north-west and western cell |
NEE | double - the gradient between north-east and eastern cell |
NC | double - the gradient between northern and center cell |
SC | double - the gradient between southern and center cell |
SWW | double - the gradient between south-west and western cell |
SEE | double - the gradient between south-east and eastern cell |
Definition at line 424 of file n_gradient.c.
References G_debug(), N_alloc_gradient_neighbours_y(), N_gradient_neighbours_y::NC, N_gradient_neighbours_y::NEE, N_gradient_neighbours_y::NWW, N_gradient_neighbours_y::SC, N_gradient_neighbours_y::SEE, and N_gradient_neighbours_y::SWW.
Referenced by N_get_gradient_neighbours_2d().
N_gradient_neighbours_z* N_create_gradient_neighbours_z | ( | double | NWZ, |
double | NZ, | ||
double | NEZ, | ||
double | WZ, | ||
double | CZ, | ||
double | EZ, | ||
double | SWZ, | ||
double | SZ, | ||
double | SEZ | ||
) |
Allocate and initialize a N_gradient_neighbours_z structure.
NWZ | double - the gradient between upper and lower north-western cells |
NZ | double - the gradient between upper and lower northern cells |
NEZ | double - the gradient between upper and lower north-eastern cells |
WZ | double - the gradient between upper and lower western cells |
CZ | double - the gradient between upper and lower center cells |
EZ | double - the gradient between upper and lower eastern cells |
SWZ | double - the gradient between upper and lower south-western cells |
SZ | double - the gradient between upper and lower southern cells |
SEZ | double - the gradient between upper and lower south-eastern cells |
Definition at line 522 of file n_gradient.c.
References N_gradient_neighbours_z::CZ, N_gradient_neighbours_z::EZ, G_debug(), N_alloc_gradient_neighbours_z(), N_gradient_neighbours_z::NEZ, N_gradient_neighbours_z::NWZ, N_gradient_neighbours_z::NZ, N_gradient_neighbours_z::SEZ, N_gradient_neighbours_z::SWZ, N_gradient_neighbours_z::SZ, and N_gradient_neighbours_z::WZ.
void N_free_gradient_2d | ( | N_gradient_2d * | grad | ) |
void N_free_gradient_3d | ( | N_gradient_3d * | grad | ) |
void N_free_gradient_field_2d | ( | N_gradient_field_2d * | field | ) |
Free's a N_gradient_neighbours_2d structure.
Definition at line 944 of file n_gradient.c.
References G_free(), N_free_array_2d(), NULL, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
void N_free_gradient_field_3d | ( | N_gradient_field_3d * | field | ) |
Free's a N_gradient_neighbours_3d structure.
Definition at line 1045 of file n_gradient.c.
References G_free(), N_free_array_3d(), NULL, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.
void N_free_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | grad | ) |
Free's a N_gradient_neighbours_2d structure.
Definition at line 608 of file n_gradient.c.
References G_free(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), NULL, N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.
Referenced by N_create_gradient_neighbours_2d(), and N_get_gradient_neighbours_2d().
void N_free_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | grad | ) |
Free's a N_gradient_neighbours_3d structure.
Definition at line 796 of file n_gradient.c.
References G_free(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), N_free_gradient_neighbours_z(), NULL, N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.
void N_free_gradient_neighbours_x | ( | N_gradient_neighbours_x * | grad | ) |
Free's a N_gradient_neighbours_x structure.
Definition at line 307 of file n_gradient.c.
References G_free(), and NULL.
Referenced by N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_3d(), and N_get_gradient_neighbours_2d().
void N_free_gradient_neighbours_y | ( | N_gradient_neighbours_y * | grad | ) |
Free's a N_gradient_neighbours_y structure.
Definition at line 403 of file n_gradient.c.
References G_free(), and NULL.
Referenced by N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_3d(), and N_get_gradient_neighbours_2d().
void N_free_gradient_neighbours_z | ( | N_gradient_neighbours_z * | grad | ) |
Free's a N_gradient_neighbours_z structure.
Definition at line 498 of file n_gradient.c.
References G_free(), and NULL.
Referenced by N_free_gradient_neighbours_3d().
N_gradient_2d* N_get_gradient_2d | ( | N_gradient_field_2d * | field, |
N_gradient_2d * | gradient, | ||
int | col, | ||
int | row | ||
) |
Return a N_gradient_2d structure calculated from the input gradient field at position [row][col].
This function returns the gradient of a cell at position [row][col] from the input gradient field. Returend is a new structure of type N_gradient_2d.
field | N_gradient_field_2d * - A two dimensional gradient field |
gradient | N_gradient_2d * - the gradient structure which should be filled with data, if a NULL pointer is given, a new structure will be created |
col | int |
row | int |
Definition at line 115 of file n_gradient.c.
References N_gradient_2d::EC, G_debug(), N_create_gradient_2d(), N_get_array_2d_d_value(), N_gradient_2d::NC, N_gradient_2d::SC, N_gradient_2d::WC, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
Referenced by N_compute_gradient_field_components_2d().
N_gradient_3d* N_get_gradient_3d | ( | N_gradient_field_3d * | field, |
N_gradient_3d * | gradient, | ||
int | col, | ||
int | row, | ||
int | depth | ||
) |
Return a N_gradient_3d structure calculated from the input gradient field at position [depth][row][col].
This function returns the gradient of a 3d cell at position [depth][row][col] from the input gradient field. Returned is a new structure of type N_gradient_3d.
field | N_gradient_field_3d * - A three dimensional gradient field |
gradient | N_gradient_3d * - an existing gradient structure or a NULL pointer, if a NULL pointer is providet a new structure will be returned |
col | int |
row | int |
depth | int |
Definition at line 248 of file n_gradient.c.
Referenced by N_compute_gradient_field_components_3d().
N_gradient_neighbours_2d* N_get_gradient_neighbours_2d | ( | N_gradient_field_2d * | field, |
N_gradient_neighbours_2d * | gradient, | ||
int | col, | ||
int | row | ||
) |
Return a N_gradient_neighbours_2d structure calculated from the input gradient field at position [row][col].
This function returns the gradient neighbours in x and y dierection of a cell at position [row][col] from the input gradient field. Returend is a pointer to a structure of type N_gradient_neighbours_2d.
field | N_gradient_field_2d * - A two dimensional gradient field |
gradient | N_gradient_neighbours_2d * - the gradient structure which should be filled with data, if a NULL pointer is given, a new structure will be created |
col | int |
row | int |
Definition at line 702 of file n_gradient.c.
References G_debug(), N_copy_gradient_neighbours_2d(), N_create_gradient_neighbours_2d(), N_create_gradient_neighbours_x(), N_create_gradient_neighbours_y(), N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), N_get_array_2d_d_value(), NULL, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
void N_print_gradient_field_2d_info | ( | N_gradient_field_2d * | field | ) |
Print gradient field information to stdout.
field | N_gradient_2d_field * |
Definition at line 986 of file n_gradient.c.
References N_gradient_field_2d::cols, N_gradient_field_2d::max, N_gradient_field_2d::mean, N_gradient_field_2d::min, N_print_array_2d_info(), N_gradient_field_2d::nonull, N_gradient_field_2d::rows, N_gradient_field_2d::sum, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
void N_print_gradient_field_3d_info | ( | N_gradient_field_3d * | field | ) |
Print gradient field information to stdout.
field | N_gradient_3d_field * |
Definition at line 1090 of file n_gradient.c.
References N_gradient_field_3d::cols, N_gradient_field_3d::depths, N_gradient_field_3d::max, N_gradient_field_3d::mean, N_gradient_field_3d::min, N_print_array_3d_info(), N_gradient_field_3d::nonull, N_gradient_field_3d::rows, N_gradient_field_3d::sum, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.