2
Copyright (C) 2009- The University of Notre Dame
3
This software is distributed under the GNU General Public License.
4
See the file COPYING for details.
13
struct matrix * matrix_create( int width, int height )
15
struct matrix *m = malloc(sizeof(*m));
19
m->data = malloc(sizeof(struct cell) * (m->width+1) * (height+1) );
24
void matrix_delete( struct matrix *m )
30
void matrix_print( struct matrix *m, const char *a, const char *b )
36
if(a) for(i=0;i<m->width;i++) printf(" %c",a[i]);
40
for(j=0;j<=m->height;j++) {
49
for(i=0;i<=m->width;i++) {
50
char t = matrix(m,i,j).traceback;
52
printf("%3d%c ",matrix(m,i,j).score,t);