ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rmatrix.h
(Generate patch)

Comparing ray/src/util/rmatrix.h (file contents):
Revision 2.1 by greg, Sat May 31 05:02:37 2014 UTC vs.
Revision 2.2 by greg, Sat May 31 19:21:21 2014 UTC

# Line 18 | Line 18 | typedef struct {
18          double  mtx[1];                 /* extends struct */
19   } RMATRIX;
20  
21 < #define rmx_indx(rm,r,c,i)      (((i)*(rm)->nrows+(r))*(rm)->ncols+(c))
21 > #define rmx_lval(rm,r,c,i)      (rm)->mtx[((i)*(rm)->nrows+(r))*(rm)->ncols+(c)]
22  
23 #define rmx_lval(rm,r,c,i)      (rm)->mtx[rmx_indx(rm,r,c,i)]
24
23   #define rmx_free(rm)            free(rm)
24  
25   /* Allocate a nr x nc matrix with n components */
# Line 39 | Line 37 | extern RMATRIX *rmx_identity(int dim, int n);
37   /* Duplicate the given matrix */
38   extern RMATRIX  *rmx_copy(const RMATRIX *rm);
39  
40 < /* Swap rows and columns in the given matrix in situ */
41 < extern int      rmx_transpose(RMATRIX *rm);
40 > /* Allocate and assign transposed matrix */
41 > extern RMATRIX  *rmx_transpose(const RMATRIX *rm);
42  
43   /* Multiply (concatenate) two matrices and allocate the result */
44   extern RMATRIX  *rmx_multiply(const RMATRIX *m1, const RMATRIX *m2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines