mcalc

simple interactive program to perform matrix operations. (WIP)
Index Commits Files Refs README LICENSE
matrix.h (1062B)
   1 #ifndef _MATRIX_STRUCT_H
   2 #define _MATRIX_STRUCT_H
   3 
   4 #include <stdio.h>
   5 #include <stdlib.h>
   6 #include <stdbool.h>
   7 #include <time.h>
   8 #include <ctype.h>
   9 
  10 #include "status.h"
  11 
  12 #define MAX_IN_LEN 6
  13 #define DIM_BUFFER_MAX_SIZE 6
  14 
  15 typedef struct {
  16     size_t rows, columns;
  17     double **array;
  18     size_t id;
  19 } matrix_t;
  20 
  21 status_t m_print(matrix_t *matrix);
  22 status_t m_initrand(matrix_t *matrix);
  23 status_t m_load(matrix_t *matrix);
  24 status_t m_load_dim(matrix_t *matrix);
  25 status_t m_transpose(matrix_t *matrix, matrix_t *matrix_transpose);
  26 status_t m_add(matrix_t *matrixA, matrix_t *matrixB, matrix_t *result);
  27 status_t m_substract(matrix_t *matrixA, matrix_t *matrixB, matrix_t *result);
  28 status_t m_multiply(matrix_t *matrixA, matrix_t *matrixB, matrix_t *result);
  29 status_t m_divide(matrix_t *matrixA, matrix_t *matrixB, matrix_t *result);
  30 status_t m_create(size_t rows, size_t columns, matrix_t *matrix);
  31 status_t m_destroy(matrix_t *matrix);
  32 
  33 
  34 status_t empty_string(char *string, size_t len);
  35 
  36 bool m_isSimetric(matrix_t *matrix);
  37 
  38 #endif