Changeset 153 for trunk/archive/pslib/include/psMatrix.h
- Timestamp:
- Mar 9, 2004, 12:28:16 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psMatrix.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psMatrix.h
r149 r153 2 2 #define PS_MATRIX_H 3 3 4 /* A matrix */4 /** A matrix */ 5 5 typedef struct { 6 int xSize, ySize; // Dimensions in x and y7 float *restrict *restrict value; // Values in matrix6 int xSize, ySize; //!< Dimensions in x and y 7 float *restrict *restrict value; //!< Values in matrix 8 8 } psMatrix; 9 9 10 /* Constructor */10 /** Constructor */ 11 11 psMatrix * 12 psMatrixNew(int Xdimen, // x dimension of new matrix13 int Ydimen // y dimension of new matrix12 psMatrixNew(int Xdimen, //!< x dimension of new matrix 13 int Ydimen //!< y dimension of new matrix 14 14 ); 15 15 16 /* Destructor */16 /** Destructor */ 17 17 void 18 psMatrixDel(psMatrix *restrict myMatrix // Matrix to destroy18 psMatrixDel(psMatrix *restrict myMatrix //!< Matrix to destroy 19 19 ); 20 20 … … 23 23 /* Linear Algebra */ 24 24 25 /* Invert matrix */ 26 /* Not using restrict, to allow inversion to be done in-place */ 25 /** Invert matrix. Not using restrict, to allow inversion to be done in-place */ 27 26 psMatrix * 28 psInvertMatrix(psMatrix *out, // Matrix to return, or NULL29 const psMatrix *myMatrix, // Matrix to be inverted30 float *restrict determinant // Determinant to return, or NULL27 psInvertMatrix(psMatrix *out, //!< Matrix to return, or NULL 28 const psMatrix *myMatrix, //!< Matrix to be inverted 29 float *restrict determinant //!< Determinant to return, or NULL 31 30 ); 32 31 33 /* Matrix determinant */32 /** Matrix determinant */ 34 33 float 35 psDeterminant(const psMatrix *restrict myMatrix // Matrix to get determinant for34 psDeterminant(const psMatrix *restrict myMatrix //!< Matrix to get determinant for 36 35 ); 37 36 38 /* Matrix Multiplication */ 39 /* Not using restrict, to allow matrix1 == matrix2, and to do multiplication in-place */ 37 /** Matrix Multiplication. Not using restrict, to allow matrix1 == matrix2, and to do multiplication 38 * in-place 39 */ 40 40 psMatrix 41 psMatrixMultiply(psMatrix *out, // Matrix to return, or NULL42 const psMatrix *matrix1, // Matrix 143 const psMatrix *matrix2 // Matrix 241 psMatrixMultiply(psMatrix *out, //!< Matrix to return, or NULL 42 const psMatrix *matrix1, //!< Matrix 1 43 const psMatrix *matrix2 //!< Matrix 2 44 44 ); 45 45
Note:
See TracChangeset
for help on using the changeset viewer.
