1#ifndef DMLFW_MAT_DOUBLE_H
2#define DMLFW_MAT_DOUBLE_H
65struct __dmlfw_mat_double;
177 const char *csv_file_name,
284 index_t source_from_column_index,
286 index_t source_to_column_index);
383 uint8_t how_many_times_to_shuffle,
596 uint8_t testing_data_percentage);
783 double min,
double max,
870 uint64_t how_many_rows,
double dmlfw_mat_double_get_minimum(dmlfw_mat_double *matrix, index_t start_row_index, index_t start_column_index, index_t end_row_index, index_t end_column_index)
Finds the minimum value in a specified submatrix region.
void dmlfw_mat_double_get_dimensions(dmlfw_mat_double *matrix, dimension_t *rows, dimension_t *columns)
Retrieves the matrix dimensions.
void dmlfw_mat_double_get_training_testing_data(const char *csv_file_name, dmlfw_mat_double **training_data_matrix, dmlfw_mat_double **testing_data_matrix, uint8_t testing_data_percentage)
Splits data from a CSV file into training and testing matrices.
struct __dmlfw_mat_double dmlfw_mat_double
Opaque structure representing a double precision matrix.
Definition dmlfw_mat_double.h:73
dmlfw_mat_double * dmlfw_mat_double_get_block_from_csv(const char *csv_file_name, dmlfw_mat_double *matrix, uint64_t from_row, uint64_t how_many_rows, long *pos)
Loads a block of rows from a CSV file into a matrix.
void dmlfw_mat_double_reshape(dmlfw_mat_double **matrix_to_reshape, dimension_t new_rows_count, dimension_t new_columns_count)
Reshapes a matrix to new row and column counts.
void dmlfw_mat_double_copy(dmlfw_mat_double *target, dmlfw_mat_double *source, index_t target_row_index, index_t target_column_index, index_t source_from_row_index, index_t source_from_column_index, index_t source_to_row_index, index_t source_to_column_index)
Copies a submatrix from source to target at specified offsets.
void dmlfw_mat_double_fill(dmlfw_mat_double *matrix, index_t from_row_index, index_t from_column_index, index_t to_row_index, index_t to_column_index, double value)
Fills a subregion of the matrix with the specified value.
void dmlfw_mat_double_to_csv(dmlfw_mat_double *matrix, const char *csv_file_name, dmlfw_row_vec_string *header)
Saves a matrix and its header to a CSV file.
void dmlfw_mat_double_set(dmlfw_mat_double *matrix, index_t row, index_t column, double value)
Sets value at a specific matrix position.
dmlfw_mat_double * dmlfw_mat_double_create_new_random_filled(dimension_t rows, dimension_t columns, double min, double max, dmlfw_mat_double *new_matrix)
Creates a matrix filled with random values within [min, max].
void dmlfw_mat_double_left_shift(dmlfw_mat_double *matrix, dimension_t how_many_places_to_shift)
Left shifts matrix elements by specified number of places.
dmlfw_mat_double * dmlfw_mat_double_create_new(dimension_t rows, dimension_t columns)
Creates a new matrix with specified rows and columns.
dmlfw_mat_double * dmlfw_mat_double_inverse(dmlfw_mat_double *matrix_to_inverse, dmlfw_mat_double *new_matrix)
Computes the inverse of a square matrix using Gaussian elimination.
double dmlfw_mat_double_get_mean(dmlfw_mat_double *matrix, index_t start_row_index, index_t start_column_index, index_t end_row_index, index_t end_column_index)
Computes the mean of elements in a specified submatrix region.
double dmlfw_mat_double_get(dmlfw_mat_double *matrix, index_t row, index_t column)
Returns value at a specific matrix position.
dmlfw_mat_double * dmlfw_mat_double_create_identity_matrix(dimension_t rows)
Creates an identity matrix of specified size.
void dmlfw_mat_double_right_shift(dmlfw_mat_double *matrix, dimension_t how_many_places_to_shift)
Right shifts matrix elements by specified number of places.
dmlfw_mat_double * dmlfw_mat_double_clone(dmlfw_mat_double *matrix_to_clone, dmlfw_mat_double *new_matrix)
Clones a matrix into a new or existing matrix container.
dmlfw_mat_double * dmlfw_mat_double_shuffle(dmlfw_mat_double *matrix, uint8_t how_many_times_to_shuffle, dmlfw_mat_double *shuffled_matrix)
Returns a shuffled version of the matrix, shuffling rows specified times.
void dmlfw_mat_double_destroy(dmlfw_mat_double *matrix)
Destroys a matrix and frees all associated memory.
double dmlfw_mat_double_get_maximum(dmlfw_mat_double *matrix, index_t start_row_index, index_t start_column_index, index_t end_row_index, index_t end_column_index)
Finds the maximum value in a specified submatrix region.
void dmlfw_mat_double_truncate(dmlfw_mat_double **matrix, index_t from_row_index, index_t from_column_index, index_t to_row_index, index_t to_column_index)
Truncates the specified matrix to a subregion.
dmlfw_column_vec_double * dmlfw_mat_double_create_column_vec(dmlfw_mat_double *matrix, index_t column_index, dmlfw_column_vec_double *vector)
Creates or fills a column vector from the specified column of the matrix.
dmlfw_mat_double * dmlfw_mat_double_transpose(dmlfw_mat_double *matrix, dmlfw_mat_double *transposed_matrix)
Transposes a matrix.
double dmlfw_mat_double_get_standard_deviation(dmlfw_mat_double *matrix, index_t start_row_index, index_t start_column_index, index_t end_row_index, index_t end_column_index)
Calculates the standard deviation of elements in a specified submatrix region.
void dmlfw_mat_double_insert_columns(dmlfw_mat_double **matrix, index_t at_index, dimension_t number_of_columns)
Inserts columns into a matrix at a specified index.
dmlfw_mat_double * dmlfw_mat_double_from_csv(const char *csv_file_name, dmlfw_mat_double *matrix, dmlfw_row_vec_string **header)
Loads a matrix and header from a CSV file.
Fundamental scalar typedefs used across the framework.
uint32_t index_t
Represents an index within a data structure (uint32_t).
Definition dmlfw_types.h:32
uint32_t dimension_t
Represents the size or dimension of a data structure (uint32_t).
Definition dmlfw_types.h:26
struct __dmlfw_column_vec_double dmlfw_column_vec_double
Opaque structure representing a column vector of doubles.
Definition dmlfw_vec_double.h:83
struct __dmlfw_row_vec_string dmlfw_row_vec_string
Opaque structure representing a row vector of strings.
Definition dmlfw_vec_string.h:82