~ubuntu-branches/debian/experimental/ncbi-tools6/experimental

« back to all changes in this revision

Viewing changes to algo/blast/composition_adjustment/nlm_linear_algebra.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-12-17 19:45:48 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081217194548-s86rrujnezfxr1pv
Tags: 6.1.20081116a-2
* debian/control: per Lintian's advice, depend on ${misc:Depends} across
  the board, in case Debhelper ever populates it.
* debian/{control,rules}: split newly added large BLAST databases into a
  new ncbi-rrna-data package to keep ncbi-data to a reasonable size.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 */
30
30
#ifndef SKIP_DOXYGEN_PROCESSING
31
31
static char const rcsid[] =
32
 
    "$Id: nlm_linear_algebra.c,v 1.7 2005/12/19 15:37:33 gertz Exp $";
 
32
    "$Id: nlm_linear_algebra.c,v 1.8 2008/08/21 19:55:43 kazimird Exp $";
33
33
#endif /* SKIP_DOXYGEN_PROCESSING */
34
34
 
35
35
#include <math.h>
102
102
 
103
103
 
104
104
/* Documented in nlm_linear_algebra.h. */
105
 
Int4 ** Nlm_Int4MatrixNew(int nrows, int ncols)
 
105
int ** Nlm_Int4MatrixNew(int nrows, int ncols)
106
106
{
107
107
    int i;             /* iteration index */
108
 
    Int4 ** mat;     /* the new matrix */
 
108
    int ** mat;     /* the new matrix */
109
109
 
110
 
    mat = (Int4 **) calloc(nrows, sizeof(Int4 *));
 
110
    mat = (int **) calloc(nrows, sizeof(int *));
111
111
    if (mat != NULL) {
112
 
        mat[0] = (Int4 *) malloc((size_t) nrows *
113
 
                                   (size_t) ncols * sizeof(Int4));
 
112
        mat[0] = (int *) malloc((size_t) nrows *
 
113
                                   (size_t) ncols * sizeof(int));
114
114
        if (mat[0] != NULL) {
115
115
            for (i = 1;  i < nrows;  i++) {
116
116
                mat[i] = &mat[0][i * ncols];
126
126
 
127
127
/* Documented in nlm_linear_algebra.h. */
128
128
void
129
 
Nlm_Int4MatrixFree(Int4 *** mat)
 
129
Nlm_Int4MatrixFree(int *** mat)
130
130
{
131
131
    if(*mat != NULL) {
132
132
        free((*mat)[0]);