YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
interp_method_check.c File Reference
Include dependency graph for interp_method_check.c:

Go to the source code of this file.

Data Structures

struct  interp_method_check
 
union  callback_union
 Union for storing different callback function pointers. More...
 
struct  yac_interp_method_config_check
 Concrete implementation of yac_interp_method_config for the check method. More...
 

Enumerations

enum  callback_type { CONSTRUCTOR , DO_SEARCH }
 Type of callback function for the check interpolation method. More...
 

Functions

static size_t do_search_check (struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights, int *interpolation_complete)
 
static void delete_check (struct interp_method *method)
 
struct interp_methodyac_interp_method_check_new (func_constructor constructor_callback, void *constructor_user_data, func_do_search do_search_callback, void *do_search_user_data)
 
static void interp_method_check_add_callback (callback_union callback, enum callback_type type, void *user_data, char const *key)
 Register a callback function and user data for the check interpolation method.
 
static void interp_method_get_callback (char const *key, callback_union *callback, enum callback_type type, void **user_data)
 Retrieve a registered callback and its user data by key and type.
 
void yac_interp_method_check_add_constructor_callback (func_constructor constructor_callback, void *user_data, char const *key)
 
void yac_interp_method_check_get_constructor_callback (char const *key, func_constructor *constructor_callback, void **user_data)
 
void yac_interp_method_check_add_do_search_callback (func_do_search do_search_callback, void *user_data, char const *key)
 
void yac_interp_method_check_get_do_search_callback (char const *key, func_do_search *do_search_callback, void **user_data)
 
void yac_interp_method_check_buf_free ()
 
static void config_check_delete (struct yac_interp_method_config *config)
 
static struct yac_interp_method_configconfig_check_copy (const struct yac_interp_method_config *config)
 
static int config_check_compare (void const *a_, void const *b_)
 
static enum yac_interpolation_list config_check_get_type ()
 
static struct interp_methodconfig_check_generate (struct yac_interp_method_config const *config)
 
static struct yac_paramconfig_check_get_param (struct yac_interp_method_config const *config)
 
struct yac_interp_method_configyac_interp_method_config_default_check_new (void)
 Creates a check interpolation method configuration with default parameters.
 

Variables

static struct interp_method_vtable interp_method_check_vtable
 
struct { 
 
   struct { 
 
      callback_union   callback 
 
      void *   user_data 
 
   }   value 
 
   enum callback_type   type 
 
   char *   key 
 
} * callback_lookup_table = NULL 
 Callback pointer lookup table.
 
static size_t callback_lookup_table_array_size = 0
 
static size_t callback_lookup_table_size = 0
 
static struct yac_interp_method_config_vtable yac_interp_method_config_vtable_check
 

Enumeration Type Documentation

◆ callback_type

Type of callback function for the check interpolation method.

Used to distinguish between constructor and do_search callbacks in the lookup table.

Enumerator
CONSTRUCTOR 

Constructor callback type

DO_SEARCH 

Do-search callback type

Definition at line 110 of file interp_method_check.c.

Function Documentation

◆ config_check_compare()

static int config_check_compare ( void const * a_,
void const * b_ )
static

Definition at line 302 of file interp_method_check.c.

◆ config_check_copy()

static struct yac_interp_method_config * config_check_copy ( const struct yac_interp_method_config * config)
static

Definition at line 291 of file interp_method_check.c.

◆ config_check_delete()

static void config_check_delete ( struct yac_interp_method_config * config)
static

Definition at line 282 of file interp_method_check.c.

◆ config_check_generate()

static struct interp_method * config_check_generate ( struct yac_interp_method_config const * config)
static

Definition at line 318 of file interp_method_check.c.

Here is the call graph for this function:

◆ config_check_get_param()

static struct yac_param * config_check_get_param ( struct yac_interp_method_config const * config)
static

Definition at line 337 of file interp_method_check.c.

Here is the call graph for this function:

◆ config_check_get_type()

static enum yac_interpolation_list config_check_get_type ( )
static

Definition at line 314 of file interp_method_check.c.

◆ delete_check()

static void delete_check ( struct interp_method * method)
static

Definition at line 96 of file interp_method_check.c.

◆ do_search_check()

static size_t do_search_check ( struct interp_method * method,
struct yac_interp_grid * interp_grid,
size_t * tgt_points,
size_t count,
struct yac_interp_weights * weights,
int * interpolation_complete )
static

Definition at line 42 of file interp_method_check.c.

Here is the call graph for this function:

◆ interp_method_check_add_callback()

static void interp_method_check_add_callback ( callback_union callback,
enum callback_type type,
void * user_data,
char const * key )
static

Register a callback function and user data for the check interpolation method.

Adds a new entry to the callback lookup table, associating the callback and user data with a unique key and callback type. Ensures that no duplicate (key, type) pair exists.

Parameters
callbackCallback function pointer (union)
typeCallback type (CONSTRUCTOR or DO_SEARCH)
user_dataPointer to user data to associate with the callback
keyUnique string identifier for the callback

Definition at line 161 of file interp_method_check.c.

Here is the caller graph for this function:

◆ interp_method_get_callback()

static void interp_method_get_callback ( char const * key,
callback_union * callback,
enum callback_type type,
void ** user_data )
static

Retrieve a registered callback and its user data by key and type.

Searches the callback lookup table for an entry matching the given key and callback type. If found, sets the callback and user_data pointers to the registered values.

Parameters
keyUnique string identifier for the callback
callbackOutput: union to receive the callback function pointer
typeType of callback (CONSTRUCTOR or DO_SEARCH)
user_dataOutput: pointer to receive the associated user data

Definition at line 198 of file interp_method_check.c.

Here is the caller graph for this function:

◆ yac_interp_method_check_add_constructor_callback()

void yac_interp_method_check_add_constructor_callback ( func_constructor constructor_callback,
void * user_data,
char const * key )

sets a constructor_callback that can afterwards be retrieved by yac_interp_method_check_get_constructor_callback

Parameters
[in]constructor_callbackpointer to a constructor_callback routine
[in]user_datapointer to user data
[in]keystring that can afterwards be used to retrieve the pointer

Definition at line 222 of file interp_method_check.c.

Here is the call graph for this function:

◆ yac_interp_method_check_add_do_search_callback()

void yac_interp_method_check_add_do_search_callback ( func_do_search do_search_callback,
void * user_data,
char const * key )

sets a do_search_callback that can afterwards be retrieved by yac_interp_method_check_get_do_search_callback

Parameters
[in]do_search_callbackpointer to a do_search_callback routine
[in]user_datapointer to user data
[in]keystring that can afterwards be used to retrieve the pointer

Definition at line 239 of file interp_method_check.c.

Here is the call graph for this function:

◆ yac_interp_method_check_buf_free()

void yac_interp_method_check_buf_free ( )

free internal array with provided pointers to callback routines

Definition at line 255 of file interp_method_check.c.

Here is the caller graph for this function:

◆ yac_interp_method_check_get_constructor_callback()

void yac_interp_method_check_get_constructor_callback ( char const * key,
func_constructor * constructor_callback,
void ** user_data )

retrieves a constructor_callback pointer that was set by yac_interp_method_check_add_constructor_callback

Parameters
[in]keystring to identify a pointer that was previously set
[out]constructor_callbackpointer to constructor_callback routine
[out]user_datapointer to user data

Definition at line 230 of file interp_method_check.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_method_check_get_do_search_callback()

void yac_interp_method_check_get_do_search_callback ( char const * key,
func_do_search * do_search_callback,
void ** user_data )

retrieves a do_search_callback pointer that was set by yac_interp_method_check_add_do_search_callback

Parameters
[in]keystring to identify a pointer that was previously set
[out]do_search_callbackpointer to do_search_callback routine
[out]user_datapointer to user data

Definition at line 247 of file interp_method_check.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_method_check_new()

struct interp_method * yac_interp_method_check_new ( func_constructor constructor_callback,
void * constructor_user_data,
func_do_search do_search_callback,
void * do_search_user_data )

constructor for an interpolation method of type interp_method_check

Parameters
[in]constructor_callbackpointer to routine that is called in yac_interp_method_check_new
[in]constructor_user_datapointer passed to constructor_callback when it is called
[in]do_search_callbackpointer to routine that is to be called when the do_search routine of this interp_method is called
[in]do_search_user_datapointer passed to do_search_callback when it is called
Returns
returns a pointer to an interpolation method

Definition at line 78 of file interp_method_check.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ yac_interp_method_config_default_check_new()

struct yac_interp_method_config * yac_interp_method_config_default_check_new ( void )

Creates a check interpolation method configuration with default parameters.

Returns
Pointer to the created yac_interp_method_config structure

Definition at line 393 of file interp_method_check.c.

Variable Documentation

◆ callback

callback_union callback

Registered callback function

Definition at line 139 of file interp_method_check.c.

◆ [struct]

struct { ... } * callback_lookup_table

Callback pointer lookup table.

Associates a callback function and user data with a unique key and callback type.

◆ callback_lookup_table_array_size

size_t callback_lookup_table_array_size = 0
static

Definition at line 145 of file interp_method_check.c.

◆ callback_lookup_table_size

size_t callback_lookup_table_size = 0
static

Definition at line 146 of file interp_method_check.c.

◆ interp_method_check_vtable

struct interp_method_vtable interp_method_check_vtable
static
Initial value:
= {
.do_search = do_search_check,
.delete = delete_check}
static void delete_check(struct interp_method *method)
static size_t do_search_check(struct interp_method *method, struct yac_interp_grid *interp_grid, size_t *tgt_points, size_t count, struct yac_interp_weights *weights, int *interpolation_complete)

Definition at line 31 of file interp_method_check.c.

◆ key

char* key

Unique string identifier for the callback

Definition at line 143 of file interp_method_check.c.

◆ type

enum callback_type type

Callback type (CONSTRUCTOR or DO_SEARCH)

Definition at line 142 of file interp_method_check.c.

◆ user_data

void* user_data

Associated user data

Definition at line 140 of file interp_method_check.c.

◆ [struct]

struct { ... } value

◆ yac_interp_method_config_vtable_check

struct yac_interp_method_config_vtable yac_interp_method_config_vtable_check
static
Initial value:
= {
.get_type = config_check_get_type,
.generate = config_check_generate,
}
static struct interp_method * config_check_generate(struct yac_interp_method_config const *config)
static int config_check_compare(void const *a_, void const *b_)
static struct yac_interp_method_config * config_check_copy(const struct yac_interp_method_config *config)
static void config_check_delete(struct yac_interp_method_config *config)
static enum yac_interpolation_list config_check_get_type()
static struct yac_param * config_check_get_param(struct yac_interp_method_config const *config)

Definition at line 384 of file interp_method_check.c.