generated from bearycool11/AI_memory_Loops
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvector_matrix.h
46 lines (38 loc) · 1.34 KB
/
vector_matrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef VECTOR_MATRIX_H
#define VECTOR_MATRIX_H
#include <stddef.h> // For size_t
// Vector Matrix Structure
typedef struct {
int rows; // Number of rows
int cols; // Number of columns
int** data; // Pointer to the matrix data
} vector_matrix_t;
/**
* Initializes a vector matrix with the specified dimensions.
* @param rows Number of rows in the matrix.
* @param cols Number of columns in the matrix.
* @return Pointer to the initialized vector matrix.
*/
vector_matrix_t* init_vector_matrix(int rows, int cols);
/**
* Frees the memory allocated for a vector matrix.
* @param matrix Pointer to the vector matrix to be freed.
*/
void free_vector_matrix(vector_matrix_t* matrix);
/**
* Populates a vector matrix with values from an array.
* @param matrix Pointer to the vector matrix.
* @param values Array of integers to populate the matrix.
*/
void populate_vector_matrix(vector_matrix_t* matrix, int* values);
/**
* Updates the knowledge graph with information from the vector matrix.
* @param matrix Pointer to the vector matrix.
*/
void update_knowledge_graph(vector_matrix_t* matrix);
/**
* Processes the vector matrix and performs operations (e.g., matrix multiplication).
* @param matrix Pointer to the vector matrix.
*/
void pmll_vector_matrix_process(vector_matrix_t* matrix);
#endif // VECTOR_MATRIX_H