| STARS-H
    Software for Testing Accuracy, Reliability and  Scalability of Hierarchical computations | 
Template for spatial statistics problems. More...
| Modules | |
| Kernels | |
| Set of kernels for spatial statistics problems. | |
| Data Structures | |
| struct | starsh_ssdata | 
| Structure for Spatial Statistics problems.  More... | |
| Typedefs | |
| typedef struct starsh_ssdata | STARSH_ssdata | 
| Structure for Spatial Statistics problems. | |
| Functions | |
| int | starsh_ssdata_new (STARSH_ssdata **data, STARSH_int count, int ndim) | 
| Allocate memory for STARSH_ssdata object.  More... | |
| int | starsh_ssdata_init (STARSH_ssdata **data, STARSH_int count, int ndim, double *point, double beta, double nu, double noise, double sigma) | 
| Initialize STARSH_ssdata object by given data.  More... | |
| int | starsh_ssdata_init_parsimonious (STARSH_ssdata **data, STARSH_int count, int ndim, double *point, double sigma1, double sigma2, double beta, double nu1, double nu2, double corr, double noise) | 
| Initialize STARSH_ssdata object by given data.  More... | |
| int | starsh_ssdata_generate (STARSH_ssdata **data, STARSH_int count, int ndim, double beta, double nu, double noise, enum STARSH_PARTICLES_PLACEMENT place, double sigma) | 
| Generate STARSH_ssdata object by given distribution.  More... | |
| int | starsh_ssdata_generate_parsimonious (STARSH_ssdata **data, STARSH_int count, int ndim, double beta, double nu, double noise, enum STARSH_PARTICLES_PLACEMENT place, double sigma, double sigma2, double nu2, double corr) | 
| Generate STARSH_ssdata object by given distribution.  More... | |
| int | starsh_ssdata_generate_va (STARSH_ssdata **data, STARSH_int count, va_list args) | 
| Generate STARSH_ssdata object with incomplete set of parameters.  More... | |
| int | starsh_ssdata_generate_el (STARSH_ssdata **data, STARSH_int count,...) | 
| Generate STARSH_ssdata object with incomplete set of parameters.  More... | |
| void | starsh_ssdata_free (STARSH_ssdata *data) | 
| Free memory of STARSH_ssdata object.  More... | |
| int | starsh_ssdata_get_kernel (STARSH_kernel **kernel, STARSH_ssdata *data, enum STARSH_SPATIAL_KERNEL type) | 
| Get kernel for spatial statistics problem.  More... | |
| int | starsh_esdata_get_kernel (STARSH_kernel **kernel, STARSH_esdata *data, enum STARSH_ELECTROSTATICS_KERNEL type) | 
| Get kernel for electrostatics problem.  More... | |
| void | starsh_mddata_free (STARSH_mddata *data) | 
| Free memory of STARSH_mddata object.  More... | |
Template for spatial statistics problems.
STARSH_ssdata holds all the necessary data.
| enum STARSH_CAUCHY_PARAM | 
List of parameters for starsh_application().
In the table below each constant corresponds to a given argument and type for starsh_cauchy_new(). These constants are used to generate problem with incomplete set of parameters via starsh_application() or starsh_cauchy_new_va().
| Enumerator | |
|---|---|
| STARSH_CAUCHY_POINT | Values of  | 
| STARSH_CAUCHY_DIAG | Diagonal values of Cauchy matrix. | 
List of built-in kernels for starsh_ssdata_get_kernel().
For more info on exact formulas inside kernels, take a look at functions starsh_ssdata_block_exp_kernel_nd(), starsh_ssdata_block_sqrexp_kernel_nd(), starsh_ssdata_block_matern_kernel_nd(), starsh_ssdata_block_matern2_kernel_nd(), starsh_ssdata_block_exp_kernel_nd_simd(), starsh_ssdata_block_sqrexp_kernel_nd_simd(), starsh_ssdata_block_matern_kernel_nd_simd(), starsh_ssdata_block_matern2_kernel_nd_simd().
| Enumerator | |
|---|---|
| STARSH_SPATIAL_EXP | Exponential kernel. 
 | 
| STARSH_SPATIAL_SQREXP | Square exponential kernel. | 
| STARSH_SPATIAL_MATERN | Matérn kernel. | 
| STARSH_SPATIAL_MATERN2 | Modified Matérn kernel. | 
| STARSH_SPATIAL_EXP_SIMD | Exponential kernel with SIMD. | 
| STARSH_SPATIAL_SQREXP_SIMD | Exponential kernel with SIMD. | 
| STARSH_SPATIAL_MATERN_SIMD | Matérn kernel with SIMD. | 
| STARSH_SPATIAL_MATERN2_SIMD | Modified Matérn kernel with SIMD. | 
| STARSH_SPATIAL_EXP_GCD | Exponential kernel. 
 | 
| STARSH_SPATIAL_SQREXP_GCD | Square exponential kernel. 
 | 
| STARSH_SPATIAL_MATERN_GCD | Matérn kernel with SIMD. 
 | 
| STARSH_SPATIAL_MATERN2_GCD | Modified Matérn kernel with SIMD. 
 | 
| STARSH_SPATIAL_PARSIMONIOUS_GCD | Bivariate Modified parsimonious Matérn kernel with GCD. 
 | 
| STARSH_SPATIAL_PARSIMONIOUS2_GCD | Bivariate Modified parsimonious2 Matérn kernel with GCD. 
 | 
| STARSH_SPATIAL_PARSIMONIOUS_SIMD | Bivariate Modified parsimonious Matérn kernel with SIMD. 
 | 
| STARSH_SPATIAL_PARSIMONIOUS2_SIMD | Bivariate Modified parsimonious2 Matérnkernel with SIMD. 
 | 
| enum STARSH_SPATIAL_PARAM | 
List of parameters for starsh_application().
In the table below each constant corresponds to a given argument and type for starsh_ssdata_generate(). These constants are used to generate problem with incomplete set of parameters via starsh_application(), starsh_ssdata_generate_va() or starsh_ssdata_generate_el().
| Enumerator | |
|---|---|
| STARSH_SPATIAL_NDIM | Dimensionality of space ( | 
| STARSH_SPATIAL_BETA | Correlation length ( | 
| STARSH_SPATIAL_NU | Smoothing parameter for Matérn kernel ( | 
| STARSH_SPATIAL_NOISE | Noise or what to add to diagonal elements ( | 
| STARSH_SPATIAL_PLACE | Distribution of particles ( | 
| STARSH_SPATIAL_SIGMA | Variance parameter ( | 
| STARSH_SPATIAL_SIGMA2 | Variance for the second variable (in the parsimonious bivariate case). | 
| STARSH_SPATIAL_NU2 | Order of Matérn kernel for the second variable (in the parsimonious bivariate case). | 
| STARSH_SPATIAL_CORR | spatial range parameter (define the correlation between the two variables in the parsimonious bivariate case). | 
| int starsh_esdata_get_kernel | ( | STARSH_kernel ** | kernel, | 
| STARSH_esdata * | data, | ||
| enum STARSH_ELECTROSTATICS_KERNEL | type | ||
| ) | 
Get kernel for electrostatics problem.
Kernel can be selected with this call or manually. To select kernel manually look into Kernels.
| [out] | kernel | Address of pointer to STARSH_kernel function. | 
| [in] | data | Pointer to STARSH_esdata object. | 
| [in] | type | Type of kernel. For more info look at STARSH_ELECTROSTATICS_KERNEL. | 
| void starsh_mddata_free | ( | STARSH_mddata * | data | ) | 
Free memory of STARSH_mddata object.
| void starsh_ssdata_free | ( | STARSH_ssdata * | data | ) | 
Free memory of STARSH_ssdata object.
| int starsh_ssdata_generate | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| double | beta, | ||
| double | nu, | ||
| double | noise, | ||
| enum STARSH_PARTICLES_PLACEMENT | place, | ||
| double | sigma | ||
| ) | 
Generate STARSH_ssdata object by given distribution.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | beta | Correlation length. | 
| [in] | nu | Smoothing parameter for Matérn kernel. | 
| [in] | noise | Value to add to diagonal elements. | 
| [in] | place | Placement strategy for spatial points. | 
| [in] | sigma | Square of variance. | 
| int starsh_ssdata_generate_el | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| ... | |||
| ) | 
Generate STARSH_ssdata object with incomplete set of parameters.
Parse possibly incomplete set of parameters for starsh_ssdata_generate(). If argument is not in the ..., then its default value is used:
| Argument | Default value | Type – | 
|---|---|---|
| ndim | 2 | int | 
| beta | 0.1 | double | 
| nu | 0.5 | double | 
| noise | 0.0 | double | 
| place | STARSH_PARTICLES_UNIFORM | STARSH_PARTICLES_PLACEMENT | 
| sigma | 1.0 | double | 
List of arguments in ... should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_SPATIAL_PARAM.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ... | Variable amount of arguments. | 
| int starsh_ssdata_generate_parsimonious | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| double | beta, | ||
| double | nu, | ||
| double | noise, | ||
| enum STARSH_PARTICLES_PLACEMENT | place, | ||
| double | sigma, | ||
| double | sigma2, | ||
| double | nu2, | ||
| double | corr | ||
| ) | 
Generate STARSH_ssdata object by given distribution.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | beta | Correlation length. | 
| [in] | nu | Smoothing parameter for Matérn kernel. | 
| [in] | noise | Value to add to diagonal elements. | 
| [in] | place | Placement strategy for spatial points. | 
| [in] | sigma | Square of variance. | 
| [in] | sigma2 | Square of variance2. | 
| [in] | nu2 | Smoothing parameter for Matérn kernel. | 
| [in] | corr | Corr parameter for Matérn kernel. | 
| int starsh_ssdata_generate_va | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| va_list | args | ||
| ) | 
Generate STARSH_ssdata object with incomplete set of parameters.
Parse possibly incomplete set of parameters for starsh_ssdata_generate(). If argument is not in the args, then its default value is used:
| Argument | Default value | Type – | 
|---|---|---|
| ndim | 2 | int | 
| beta | 0.1 | double | 
| nu | 0.5 | double | 
| noise | 0.0 | double | 
| place | STARSH_PARTICLES_UNIFORM | STARSH_PARTICLES_PLACEMENT | 
| sigma | 1.0 | double | 
| nu2 | 0.5 | double | 
| `sigma2 | 1.0 | double | 
| corr | 0.5 | double | 
List of arguments args should look as pairs (Arg.constant, Value) with 0 as a last argument. For correspondance of arguments and arg.constants take a look at STARSH_SPATIAL_PARAM.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | args | Arguments, packed into va_args. | 
| int starsh_ssdata_get_kernel | ( | STARSH_kernel ** | kernel, | 
| STARSH_ssdata * | data, | ||
| enum STARSH_SPATIAL_KERNEL | type | ||
| ) | 
Get kernel for spatial statistics problem.
Kernel can be selected with this call or manually. To select kernel manually look into Kernels.
| [out] | kernel | Address of pointer to STARSH_kernel function. | 
| [in] | data | Pointer to STARSH_ssdata object. | 
| [in] | type | Type of kernel. For more info look at STARSH_SPATIAL_KERNEL. | 
| int starsh_ssdata_init | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| double * | point, | ||
| double | beta, | ||
| double | nu, | ||
| double | noise, | ||
| double | sigma | ||
| ) | 
Initialize STARSH_ssdata object by given data.
Array point should be stored in a special way: x_1 x_2 ... x_count y_1 y_2 ... y_count z_1 z_2 .... This function does not allocate memory for coordinates and uses provided pointer point. Do not free memory of point until you finish using returned STARSH_ssdata object. Do not forget to sort data->particles by starsh_particles_zsort_inplace() to take advantage of low-rank submatrices.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | point | Pointer to array of coordinates of particles. | 
| [in] | beta | Correlation length. | 
| [in] | nu | Smoothing parameter for Matérn kernel. | 
| [in] | noise | Value to add to diagonal elements. | 
| [in] | sigma | Square of variance. | 
| int starsh_ssdata_init_parsimonious | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim, | ||
| double * | point, | ||
| double | sigma1, | ||
| double | sigma2, | ||
| double | beta, | ||
| double | nu1, | ||
| double | nu2, | ||
| double | corr, | ||
| double | noise | ||
| ) | 
Initialize STARSH_ssdata object by given data.
Array point should be stored in a special way: x_1 x_2 ... x_count y_1 y_2 ... y_count z_1 z_2 .... This function does not allocate memory for coordinates and uses provided pointer point. Do not free memory of point until you finish using returned STARSH_ssdata object. Do not forget to sort data->particles by starsh_particles_zsort_inplace() to take advantage of low-rank submatrices.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. | 
| [in] | point | Pointer to array of coordinates of particles. | 
| [in] | beta | Correlation length. | 
| [in] | nu | Smoothing parameter for Matérn kernel. | 
| [in] | noise | Value to add to diagonal elements. | 
| [in] | sigma | Square of variance. | 
| int starsh_ssdata_new | ( | STARSH_ssdata ** | data, | 
| STARSH_int | count, | ||
| int | ndim | ||
| ) | 
Allocate memory for STARSH_ssdata object.
This functions only allocates memory for particles without setting coordinates to any value. Do not forget to sort data->particles by starsh_particles_zsort_inplace() to take advantage of low-rank submatrices.
| [out] | data | Address of pointer to STARSH_ssdata object. | 
| [in] | count | Number of particles. | 
| [in] | ndim | Dimensionality of space. |