CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gmatrix.h
Go to the documentation of this file.
1 #ifndef __GMATRIX_H__
2 #define __GMATRIX_H__
3 
4 typedef struct
5 {
6  int dim;
7  int* size;
8  int* cumsize;
9  int datasize;
11  void** data;
12 }GMatrix;
13 
14 typedef GMatrix* pGMatrix;
15 
16 extern pGMatrix gmatrix_new(int dim, int* size, int datasize );
17 extern void gmatrix_free(pGMatrix pgm);
18 extern int gmatrix_index(pGMatrix pgm, ... );
19 extern void* gmatrix_get(pGMatrix pgm, ... );
20 extern void gmatrix_set(pGMatrix pgm, void* psrc, ... );
21 extern pGMatrix gmatrix_double_new(int dim, int* size);
22 extern double gmatrix_double_get(pGMatrix pgm, ... );
23 extern void gmatrix_double_set(pGMatrix pgm, double d, ... );
24 extern void gmatrix_double_set_with_index(pGMatrix pgm, double d, int idx );
25 extern void gmatrix_dim_index(pGMatrix pgm, int idx, int* didx );
26 extern double gmatrix_double_get_with_index(pGMatrix pgm, int idx );
27 
28 #endif
pGMatrix gmatrix_double_new(int dim, int *size)
Definition: gmatrix.c:97
Definition: gmatrix.h:4
void gmatrix_double_set(pGMatrix pgm, double d,...)
Definition: gmatrix.c:111
GMatrix * pGMatrix
Definition: gmatrix.h:14
pGMatrix gmatrix_new(int dim, int *size, int datasize)
Definition: gmatrix.c:7
int gmatrix_index(pGMatrix pgm,...)
Definition: gmatrix.c:61
double gmatrix_double_get_with_index(pGMatrix pgm, int idx)
Definition: gmatrix.c:125
void gmatrix_double_set_with_index(pGMatrix pgm, double d, int idx)
Definition: gmatrix.c:120
void gmatrix_free(pGMatrix pgm)
Definition: gmatrix.c:24
int * cumsize
Definition: gmatrix.h:8
void gmatrix_set(pGMatrix pgm, void *psrc,...)
Definition: gmatrix.c:88
int * size
Definition: gmatrix.h:7
double gmatrix_double_get(pGMatrix pgm,...)
Definition: gmatrix.c:102
int datasize
Definition: gmatrix.h:9
void ** data
Definition: gmatrix.h:11
int num_elements
Definition: gmatrix.h:10
void gmatrix_dim_index(pGMatrix pgm, int idx, int *didx)
Definition: gmatrix.c:51
void * gmatrix_get(pGMatrix pgm,...)
Definition: gmatrix.c:79
int dim
Definition: gmatrix.h:6