~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to vector/v.generalize/matrix.h

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef MATRIX_H
21
21
#define MATRIX_H
22
22
 
23
 
#include <grass/Vect.h>
 
23
#include <grass/vector.h>
24
24
 
25
25
typedef struct
26
26
{
29
29
} MATRIX;
30
30
 
31
31
/* return 1 on success, 0 on error (out of memory) */
32
 
extern int matrix_init(int rows, int cols, MATRIX * res);
 
32
extern int matrix_init(int rows, int cols, MATRIX *res);
33
33
 
34
34
/* free the memory occupied by the values of m */
35
 
extern void matrix_free(MATRIX m);
 
35
extern void matrix_free(MATRIX *m);
36
36
 
37
37
/* multiply two matrices, Return 1 on success, 0 on failure.
38
38
 * return value 0 means - bad dimensions  */
39
 
extern int matrix_mult(MATRIX a, MATRIX b, MATRIX * res);
 
39
extern int matrix_mult(MATRIX *a, MATRIX *b, MATRIX *res);
40
40
 
41
41
/* adds a multiple of the identity matrix to the given matrix
42
42
 * M = M + s * Id. Returns 1 on success, 0 otherwise */
43
 
extern int matrix_add_identity(double s, MATRIX * m);
 
43
extern int matrix_add_identity(double s, MATRIX *m);
44
44
 
45
45
/* calculate the inverse of given (square) matrix. Returns 0 if
46
46
 * the matrix is not invertible or if an error occurs.
47
47
 * percents indicates whether we want to show the progress of
48
48
 * computation
49
49
 * Otherwise it returns 1 */
50
 
extern int matrix_inverse(MATRIX a, MATRIX * res, int percents);
 
50
extern int matrix_inverse(MATRIX *a, MATRIX *res, int percents);
51
51
 
52
52
/* multiplies matrix by a scalar */
53
 
extern void matrix_mult_scalar(double s, MATRIX * m);
 
53
extern void matrix_mult_scalar(double s, MATRIX *m);
54
54
 
55
55
/* res = a + b. Does not cheack the dimensions */
56
 
extern void matrix_add(MATRIX a, MATRIX b, MATRIX * res);
 
56
extern void matrix_add(MATRIX *a, MATRIX *b, MATRIX *res);
57
57
 
58
58
/* debug function */
59
 
extern void matrix_print(MATRIX a);
 
59
extern void matrix_print(MATRIX *a);
60
60
#endif