36 #ifndef CLUSTALO_SYMMATRIX_H 37 #define CLUSTALO_SYMMATRIX_H symmetric matrix structure
Definition: symmatrix.h:48
void SymMatrixSetValue(symmatrix_t *symmat, const int i, const int j, const double value)
Sets symmat data of given index to given value.
Definition: symmatrix.c:176
int SymMatrixRead(char *pcFileIn, symmatrix_t **prSymMat_p, mseq_t *prMSeq)
Read a distance matrix in phylip format.
Definition: symmatrix.c:399
void FreeSymMatrix(symmatrix_t **symmat)
Frees memory allocated by data members of symmat and symmat itself.
Definition: symmatrix.c:277
void SymMatrixPrint(symmatrix_t *symmat, char **labels, const char *path, bool bPercID)
Print out a symmat in phylip style. Distances are printed on one line per sequence/object. Since we also support matrices with rows<cols, the first line can also be nrows by ncolumns instead of just nrows.
Definition: symmatrix.c:316
int NewSymMatrix(symmatrix_t **symmat, const int nrows, const int ncols)
Allocates symmat and its members and initialises them. Data will be calloced, i.e. initialised with zeros.
Definition: symmatrix.c:68
int ncols
Definition: symmatrix.h:50
double SymMatrixGetValue(symmatrix_t *symmat, const int i, const int j)
Returns element of symmat corresponding to given indices.
Definition: symmatrix.c:209
int nrows
Definition: symmatrix.h:49
double ** data
Definition: symmatrix.h:59
structure for storing multiple sequences
Definition: seq.h:47
void SymMatrixGetValueP(double **value, symmatrix_t *symmat, const int i, const int j)
Returns a pointer to an element of symmat corresponding to given indices.
Definition: symmatrix.c:248