Localized Orbital Scaling Correction (LOSC) C library
matrix.h
Go to the documentation of this file.
1 
10 #ifndef _LOSC_INCLUDE_C_LOSC_MATRIX_H_
11 #define _LOSC_INCLUDE_C_LOSC_MATRIX_H_
12 #include <stddef.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
22 typedef struct losc_matrix losc_matirx;
23 
30 losc_matrix *losc_matrix_create(size_t row, size_t col);
31 
42 losc_matrix *losc_matrix_create_from_data(size_t row, size_t col, double *data);
43 
49 #define losc_matrix_free(ptr) _losc_matrix_free(&(ptr))
50 void _losc_matrix_free(losc_matrix **pptr_m);
51 
56 double *losc_matrix_data(losc_matrix *m);
57 
62 const double *losc_matrix_data_const(const losc_matrix *m);
63 
67 size_t losc_matrix_rows(const losc_matrix *m);
68 
72 size_t losc_matrix_cols(const losc_matrix *m);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
const double * losc_matrix_data_const(const losc_matrix *m)
Return the const pointer that points to the head of matrix data.
struct losc_matrix losc_matirx
losc_matrix
Definition: matrix.h:22
size_t losc_matrix_rows(const losc_matrix *m)
Return the number of rows.
double * losc_matrix_data(losc_matrix *m)
Return the pointer that points to the head of matrix data.
losc_matrix * losc_matrix_create_from_data(size_t row, size_t col, double *data)
Create a LOSC matrix object with data owned externally.
losc_matrix * losc_matrix_create(size_t row, size_t col)
Create a LOSC matrix object with data allocated.
size_t losc_matrix_cols(const losc_matrix *m)
Return the number of columns.