~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to sand/src/matrix.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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.
 
5
*/
 
6
 
 
7
#ifndef MATRIX_H
 
8
#define MATRIX_H
 
9
 
 
10
struct cell
 
11
{
 
12
        short score;
 
13
        short traceback;
 
14
};
 
15
 
 
16
struct matrix {
 
17
        int width;
 
18
        int height;
 
19
        struct cell *data;
 
20
};
 
21
 
 
22
struct matrix * matrix_create( int width, int height );
 
23
void            matrix_delete( struct matrix *m );
 
24
void            matrix_print( struct matrix *m, const char *a, const char *b );
 
25
 
 
26
#define matrix(m,i,j) ( (m)->data[(m->width*(j) + i)] )
 
27
 
 
28
#endif
 
29