C Configuration Space and Tuning Library (CCS)
Loading...
Searching...
No Matches
Functions
distribution_space.h File Reference

A distribution space is set of sampling distribution over the parameters of a configuration space. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ccs_result_t ccs_create_distribution_space (ccs_configuration_space_t configuration_space, ccs_distribution_space_t *distribution_space_ret)
 Create an new distribution space.
 
ccs_result_t ccs_distribution_space_get_configuration_space (ccs_distribution_space_t distribution_space, ccs_configuration_space_t *configuration_space_ret)
 Get the associated configuration space.
 
ccs_result_t ccs_distribution_space_set_distribution (ccs_distribution_space_t distribution_space, ccs_distribution_t distribution, size_t *indices)
 Set the distribution of one or more parameters.
 
ccs_result_t ccs_distribution_space_get_parameter_distribution (ccs_distribution_space_t distribution_space, size_t index, ccs_distribution_t *distribution_ret, size_t *index_ret)
 Get a parameter's distribution in a distribution space given its index.
 

Detailed Description

A distribution space is set of sampling distribution over the parameters of a configuration space.

Function Documentation

◆ ccs_create_distribution_space()

ccs_result_t ccs_create_distribution_space ( ccs_configuration_space_t  configuration_space,
ccs_distribution_space_t distribution_space_ret 
)
extern

Create an new distribution space.

Parameters
[in]configuration_spacethe configuration space the distribution space will be used to sample
[out]distribution_space_reta pointer to the variable that will contain the newly created distribution space
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if configuration_space is not a valid CCS configuration space; or if objective_space is not a valid CCS objective space
CCS_RESULT_ERROR_INVALID_VALUE if distribution_space_ret is NULL
Remarks
This function is thread-safe

◆ ccs_distribution_space_get_configuration_space()

ccs_result_t ccs_distribution_space_get_configuration_space ( ccs_distribution_space_t  distribution_space,
ccs_configuration_space_t configuration_space_ret 
)
extern

Get the associated configuration space.

Parameters
[in]distribution_space
[out]configuration_space_reta pointer to the variable that will contain the configuration space
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if distribution_space is not a valid CCS distribution space
CCS_RESULT_ERROR_INVALID_VALUE if distribution_space_ret is NULL
Remarks
This function is thread-safe

◆ ccs_distribution_space_get_parameter_distribution()

ccs_result_t ccs_distribution_space_get_parameter_distribution ( ccs_distribution_space_t  distribution_space,
size_t  index,
ccs_distribution_t distribution_ret,
size_t *  index_ret 
)
extern

Get a parameter's distribution in a distribution space given its index.

Parameters
[in]distribution_space
[in]indexthe index of the parameter
[out]distribution_reta pointer to the variable that will contain the distribution
[out]index_reta pointer to the variable that will contain the index of the component in the distribution
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if distribution_space is not a valid CCS distribution space
CCS_RESULT_ERROR_INVALID_VALUE if distribution_ret is NULL; or if index_ret is NULL
CCS_RESULT_ERROR_OUT_OF_BOUNDS if index is greater than the count of parameters in the distribution space's configuration space
Remarks
This function is thread-safe

◆ ccs_distribution_space_set_distribution()

ccs_result_t ccs_distribution_space_set_distribution ( ccs_distribution_space_t  distribution_space,
ccs_distribution_t  distribution,
size_t *  indices 
)
extern

Set the distribution of one or more parameters.

Existing distributions are discarded, and if a parameter is left without a distribution it's default distribution is used.

Parameters
[in,out]distribution_space
[in]distributionthe distribution to associate to the parameters at the indices given by indices
[in]indicesan array of parameters indices with as many elements as the dimension of the distribution
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if distribution_space is not a valid CCS distribution space; or distribution is not a valid CCS distribution
CCS_RESULT_ERROR_INVALID_VALUE if indices is NULL; or if indices contains values greater or equal to the number of parameters in the distribution space's configuration space; or if indices contain duplicate values
CCS_RESULT_ERROR_OUT_OF_MEMORY if a memory could not be allocated to store additional parameters and associated data structures
Remarks
This function is thread-safe