dmlfw (Daniyal Machine Learning Framework)
|
Core singly linked list type for double precision data. More...
#include <dmlfw_vector.h>
Go to the source code of this file.
typedef struct __dmlfw_forward_list_double | dmlfw_forward_list_double |
Opaque structure representing a forward list of double values. | |
void | dmlfw_forward_list_double_clear (dmlfw_forward_list_double *forward_list) |
Removes all elements from the list. | |
dmlfw_forward_list_double * | dmlfw_forward_list_double_create_new (void) |
Creates a new empty forward list of doubles. | |
void | dmlfw_forward_list_double_destroy (dmlfw_forward_list_double *forward_list) |
Destroys the forward list and frees all memory. | |
dmlfw_row_vec_double * | dmlfw_forward_list_double_get_row_vector (dmlfw_forward_list_double *forward_list) |
Converts the forward list into a row vector of doubles. | |
dimension_t | dmlfw_forward_list_double_get_size (dmlfw_forward_list_double *forward_list) |
Returns the number of elements in the list. | |
void | dmlfw_forward_list_double_insert (dmlfw_forward_list_double *forward_list, double value) |
Inserts a double value at the front of the list. | |
Core singly linked list type for double precision data.
This module provides a singly linked list (forward list) implementation for double precision floating point data. It supports creating, destroying, inserting elements, converting the list to a row vector, querying size, and clearing elements.
All functions report errors through a centralized error API. Use dmlfw_error()
to check for errors after each call. dmlfw_get_error_string()
and dmlfw_get_debug_string()
provide diagnostic messages.
The list owns its nodes and their double values. The vector returned by conversion functions must be explicitly freed by callers.
typedef struct __dmlfw_forward_list_double dmlfw_forward_list_double |
Opaque structure representing a forward list of double values.
The internal details are hidden to enforce encapsulation. Use the provided API functions to create, manipulate, and destroy instances.
void dmlfw_forward_list_double_clear | ( | dmlfw_forward_list_double * | forward_list | ) |
Removes all elements from the list.
forward_list | [in,out] List to clear (non-NULL). |
Usage example:
dmlfw_forward_list_double * dmlfw_forward_list_double_create_new | ( | void | ) |
Creates a new empty forward list of doubles.
Usage example:
void dmlfw_forward_list_double_destroy | ( | dmlfw_forward_list_double * | forward_list | ) |
Destroys the forward list and frees all memory.
forward_list | [in] Pointer to the list to destroy, or NULL (no-op). |
Usage example:
dmlfw_row_vec_double * dmlfw_forward_list_double_get_row_vector | ( | dmlfw_forward_list_double * | forward_list | ) |
Converts the forward list into a row vector of doubles.
forward_list | [in] List to convert (non-NULL). |
Usage example:
dimension_t dmlfw_forward_list_double_get_size | ( | dmlfw_forward_list_double * | forward_list | ) |
Returns the number of elements in the list.
forward_list | [in] List to query. |
Usage example:
void dmlfw_forward_list_double_insert | ( | dmlfw_forward_list_double * | forward_list, |
double | value | ||
) |
Inserts a double value at the front of the list.
forward_list | [in,out] List to insert into (non-NULL). |
value | [in] Value to insert. |
Usage example: