Robotran C Documentation
mbs_matrix.h
Go to the documentation of this file.
1 
14 #ifndef mbs_matrix_h
15 #define mbs_matrix_h
16 #include <stdio.h>
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /*--------------------*/
29 void transpose(double M[4][4], double Mt[4][4]);
30 
39 void matrix_product(double M[4][4], double v[4], double Mv[4]);
40 
51 void matrix_product_0(double **M, double *v, double *Mv, int nr, int nc);
52 
63 void matrix_product_1(double **M, double *v, double *v_out, int nr, int nc);
64 
73 void doublematrix_product(double M1[4][4], double M2[4][4], double M[4][4]);
74 
87 void doublematrix_product_0(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M);
88 
101 void doublematrix_product_1(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M);
102 
109 void rotation_matrix(int type, double angle, double R[4][4]);
110 
118 void rotation_matrix_4x4_ptr(int type, double angle, double** R);
119 
127 int** get_imat_0(int nb_r, int nb_c);
134 int** get_imat_1(int nb_r, int nb_c);
135 
140 void free_imat_0(int** mat);
145 void free_imat_1(int** mat);
146 
154 void copy_imat_0(int** tab_src, int** tab_dest, int nb_r, int nb_c);
155 
156 
163 void print_imat_0(int** mat, int nb_r, int nb_c);
164 
165 
173 double** get_dmat_0(int nb_r, int nb_c);
180 double** get_dmat_1(int nb_r, int nb_c);
187 double** get_contdmat_1(int nb_r, int nb_c);
188 
193 void free_dmat_0(double** mat);
198 void free_dmat_1(double** mat);
206 void copy_dmat_0(double** tab_src, double** tab_dest, int nb_r, int nb_c);
207 
215 void copy_dmat_1(double** src, double** dest, int x, int y);
216 
231 double **re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny);
232 
248 double **re_copy_dmat_1(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny);
249 
257 void transpose_dmat_0(double** tab_src, double** tab_dest, int nb_r, int nb_c);
258 
266 void transpose_dmat_1(double** tab_src, double** tab_dest, int x, int y);
267 
276 void print_dmat_0(double** mat, int nb_r, int nb_c);
284 void print_format_dmat_0(double** mat, int nb_r, int nb_c, char* format);
285 
296 int read_dmat_0(double** mat, int nb_r, int nb_c, const char* name);
297 
304 double** load_dmat_0(int nb_r, int nb_c, char* name);
305 
320 int save_dmat_0(double** mat, int nb_r, int nb_c, char* name);
321 
345 int save_format_dmat_0(double** mat, int nb_r, int nb_c, char* name, char* format);
346 
358 int code_dmat_0(FILE *file_out, double **values, const char *name, int n_row, int n_col);
359 
371 int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col);
372 
384 int slct_dmat_0(double** tab_src, int nb_r, int nb_c, double** tab_out, int l_vec, int* vec);
385 
397 int slctr_dmat_0(double** tab_src, int nb_r, int nb_c, double** tab_dest, int l_vec, int* vec);
398 
405 void zeros_dmat_0(double** mat, int nb_r, int nb_c);
406 
418 int set_diag_dmat_0(double** mat, int size, double value);
419 
429 int set_identity_dmat_0(double** mat, int size);
430 
441 void mult_dmat_0(double** A, double** B, double** C, int n1, int n2, int n3);
442 
451 void sum_dmat_0(double** A, double** B, double** C, int n1, int n2);
452 
461 void diff_dmat_0(double** A, double** B, double** C, int n1, int n2);
462 
469 void opposite_dmat_0(double** A, int n1, int n2);
470 
476 void readmatrix(double** matrix, int* n);
477 
491 int get_dmatfiles_size(const char* fileName, int* n_row, int* n_col);
492 
499 void update_initzeros(int* initzeros, double** matrix, int* n);
500 
501 
508 void arrange_matrix(double** matrix, int* n, int* initzeros);
509 
516 void scale_matrix(double** matrix, int* n, int* initzeros);
517 
518 
527 void copy_array_dmat_1(double src[4][4], double** dest);
528 
539 int same_dmat_0(double **a, double **b, int x, int y);
540 
541 #ifdef __cplusplus
542 }
543 #endif
544 
545 /*--------------------*/
546 #endif
update_initzeros
void update_initzeros(int *initzeros, double **matrix, int *n)
function to update the initzeros array (obsolete?)
Definition: mbs_matrix.c:1103
get_imat_0
int ** get_imat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 0....
Definition: mbs_matrix.c:240
arrange_matrix
void arrange_matrix(double **matrix, int *n, int *initzeros)
function to arrange matrix (obsolete?)
Definition: mbs_matrix.c:1120
MBS_INFO_FAILURE
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
save_dmat_0
int save_dmat_0(double **mat, int nb_r, int nb_c, char *name)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0
Definition: mbs_matrix.c:653
useful_functions.h
matrix_product_0
void matrix_product_0(double **M, double *v, double *Mv, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 0.
Definition: mbs_matrix.c:48
scale_matrix
void scale_matrix(double **matrix, int *n, int *initzeros)
function to scale matrix (obsolete?)
Definition: mbs_matrix.c:1165
doublematrix_product_0
void doublematrix_product_0(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 0.
Definition: mbs_matrix.c:88
MSG_PRE
#define MSG_PRE
Definition: mbs_matrix.c:25
mbs_error_msg
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0....
Definition: mbs_1D_array.c:1055
rotation_matrix
void rotation_matrix(int type, double angle, double R[4][4])
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1.
Definition: mbs_matrix.c:122
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
get_imat_1
int ** get_imat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 1
Definition: mbs_matrix.c:262
copy_dmat_0
void copy_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:444
mbs_define.h
arrange_matrix
void arrange_matrix(double **matrix, int *n, int *initzeros)
function to arrange matrix (obsolete?)
Definition: mbs_matrix.c:1120
print_dmat_0
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:551
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:374
sum_dmat_0
void sum_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A + B = C
Definition: mbs_matrix.c:978
slct_dmat_0
int slct_dmat_0(double **tab_src, int nb_r, int nb_c, double **tab_out, int l_vec, int *vec)
fill the second [nb_r times l_vec] matrix by selecting the columns of the first [nb_r times nb_c] mat...
Definition: mbs_matrix.c:870
matrix_product_0
void matrix_product_0(double **M, double *v, double *Mv, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 0.
Definition: mbs_matrix.c:48
transpose
void transpose(double M[4][4], double Mt[4][4])
Compute the transpose of a matrix with first index is 1.
Definition: mbs_matrix.c:27
slctr_dmat_0
int slctr_dmat_0(double **tab_src, int nb_r, int nb_c, double **tab_dest, int l_vec, int *vec)
fill the second [l_vec times nb_c] matrix by selecting the rows of the first [nb_r times nb_c] matrix...
Definition: mbs_matrix.c:892
get_dmatfiles_size
int get_dmatfiles_size(const char *fileName, int *n_row, int *n_col)
Function to load a file and calculate the number of rows and columns.
Definition: mbs_matrix.c:1052
mbs_matrix.h
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
re_copy_dmat_0
double ** re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:470
zeros_dmat_0
void zeros_dmat_0(double **mat, int nb_r, int nb_c)
set all the element of a [nb_r times nb_c] matrix of doubles to zero, starting with index 0
Definition: mbs_matrix.c:914
code_dmat_1
int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:814
code_dmat_1
int code_dmat_1(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:814
readmatrix
void readmatrix(double **mat, int *n)
function to read a matrix (obsolete?)
Definition: mbs_matrix.c:1020
scale_matrix
void scale_matrix(double **matrix, int *n, int *initzeros)
function to scale matrix (obsolete?)
Definition: mbs_matrix.c:1165
mbs_dirname
char * mbs_dirname(const char *path, int verbose)
mbs_dirname returns the leading part of the path (UNIX and MAC).
Definition: mbs_path.c:407
get_dmat_0
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0 The functi...
Definition: mbs_matrix.c:294
print_dmat_0
void print_dmat_0(double **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:551
matrix_product
void matrix_product(double M[4][4], double v[4], double Mv[4])
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:40
load_dmat_0
double ** load_dmat_0(int nb_r, int nb_c, char *name)
load a [nb_r times nb_c] matrix of doubles from a file starting with index 0. The matrix is created (...
Definition: mbs_matrix.c:646
copy_dmat_1
void copy_dmat_1(double **src, double **dest, int x, int y)
Copy the content of a [x times y] matrix of doubles to a second matrix, starting with index 1.
Definition: mbs_matrix.c:457
doublematrix_product_1
void doublematrix_product_1(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 1.
Definition: mbs_matrix.c:105
update_initzeros
void update_initzeros(int *initzeros, double **matrix, int *n)
function to update the initzeros array (obsolete?)
Definition: mbs_matrix.c:1103
code_dmat_0
int code_dmat_0(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:748
slct_dmat_0
int slct_dmat_0(double **tab_src, int nb_r1, int nb_c1, double **tab_out, int l2, int *vec)
fill the second [nb_r times l_vec] matrix by selecting the columns of the first [nb_r times nb_c] mat...
Definition: mbs_matrix.c:870
print_format_dmat_0
void print_format_dmat_0(double **mat, int nb_r, int nb_c, char *format)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:556
free_imat_1
void free_imat_1(int **mat)
release memory for a matrix of integers, starting with index 1
Definition: mbs_matrix.c:398
re_copy_dmat_1
double ** re_copy_dmat_1(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:505
transpose_dmat_0
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:524
free_imat_0
void free_imat_0(int **mat)
release memory for a matrix of integers, starting with index 0
Definition: mbs_matrix.c:390
sum_dmat_0
void sum_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A + B = C
Definition: mbs_matrix.c:978
diff_dmat_0
void diff_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A - B = C
Definition: mbs_matrix.c:991
_MBS_ERR_LOW_NULL_PTR
#define _MBS_ERR_LOW_NULL_PTR
Low Level error number A called symbolic or user function is set to NULL;.
Definition: mbs_errors_names.h:142
get_dmatfiles_size
int get_dmatfiles_size(const char *fileName, int *n_row, int *n_col)
Function to load a file and calculate the number of rows and columns.
Definition: mbs_matrix.c:1052
matrix_product_1
void matrix_product_1(double **M, double *v, double *v_out, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:60
matrix_product_1
void matrix_product_1(double **M, double *v, double *v_out, int nr, int nc)
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:60
read_dmat_0
int read_dmat_0(double **mat, int nb_r, int nb_c, const char *name)
read a [nb_r times nb_c] matrix of doubles from a file starting with index 0 and store the values in ...
Definition: mbs_matrix.c:579
set_diag_dmat_0
int set_diag_dmat_0(double **mat, int size, double value)
Set a diagonal matrix with the given value.
Definition: mbs_matrix.c:927
set_identity_dmat_0
int set_identity_dmat_0(double **mat, int size)
Set a matrix to identity matrix. Out-of-diagonal elements are set to zero.
Definition: mbs_matrix.c:951
rotation_matrix_4x4_ptr
void rotation_matrix_4x4_ptr(int type, double angle, double **R)
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1....
Definition: mbs_matrix.c:161
copy_dmat_1
void copy_dmat_1(double **src, double **dest, int x, int y)
Copy the content of a [x times y] matrix of doubles to a second matrix, starting with index 1.
Definition: mbs_matrix.c:457
free_imat_1
void free_imat_1(int **mat)
release memory for a matrix of integers, starting with index 1
Definition: mbs_matrix.c:398
get_dmat_1
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:316
same_dmat_0
int same_dmat_0(double **a, double **b, int x, int y)
Compare if two 2D arrays of floats are the same.
Definition: mbs_matrix.c:1190
get_imat_0
int ** get_imat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 0....
Definition: mbs_matrix.c:240
re_copy_dmat_1
double ** re_copy_dmat_1(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:505
print_format_dmat_0
void print_format_dmat_0(double **mat, int nb_r, int nb_c, char *format)
print a [nb_r times nb_c] matrix of doubles in console, starting with index 0
Definition: mbs_matrix.c:556
zeros_dmat_0
void zeros_dmat_0(double **mat, int nb_r, int nb_c)
set all the element of a [nb_r times nb_c] matrix of doubles to zero, starting with index 0
Definition: mbs_matrix.c:914
readmatrix
void readmatrix(double **matrix, int *n)
function to read a matrix (obsolete?)
Definition: mbs_matrix.c:1020
copy_imat_0
void copy_imat_0(int **tab_src, int **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of integers to a second matrix, starting with index 0.
Definition: mbs_matrix.c:406
get_dmat_0
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0 The functi...
Definition: mbs_matrix.c:294
mult_dmat_0
void mult_dmat_0(double **A, double **B, double **C, int n1, int n2, int n3)
function to multiply two matrices: A * B = C [n1 n2] [n2 n3] = [n1 n3]
Definition: mbs_matrix.c:961
set_diag_dmat_0
int set_diag_dmat_0(double **mat, int size, double value)
Set a diagonal matrix with the given value.
Definition: mbs_matrix.c:927
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:374
opposite_dmat_0
void opposite_dmat_0(double **A, int n1, int n2)
function to take the opposite of a given matrix (minus in front of each entry)
Definition: mbs_matrix.c:1004
code_dmat_0
int code_dmat_0(FILE *file_out, double **values, const char *name, int n_row, int n_col)
Write C-code to allocate and fill an array of arrays of doubles.
Definition: mbs_matrix.c:748
transpose_dmat_0
void transpose_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Transpose a [nb_r times nb_c] matrix of doubles and store the results in a [y times nb_r] matrix,...
Definition: mbs_matrix.c:524
print_imat_0
void print_imat_0(int **mat, int x, int y)
print a [nb_r times nb_c] matrix of integers in console, starting with index 0
Definition: mbs_matrix.c:419
diff_dmat_0
void diff_dmat_0(double **A, double **B, double **C, int n1, int n2)
function to sum two matrices: A - B = C
Definition: mbs_matrix.c:991
free_imat_0
void free_imat_0(int **mat)
release memory for a matrix of integers, starting with index 0
Definition: mbs_matrix.c:390
get_imat_1
int ** get_imat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of integers, starting at index 1
Definition: mbs_matrix.c:262
doublematrix_product
void doublematrix_product(double M1[4][4], double M2[4][4], double M[4][4])
Compute the product of two matrices. The first index is 1.
Definition: mbs_matrix.c:73
mbs_message.h
save_format_dmat_0
int save_format_dmat_0(double **mat, int nb_r, int nb_c, char *name, char *format)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:665
rotation_matrix
void rotation_matrix(int type, double angle, double R[4][4])
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1.
Definition: mbs_matrix.c:122
slctr_dmat_0
int slctr_dmat_0(double **tab_src, int nb_r1, int nb_c1, double **tab_out, int l2, int *vec)
fill the second [l_vec times nb_c] matrix by selecting the rows of the first [nb_r times nb_c] matrix...
Definition: mbs_matrix.c:892
print_imat_0
void print_imat_0(int **mat, int nb_r, int nb_c)
print a [nb_r times nb_c] matrix of integers in console, starting with index 0
Definition: mbs_matrix.c:419
save_dmat_0
int save_dmat_0(double **mat, int nb_r, int nb_c, char *name)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0
Definition: mbs_matrix.c:653
copy_array_dmat_1
void copy_array_dmat_1(double src[4][4], double **dest)
Copy the content of an array of doubles to a pointer of matrix, starting with index 1.
Definition: mbs_matrix.c:1180
rotation_matrix_4x4_ptr
void rotation_matrix_4x4_ptr(int type, double angle, double **R)
Compute the rotation matrix for a specified angle around a specific axis. The first index is 1....
Definition: mbs_matrix.c:161
transpose_dmat_1
void transpose_dmat_1(double **tab_src, double **tab_dest, int x, int y)
Transpose a [x times y] matrix of doubles and store the results in a [y times x] matrix,...
Definition: mbs_matrix.c:538
re_copy_dmat_0
double ** re_copy_dmat_0(double **src, int s_nx, int s_ny, double **dest, int d_nx, int d_ny)
Copy a 2D array of double into another, reallocate the destination if required.
Definition: mbs_matrix.c:470
mbs_is_dir_or_file
int mbs_is_dir_or_file(const char *path)
Check if the path is valid and lead to a file or directory.
Definition: mbs_path.c:547
doublematrix_product_1
void doublematrix_product_1(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 1.
Definition: mbs_matrix.c:105
matrix_product
void matrix_product(double M[4][4], double v[4], double Mv[4])
Compute the product of a matrix by a vector. The first index is 1.
Definition: mbs_matrix.c:40
free_dmat_1
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:382
mult_dmat_0
void mult_dmat_0(double **A, double **B, double **C, int n1, int n2, int n3)
function to multiply two matrices: A * B = C [n1 n2] [n2 n3] = [n1 n3]
Definition: mbs_matrix.c:961
doublematrix_product_0
void doublematrix_product_0(double **M1, int nb_row_M1, int nb_col_M1, double **M2, int nb_col_M2, double **M)
Compute the product of two matrices of given shape. The first index is 0.
Definition: mbs_matrix.c:88
mbs_path.h
doublematrix_product
void doublematrix_product(double M1[4][4], double M2[4][4], double M[4][4])
Compute the product of two matrices. The first index is 1.
Definition: mbs_matrix.c:73
opposite_dmat_0
void opposite_dmat_0(double **A, int n1, int n2)
function to take the opposite of a given matrix (minus in front of each entry)
Definition: mbs_matrix.c:1004
set_identity_dmat_0
int set_identity_dmat_0(double **mat, int size)
Set a matrix to identity matrix. Out-of-diagonal elements are set to zero.
Definition: mbs_matrix.c:951
free_dmat_1
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:382
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:1090
MBS_INFO_SUCCESS
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
save_format_dmat_0
int save_format_dmat_0(double **mat, int nb_r, int nb_c, char *name, char *format)
save a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:665
get_dmat_1
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:316
same_dmat_0
int same_dmat_0(double **a, double **b, int x, int y)
Compare if two 2D arrays of floats are the same.
Definition: mbs_matrix.c:1190
transpose
void transpose(double M[4][4], double Mt[4][4])
Compute the transpose of a matrix with first index is 1.
Definition: mbs_matrix.c:27
get_contdmat_1
double ** get_contdmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1....
Definition: mbs_matrix.c:346
copy_dmat_0
void copy_dmat_0(double **tab_src, double **tab_dest, int nb_r, int nb_c)
Copy the content of a [nb_r times nb_c] matrix of doubles to a second matrix, starting with index 0.
Definition: mbs_matrix.c:444
mbs_makedirs
int mbs_makedirs(char *path)
Create (recursively) the specified directory.
Definition: mbs_path.c:586
load_dmat_0
double ** load_dmat_0(int nb_r, int nb_c, char *name)
load a [nb_r times nb_c] matrix of doubles from a file starting with index 0. The matrix is created (...
Definition: mbs_matrix.c:646
rotation_matrix_0
void rotation_matrix_0(int type, double angle, double R[3][3])
Definition: mbs_matrix.c:200
read_dmat_0
int read_dmat_0(double **mat, int nb_r, int nb_c, const char *name)
read a [nb_r times nb_c] matrix of doubles from a file starting with index 0 and store the values in ...
Definition: mbs_matrix.c:579
MSG_ERR
#define MSG_ERR
Definition: mbs_matrix.c:24
get_contdmat_1
double ** get_contdmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1....
Definition: mbs_matrix.c:346
transpose_dmat_1
void transpose_dmat_1(double **tab_src, double **tab_dest, int x, int y)
Transpose a [x times y] matrix of doubles and store the results in a [y times x] matrix,...
Definition: mbs_matrix.c:538
mbs_errors_names.h
copy_array_dmat_1
void copy_array_dmat_1(double src[4][4], double **dest)
Copy the content of an array of doubles to a pointer of matrix, starting with index 1.
Definition: mbs_matrix.c:1180
copy_imat_0
void copy_imat_0(int **tab1, int **tab2, int x, int y)
Copy the content of a [nb_r times nb_c] matrix of integers to a second matrix, starting with index 0.
Definition: mbs_matrix.c:406