Main Page | Modules | Class List | File List | Class Members | File Members

4x4matrix.c File Reference

#include <math.h>
#include <string.h>
#include <gandalf/linalg/4x4matrix.h>
#include <gandalf/common/misc_error.h>
#include <gandalf/linalg/mat_symmetric.h>
#include <gandalf/linalg/mat_diagonal.h>
#include <gandalf/linalg/mat_scaledI.h>
#include <gandalf/linalg/mat_triangular.h>
#include <gandalf/common/endian_io.h>

Defines

#define GAN_MATTYPE   Gan_Matrix44
#define GAN_MATRIX_TYPE   Gan_Matrix
#define GAN_SQUMATRIX_TYPE   Gan_SquMatrix
#define GAN_VECTOR_TYPE   Gan_Vector
#define GAN_MAT_ELEMENT_TYPE   GAN_DOUBLE
#define GAN_REALTYPE   double
#define GAN_FWRITE_LENDIAN   gan_fwrite_lendian_f64
#define GAN_FREAD_LENDIAN   gan_fread_lendian_f64
#define GAN_VECTYPE1   Gan_Vector4
#define GAN_VECTYPE2   Gan_Vector4
#define GAN_MATTYPEL   Gan_Matrix44
#define GAN_MATTYPER   Gan_Matrix44
#define GAN_SQUMATTYPEL   Gan_SquMatrix44
#define GAN_SQUMATTYPER   Gan_SquMatrix44
#define GAN_MAT_FPRINT   gan_mat44_fprint
#define GAN_MAT_PRINT   gan_mat44_print
#define GAN_MAT_FSCANF   gan_mat44_fscanf
#define GAN_MAT_FWRITE   gan_mat44_fwrite
#define GAN_MAT_FREAD   gan_mat44_fread
#define GAN_MAT_ZERO_Q   gan_mat44_zero_q
#define GAN_MAT_ZERO_S   gan_mat44_zero_s
#define GAN_MAT_COPY_Q   gan_mat44_copy_q
#define GAN_MAT_COPY_S   gan_mat44_copy_s
#define GAN_MAT_SCALE_Q   gan_mat44_scale_q
#define GAN_MAT_SCALE_I   gan_mat44_scale_i
#define GAN_MAT_SCALE_S   gan_mat44_scale_s
#define GAN_MAT_DIVIDE_Q   gan_mat44_divide_q
#define GAN_MAT_DIVIDE_I   gan_mat44_divide_i
#define GAN_MAT_DIVIDE_S   gan_mat44_divide_s
#define GAN_MAT_NEGATE_Q   gan_mat44_negate_q
#define GAN_MAT_NEGATE_I   gan_mat44_negate_i
#define GAN_MAT_NEGATE_S   gan_mat44_negate_s
#define GAN_MAT_UNIT_Q   gan_mat44_unit_q
#define GAN_MAT_UNIT_I   gan_mat44_unit_i
#define GAN_MAT_UNIT_S   gan_mat44_unit_s
#define GAN_MAT_ADD_Q   gan_mat44_add_q
#define GAN_MAT_ADD_I1   gan_mat44_add_i1
#define GAN_MAT_ADD_I2   gan_mat44_add_i2
#define GAN_MAT_INCREMENT   gan_mat44_increment
#define GAN_MAT_ADD_S   gan_mat44_add_s
#define GAN_MAT_SUB_Q   gan_mat44_sub_q
#define GAN_MAT_SUB_I1   gan_mat44_sub_i1
#define GAN_MAT_SUB_I2   gan_mat44_sub_i2
#define GAN_MAT_DECREMENT   gan_mat44_decrement
#define GAN_MAT_SUB_S   gan_mat44_sub_s
#define GAN_VEC_OUTER_Q   gan_vec44_outer_q
#define GAN_VEC_OUTER_S   gan_vec44_outer_s
#define GAN_MAT_MULTV_Q   gan_mat44_multv4_q
#define GAN_MAT_MULTV_S   gan_mat44_multv4_s
#define GAN_MATT_MULTV_Q   gan_mat44T_multv4_q
#define GAN_MATT_MULTV_S   gan_mat44T_multv4_s
#define GAN_MAT_LMULTMT_Q   gan_mat44_lmultm44T_q
#define GAN_MAT_LMULTMT_S   gan_mat44_lmultm44T_s
#define GAN_MAT_RMULTM_Q   gan_mat44_rmultm44_q
#define GAN_MAT_RMULTM_S   gan_mat44_rmultm44_s
#define GAN_MAT_RMULTMT_Q   gan_mat44_rmultm44T_q
#define GAN_MAT_RMULTMT_S   gan_mat44_rmultm44T_s
#define GAN_MAT_LMULTMT_SYM_Q   gan_mat44_lmultm44T_sym_q
#define GAN_MAT_LMULTMT_SYM_S   gan_mat44_lmultm44T_sym_s
#define GAN_MAT_RMULTMT_SYM_Q   gan_mat44_rmultm44T_sym_q
#define GAN_MAT_RMULTMT_SYM_S   gan_mat44_rmultm44T_sym_s
#define GAN_MAT_SLMULTT_Q   gan_mat44_slmultT_q
#define GAN_MAT_SLMULTT_S   gan_mat44_slmultT_s
#define GAN_MAT_SRMULTT_Q   gan_mat44_srmultT_q
#define GAN_MAT_SRMULTT_S   gan_mat44_srmultT_s
#define GAN_MAT_LMULTS_Q   gan_mat44_lmults44_q
#define GAN_MAT_LMULTS_S   gan_mat44_lmults44_s
#define GAN_MAT_RMULTS_Q   gan_mat44_rmults44_q
#define GAN_MAT_RMULTS_S   gan_mat44_rmults44_s
#define GAN_SYMMATL_LRMULT_Q   gan_symmat44_lrmultm44T_q
#define GAN_SYMMATL_LRMULT_S   gan_symmat44_lrmultm44T_s
#define GAN_SYMMATR_LRMULT_Q   gan_symmat44_lrmultm44_q
#define GAN_SYMMATR_LRMULT_S   gan_symmat44_lrmultm44_s
#define GAN_MAT_LMULTL_Q   gan_mat44_lmultl44_q
#define GAN_MAT_LMULTL_S   gan_mat44_lmultl44_s
#define GAN_MAT_LMULTL_I   gan_mat44_lmultl44_i
#define GAN_MAT_LMULTLI_Q   gan_mat44_lmultl44I_q
#define GAN_MAT_LMULTLI_S   gan_mat44_lmultl44I_s
#define GAN_MAT_LMULTLI_I   gan_mat44_lmultl44I_i
#define GAN_MAT_LMULTLT_Q   gan_mat44_lmultl44T_q
#define GAN_MAT_LMULTLT_S   gan_mat44_lmultl44T_s
#define GAN_MAT_LMULTLT_I   gan_mat44_lmultl44T_i
#define GAN_MAT_LMULTLIT_Q   gan_mat44_lmultl44IT_q
#define GAN_MAT_LMULTLIT_S   gan_mat44_lmultl44IT_s
#define GAN_MAT_LMULTLIT_I   gan_mat44_lmultl44IT_i
#define GAN_MAT_RMULTL_Q   gan_mat44_rmultl44_q
#define GAN_MAT_RMULTL_S   gan_mat44_rmultl44_s
#define GAN_MAT_RMULTL_I   gan_mat44_rmultl44_i
#define GAN_MAT_RMULTLI_Q   gan_mat44_rmultl44I_q
#define GAN_MAT_RMULTLI_S   gan_mat44_rmultl44I_s
#define GAN_MAT_RMULTLI_I   gan_mat44_rmultl44I_i
#define GAN_MAT_RMULTLT_Q   gan_mat44_rmultl44T_q
#define GAN_MAT_RMULTLT_S   gan_mat44_rmultl44T_s
#define GAN_MAT_RMULTLT_I   gan_mat44_rmultl44T_i
#define GAN_MAT_RMULTLIT_Q   gan_mat44_rmultl44IT_q
#define GAN_MAT_RMULTLIT_S   gan_mat44_rmultl44IT_s
#define GAN_MAT_RMULTLIT_I   gan_mat44_rmultl44IT_i
#define GAN_MAT_SUMSQR_Q   gan_mat44_sumsqr_q
#define GAN_MAT_SUMSQR_S   gan_mat44_sumsqr_s
#define GAN_MAT_FNORM_Q   gan_mat44_Fnorm_q
#define GAN_MAT_FNORM_S   gan_mat44_Fnorm_s
#define GAN_MAT_FROM_MAT_Q   gan_mat44_from_mat_q
#define GAN_MAT_FROM_MAT_S   gan_mat44_from_mat_s
#define GAN_MAT_FROM_SQUMAT_Q   gan_mat44_from_squmat_q
#define GAN_MAT_FROM_SQUMAT_S   gan_mat44_from_squmat_s
#define GAN_SQUMAT_FROM_SQUMAT_Q   gan_squmat44_from_squmat_q
#define GAN_SQUMAT_FROM_SQUMAT_S   gan_squmat44_from_squmat_s
#define GAN_SQUMAT_IDENT_Q   gan_mat44_ident_q
#define GAN_SQUMAT_IDENT_S   gan_mat44_ident_s
#define GAN_SQUMAT_TPOSE_Q   gan_mat44_tpose_q
#define GAN_SQUMAT_TPOSE_S   gan_mat44_tpose_s
#define GAN_SQUMAT_TPOSE_I   gan_mat44_tpose_i
#define GAN_MAT_SADDT_Q   gan_mat44_saddT_q
#define GAN_MAT_SADDT_S   gan_mat44_saddT_s
#define GAN_SQUMAT_INVERT   gan_mat44_invert
#define GAN_SQUMAT_INVERT_Q   gan_mat44_invert_q
#define GAN_SQUMAT_INVERT_S   gan_mat44_invert_s
#define GAN_SQUMAT_INVERT_I   gan_mat44_invert_i
#define GAN_SQUMAT_ADJOINT_Q   gan_mat44_adjoint_q
#define GAN_SQUMAT_ADJOINT_S   gan_mat44_adjoint_s
#define GAN_SQUMAT_ADJOINTT_Q   gan_mat44_adjointT_q
#define GAN_SQUMAT_ADJOINTT_S   gan_mat44_adjointT_s
#define GAN_SQUMAT_DET_Q   gan_mat44_det_q
#define GAN_SQUMAT_DET_S   gan_mat44_det_s
#define GAN_SQUMAT_TRACE_Q   gan_mat44_trace_q
#define GAN_SQUMAT_TRACE_S   gan_mat44_trace_s
#define GAN_MATTYPE   Gan_SquMatrix44
#define GAN_MATRIX_TYPE   Gan_SquMatrix
#define GAN_SQUMATRIX_TYPE   Gan_SquMatrix
#define GAN_VECTOR_TYPE   Gan_Vector
#define GAN_MAT_ELEMENT_TYPE   GAN_DOUBLE
#define GAN_REALTYPE   double
#define GAN_FWRITE_LENDIAN   gan_fwrite_lendian_f64
#define GAN_FREAD_LENDIAN   gan_fread_lendian_f64
#define GAN_VECTYPE1   Gan_Vector4
#define GAN_VECTYPE2   Gan_Vector4
#define GAN_FIXED_MATRIX_TYPE   GAN_SYMMETRIC_MATRIX44
#define GAN_MAT_FPRINT   gan_symmat44_fprint
#define GAN_MAT_PRINT   gan_symmat44_print
#define GAN_MAT_FSCANF   gan_symmat44_fscanf
#define GAN_MAT_FWRITE   gan_symmat44_fwrite
#define GAN_MAT_FREAD   gan_symmat44_fread
#define GAN_MAT_ZERO_Q   gan_symmat44_zero_q
#define GAN_MAT_ZERO_S   gan_symmat44_zero_s
#define GAN_MAT_COPY_Q   gan_symmat44_copy_q
#define GAN_MAT_COPY_S   gan_symmat44_copy_s
#define GAN_MAT_SCALE_Q   gan_symmat44_scale_q
#define GAN_MAT_SCALE_S   gan_symmat44_scale_s
#define GAN_MAT_SCALE_I   gan_symmat44_scale_i
#define GAN_MAT_DIVIDE_Q   gan_symmat44_divide_q
#define GAN_MAT_DIVIDE_S   gan_symmat44_divide_s
#define GAN_MAT_DIVIDE_I   gan_symmat44_divide_i
#define GAN_MAT_NEGATE_Q   gan_symmat44_negate_q
#define GAN_MAT_NEGATE_S   gan_symmat44_negate_s
#define GAN_MAT_NEGATE_I   gan_symmat44_negate_i
#define GAN_MAT_UNIT_Q   gan_symmat44_unit_q
#define GAN_MAT_UNIT_S   gan_symmat44_unit_s
#define GAN_MAT_UNIT_I   gan_symmat44_unit_i
#define GAN_MAT_ADD_Q   gan_symmat44_add_q
#define GAN_MAT_ADD_I1   gan_symmat44_add_i1
#define GAN_MAT_ADD_I2   gan_symmat44_add_i2
#define GAN_MAT_INCREMENT   gan_symmat44_increment
#define GAN_MAT_ADD_S   gan_symmat44_add_s
#define GAN_MAT_SUB_Q   gan_symmat44_sub_q
#define GAN_MAT_SUB_I1   gan_symmat44_sub_i1
#define GAN_MAT_SUB_I2   gan_symmat44_sub_i2
#define GAN_MAT_DECREMENT   gan_symmat44_decrement
#define GAN_MAT_SUB_S   gan_symmat44_sub_s
#define GAN_MAT_MULTV_Q   gan_symmat44_multv4_q
#define GAN_MAT_MULTV_S   gan_symmat44_multv4_s
#define GAN_MAT_SUMSQR_Q   gan_symmat44_sumsqr_q
#define GAN_MAT_SUMSQR_S   gan_symmat44_sumsqr_s
#define GAN_MAT_FNORM_Q   gan_symmat44_Fnorm_q
#define GAN_MAT_FNORM_S   gan_symmat44_Fnorm_s
#define GAN_SQUMAT_IDENT_Q   gan_symmat44_ident_q
#define GAN_SQUMAT_IDENT_S   gan_symmat44_ident_s
#define GAN_SQUMAT_INVERT   gan_symmat44_invert
#define GAN_SQUMAT_INVERT_Q   gan_symmat44_invert_q
#define GAN_SQUMAT_INVERT_S   gan_symmat44_invert_s
#define GAN_SQUMAT_INVERT_I   gan_symmat44_invert_i
#define GAN_SQUMAT_DET_Q   gan_symmat44_det_q
#define GAN_SQUMAT_DET_S   gan_symmat44_det_s
#define GAN_SQUMAT_TRACE_Q   gan_symmat44_trace_q
#define GAN_SQUMAT_TRACE_S   gan_symmat44_trace_s
#define GAN_VEC_OUTER_SYM_Q   gan_vec44_outer_sym_q
#define GAN_VEC_OUTER_SYM_S   gan_vec44_outer_sym_s
#define GAN_SYMMAT_CHOLESKY   gan_symmat44_cholesky
#define GAN_SYMMAT_CHOLESKY_Q   gan_symmat44_cholesky_q
#define GAN_SYMMAT_CHOLESKY_S   gan_symmat44_cholesky_s
#define GAN_SYMMAT_CHOLESKY_I   gan_symmat44_cholesky_i
#define GAN_MATTYPE   Gan_SquMatrix44
#define GAN_MATRIX_TYPE   Gan_SquMatrix
#define GAN_SQUMATRIX_TYPE   Gan_SquMatrix
#define GAN_VECTOR_TYPE   Gan_Vector
#define GAN_MAT_ELEMENT_TYPE   GAN_DOUBLE
#define GAN_REALTYPE   double
#define GAN_FWRITE_LENDIAN   gan_fwrite_lendian_f64
#define GAN_FREAD_LENDIAN   gan_fread_lendian_f64
#define GAN_VECTYPE1   Gan_Vector4
#define GAN_VECTYPE2   Gan_Vector4
#define GAN_SQUMATTYPEL   Gan_SquMatrix44
#define GAN_SQUMATTYPER   Gan_SquMatrix44
#define GAN_FIXED_MATRIX_TYPE   GAN_LOWER_TRI_MATRIX44
#define GAN_MAT_FPRINT   gan_ltmat44_fprint
#define GAN_MAT_PRINT   gan_ltmat44_print
#define GAN_MAT_FSCANF   gan_ltmat44_fscanf
#define GAN_MAT_FWRITE   gan_ltmat44_fwrite
#define GAN_MAT_FREAD   gan_ltmat44_fread
#define GAN_MAT_ZERO_Q   gan_ltmat44_zero_q
#define GAN_MAT_ZERO_S   gan_ltmat44_zero_s
#define GAN_MAT_COPY_Q   gan_ltmat44_copy_q
#define GAN_MAT_COPY_S   gan_ltmat44_copy_s
#define GAN_MAT_SCALE_Q   gan_ltmat44_scale_q
#define GAN_MAT_SCALE_S   gan_ltmat44_scale_s
#define GAN_MAT_SCALE_I   gan_ltmat44_scale_i
#define GAN_MAT_DIVIDE_Q   gan_ltmat44_divide_q
#define GAN_MAT_DIVIDE_S   gan_ltmat44_divide_s
#define GAN_MAT_DIVIDE_I   gan_ltmat44_divide_i
#define GAN_MAT_NEGATE_Q   gan_ltmat44_negate_q
#define GAN_MAT_NEGATE_S   gan_ltmat44_negate_s
#define GAN_MAT_NEGATE_I   gan_ltmat44_negate_i
#define GAN_MAT_UNIT_Q   gan_ltmat44_unit_q
#define GAN_MAT_UNIT_S   gan_ltmat44_unit_s
#define GAN_MAT_UNIT_I   gan_ltmat44_unit_i
#define GAN_MAT_ADD_Q   gan_ltmat44_add_q
#define GAN_MAT_ADD_I1   gan_ltmat44_add_i1
#define GAN_MAT_ADD_I2   gan_ltmat44_add_i2
#define GAN_MAT_INCREMENT   gan_ltmat44_increment
#define GAN_MAT_ADD_S   gan_ltmat44_add_s
#define GAN_MAT_SUB_Q   gan_ltmat44_sub_q
#define GAN_MAT_SUB_I1   gan_ltmat44_sub_i1
#define GAN_MAT_SUB_I2   gan_ltmat44_sub_i2
#define GAN_MAT_DECREMENT   gan_ltmat44_decrement
#define GAN_MAT_SUB_S   gan_ltmat44_sub_s
#define GAN_MAT_MULTV_Q   gan_ltmat44_multv4_q
#define GAN_MAT_MULTV_S   gan_ltmat44_multv4_s
#define GAN_MAT_MULTV_I   gan_ltmat44_multv4_i
#define GAN_MATT_MULTV_Q   gan_ltmat44T_multv4_q
#define GAN_MATT_MULTV_S   gan_ltmat44T_multv4_s
#define GAN_MATT_MULTV_I   gan_ltmat44T_multv4_i
#define GAN_MAT_SRMULTT_Q   gan_ltmat44_srmultT_q
#define GAN_MAT_SRMULTT_S   gan_ltmat44_srmultT_s
#define GAN_MAT_SRMULTT_I   gan_ltmat44_srmultT_i
#define GAN_MAT_SLMULTT_Q   gan_ltmat44_slmultT_q
#define GAN_MAT_SLMULTT_S   gan_ltmat44_slmultT_s
#define GAN_MAT_SLMULTT_I   gan_ltmat44_slmultT_i
#define GAN_MAT_SUMSQR_Q   gan_ltmat44_sumsqr_q
#define GAN_MAT_SUMSQR_S   gan_ltmat44_sumsqr_s
#define GAN_MAT_FNORM_Q   gan_ltmat44_Fnorm_q
#define GAN_MAT_FNORM_S   gan_ltmat44_Fnorm_s
#define GAN_SQUMAT_IDENT_Q   gan_ltmat44_ident_q
#define GAN_SQUMAT_IDENT_S   gan_ltmat44_ident_s
#define GAN_SQUMATI_MULTV_Q   gan_ltmat44I_multv4_q
#define GAN_SQUMATI_MULTV_S   gan_ltmat44I_multv4_s
#define GAN_SQUMATI_MULTV_I   gan_ltmat44I_multv4_i
#define GAN_SQUMATIT_MULTV_Q   gan_ltmat44IT_multv4_q
#define GAN_SQUMATIT_MULTV_S   gan_ltmat44IT_multv4_s
#define GAN_SQUMATIT_MULTV_I   gan_ltmat44IT_multv4_i
#define GAN_SQUMAT_INVERT   gan_ltmat44_invert
#define GAN_SQUMAT_INVERT_Q   gan_ltmat44_invert_q
#define GAN_SQUMAT_INVERT_S   gan_ltmat44_invert_s
#define GAN_SQUMAT_INVERT_I   gan_ltmat44_invert_i
#define GAN_SQUMAT_DET_Q   gan_ltmat44_det_q
#define GAN_SQUMAT_DET_S   gan_ltmat44_det_s
#define GAN_SQUMAT_TRACE_Q   gan_ltmat44_trace_q
#define GAN_SQUMAT_TRACE_S   gan_ltmat44_trace_s
#define GAN_MATTYPE   Gan_SquMatrix44
#define GAN_MATRIX_TYPE   Gan_SquMatrix
#define GAN_SQUMATRIX_TYPE   Gan_SquMatrix
#define GAN_VECTOR_TYPE   Gan_Vector
#define GAN_MAT_ELEMENT_TYPE   GAN_DOUBLE
#define GAN_REALTYPE   double
#define GAN_MAT_FPRINT   gan_ltmat44T_fprint
#define GAN_MAT_PRINT   gan_ltmat44T_print
#define GAN_MAT_FSCANF   gan_ltmat44T_fscanf
#define GAN_FIXED_MATRIX_TYPE   GAN_LOWER_TRI_MATRIX44
#define gan_ltmat44T_fwrite   gan_ltmat44_fwrite
#define gan_ltmat44T_fread   gan_ltmat44_fread

Functions

Gan_Bool gan_mat44_fprint (FILE *fp, const Gan_Matrix44 *A, const char *prefix, int indent, const char *fmt)
 Print 4x4 matrix to file.
Gan_Bool gan_mat44_fscanf (FILE *fp, Gan_Matrix44 *A, char *prefix, int prefix_len)
 Read 4x4 matrix from file.
Gan_Matrix44 gan_mat44_fill_s (double XX, double XY, double XZ, double XW, double YX, double YY, double YZ, double YW, double ZX, double ZY, double ZZ, double ZW, double WX, double WY, double WZ, double WW)
 Fill 4x4 matrix with values.
Gan_Matrix44gan_mat44_tpose_i (Gan_Matrix44 *A)
 Transpose 4x4 matrix in-place.
Gan_Vector3gan_mat44_multv3h_q (const Gan_Matrix44 *A, const Gan_Vector3 *p, double h, Gan_Vector3 *q)
 Multiply 4x4 matrix by homogeneously constructed 4-vector.
Gan_Vector3 gan_mat44_multv3h_s (const Gan_Matrix44 *A, const Gan_Vector3 *p, double h)
 Multiply 4x4 matrix by homogeneously constructed 4-vector.
Gan_Matrix44gan_mat44_invert (Gan_Matrix44 *A, Gan_Matrix44 *B, int *error_code)
 Invert 4x4 matrix.
Gan_Matrix44gan_mat44_adjoint_q (const Gan_Matrix44 *A, Gan_Matrix44 *B)
 Compute adjoint of 4x4 matrix.
Gan_Matrix44gan_mat44_adjointT_q (const Gan_Matrix44 *A, Gan_Matrix44 *B)
 Compute adjoint transpose of 4x4 matrix.
void gan_mat44_get_rows_s (const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q, Gan_Vector4 *r, Gan_Vector4 *s)
 Extract rows of 4x4 matrix.
void gan_mat44_get_cols_s (const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q, Gan_Vector4 *r, Gan_Vector4 *s)
 Extract columns of 4x4 matrix.
Gan_Matrix33 gan_mat44_get_m33tl_s (const Gan_Matrix44 *A)
 Extract top-left 3x3 part of 4x4 matrix.
Gan_Vector3 gan_mat44_get_v3tr_s (const Gan_Matrix44 *A)
 Extract top part of right hand column of 4x4 matrix.
void gan_mat44_get_parts_s (const Gan_Matrix44 *A, Gan_Matrix33 *B, Gan_Vector3 *p, Gan_Vector3 *q, double *s)
 Extract parts of 4x4 matrix.
void gan_mat44_get_blocks_s (const Gan_Matrix44 *M, Gan_Matrix22 *A, Gan_Matrix22 *B, Gan_Matrix22 *C, Gan_Matrix22 *D)
 Extract 2x2 block parts of 4x4 matrix.
Gan_Matrix44 gan_mat44_set_parts_s (Gan_Matrix33 *B, const Gan_Vector3 *p, const Gan_Vector3 *q, double s)
 Build a 4x4 matrix from parts.
Gan_Matrix44 gan_mat44_set_blocks_s (const Gan_Matrix22 *A, const Gan_Matrix22 *B, const Gan_Matrix22 *C, const Gan_Matrix22 *D)
 Build a 4x4 matrix from 2x2 blocks.
Gan_Matrix44gan_mat44_from_mat_q (const Gan_Matrix *A, Gan_Matrix44 *B)
 Convert generic rectangular matrix to 4x4 matrix structure.
Gan_Matrix44gan_mat44_from_squmat_q (const Gan_SquMatrix *A, Gan_Matrix44 *B)
 Convert symmetric matrix to generic 4x4 matrix structure.
Gan_SquMatrix44gan_squmat44_from_squmat_q (const Gan_SquMatrix *A, Gan_SquMatrix44 *B)
 Convert symmetric matrix to specific 4x4 symmetric matrix structure.
Gan_Bool gan_symmat44_fprint (FILE *fp, const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print 4x4 symmetric matrix to file.
Gan_Bool gan_symmat44_fscanf (FILE *fp, Gan_SquMatrix44 *A, char *prefix, int prefix_len)
 Read 4x4 symmetric matrix from file.
Gan_SquMatrix44 gan_symmat44_fill_s (double XX, double YX, double YY, double ZX, double ZY, double ZZ, double WX, double WY, double WZ, double WW)
 Return 4x4 symmetric matrix filled with values.
Gan_SquMatrix44gan_symmat44_cholesky (Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, int *error_code)
 Compute Cholesky factorisation of symmetric 4x4 matrix.
Gan_SquMatrix44gan_symmat44_invert (Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, int *error_code)
 Compute inverse of symmetric 4x4 matrix.
void gan_symmat44_get_parts_s (const Gan_SquMatrix44 *A, Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s)
 Extract parts of 4x4 symmetric matrix.
void gan_symmat44_get_blocks_s (const Gan_SquMatrix44 *A, Gan_SquMatrix22 *B, Gan_Matrix22 *C, Gan_SquMatrix22 *D)
 Extract 2x2 block parts of 4x4 symmetric matrix.
Gan_SquMatrix44 gan_symmat44_set_parts_s (const Gan_SquMatrix33 *B, const Gan_Vector3 *p, double s)
 Build a 4x4 symmetric matrix from parts.
Gan_SquMatrix44 gan_symmat44_set_blocks_s (const Gan_SquMatrix22 *B, const Gan_Matrix22 *C, const Gan_SquMatrix22 *D)
 Build a 4x4 symmetric matrix from 2x2 blocks.
Gan_Matrix44gan_symmat44_to_mat44_q (const Gan_SquMatrix44 *A, Gan_Matrix44 *B)
 Convert symmetric 4x4 matrix to generic 4x4 matrix.
Gan_Matrix44 gan_symmat44_to_mat44_s (const Gan_SquMatrix44 *A)
 Convert symmetric 4x4 matrix to generic 4x4 matrix.
Gan_Bool gan_ltmat44_fprint (FILE *fp, const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print 4x4 lower triangular matrix to file.
Gan_Bool gan_ltmat44_fscanf (FILE *fp, Gan_SquMatrix44 *A, char *prefix, int prefix_len)
 Read 4x4 lower triangular matrix from file.
Gan_Bool gan_ltmat44T_fprint (FILE *fp, const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print 4x4 upper triangular matrix to file.
Gan_Bool gan_ltmat44T_fscanf (FILE *fp, Gan_SquMatrix44 *A, char *prefix, int prefix_len)
 Read 4x4 upper triangular matrix from file.
Gan_SquMatrix44 gan_ltmat44_fill_s (double XX, double YX, double YY, double ZX, double ZY, double ZZ, double WX, double WY, double WZ, double WW)
 Return 4x4 lower triangular matrix filled with values.
void gan_ltmat44_get_parts_s (const Gan_SquMatrix44 *A, Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s)
 Extract parts of 4x4 lower triangular matrix.
Gan_SquMatrix44 gan_ltmat44_set_parts_s (const Gan_SquMatrix33 *B, const Gan_Vector3 *p, double s)
 Build a 4x4 lower triangular matrix from parts.
Gan_SquMatrix44gan_ltmat44_invert (Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, int *error_code)
 Compute inverse of lower triangular 4x4 matrix.
Gan_Matrix44 gan_mat44_ident_s (void)
 Return fixed size square matrix filled with identity.
Gan_Matrix44 gan_mat44_tpose_s (const Gan_Matrix44 *A)
 Transpose fixed size square matrix.
Gan_SquMatrix44 gan_mat44_saddT_s (const Gan_Matrix44 *A)
 Add matrix to its own transpose.
Gan_Matrix44 gan_mat44_invert_s (const Gan_Matrix44 *A)
 Invert fixed size square matrix.
Gan_Matrix44 gan_mat44_adjoint_s (const Gan_Matrix44 *A)
 Compute adjoint of fixed size square matrix.
Gan_Matrix44 gan_mat44_adjointT_s (const Gan_Matrix44 *A)
 Compute adjoint transpose of fixed size square matrix.
double gan_mat44_det_s (const Gan_Matrix44 *A)
 Determinant of square matrix.
double gan_mat44_trace_s (const Gan_Matrix44 *A)
 Trace of square matrix.
Gan_Bool gan_mat44_print (const Gan_Matrix44 *A, const char *prefix, int indent, const char *fmt)
 Print fixed size matrix to standard output.
Gan_Bool gan_mat44_fwrite (FILE *fp, const Gan_Matrix44 *A, gan_uint32 magic_number)
 Write fixed size matrix to file stream.
Gan_Bool gan_mat44_fread (FILE *fp, Gan_Matrix44 *A, gan_uint32 *magic_number)
 Read fixed size matrix from file stream.
Gan_Matrix44 gan_mat44_zero_s (void)
 Set fixed size matrix to zero.
Gan_Matrix44 gan_mat44_copy_s (const Gan_Matrix44 *A)
 Copy fixed size matrix.
Gan_Matrix44 gan_mat44_scale_s (const Gan_Matrix44 *A, double a)
 Scale fixed size matrix.
Gan_Matrix44 gan_mat44_divide_s (const Gan_Matrix44 *A, double a)
 Divide fixed size matrix by scalar.
Gan_Matrix44 gan_mat44_negate_s (const Gan_Matrix44 *A)
 Negate fixed size matrix.
Gan_Matrix44gan_mat44_unit_q (Gan_Matrix44 *A, Gan_Matrix44 *B)
 Scale matrix to unit norm.
Gan_Matrix44 gan_mat44_unit_s (const Gan_Matrix44 *A)
 Scale matrix to unit norm.
Gan_Matrix44 gan_mat44_add_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Add two fixed size matrices.
Gan_Matrix44 gan_mat44_sub_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Subtract two fixed size matrices.
Gan_Matrix44 gan_vec44_outer_s (const Gan_Vector4 *p, const Gan_Vector4 *q)
 Compute the outer product of two fixed size vectors.
Gan_Vector4 gan_mat44_multv4_s (const Gan_Matrix44 *A, const Gan_Vector4 *p)
 Matrix/vector product.
Gan_Vector4 gan_mat44T_multv4_s (const Gan_Matrix44 *A, const Gan_Vector4 *p)
 Matrix/vector product with the matrix transposed.
Gan_Matrix44 gan_mat44_lmultm44T_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Left-multiply a matrix by the transpose of another matrix.
Gan_Matrix44 gan_mat44_rmultm44_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Right-multiply a matrix by another matrix.
Gan_Matrix44 gan_mat44_rmultm44T_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Right-multiply a matrix by the transpose of another matrix.
Gan_SquMatrix44 gan_mat44_lmultm44T_sym_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Matrix product producing a symmetric matrix.
Gan_SquMatrix44 gan_mat44_rmultm44T_sym_s (const Gan_Matrix44 *A, const Gan_Matrix44 *B)
 Matrix product producing a symmetric matrix.
Gan_SquMatrix44 gan_mat44_slmultT_s (const Gan_Matrix44 *A)
 Left-multiply a matrix by its own transpose, producing a symmetric matrix.
Gan_SquMatrix44 gan_mat44_srmultT_s (const Gan_Matrix44 *A)
 Right-multiply a matrix by its own transpose, producing a symmetric matrix.
Gan_Matrix44 gan_mat44_lmults44_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Left-multiply a matrix by a symmetric matrix.
Gan_Matrix44 gan_mat44_rmults44_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Right-multiply a matrix by a symmetric matrix.
Gan_SquMatrix44 gan_symmat44_lrmultm44T_s (const Gan_SquMatrix44 *A, const Gan_Matrix44 *B, Gan_Matrix44 *C)
 Matrix triple product involving symmetric matrices.
Gan_SquMatrix44 gan_symmat44_lrmultm44_s (const Gan_SquMatrix44 *A, const Gan_Matrix44 *B, Gan_Matrix44 *C)
 Matrix triple product involving symmetric matrices.
Gan_Matrix44 gan_mat44_lmultl44_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Left-multiply a matrix by a lower-triangular matrix.
Gan_Matrix44 gan_mat44_lmultl44I_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Left-multiply a matrix by the inverse of a lower-triangular matrix.
Gan_Matrix44 gan_mat44_lmultl44T_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Left-multiply a matrix by the transpose of a lower-triangular matrix.
Gan_Matrix44 gan_mat44_lmultl44IT_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Left-multiply a matrix by the inverse transpose of a lower-triangular matrix.
Gan_Matrix44 gan_mat44_rmultl44_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Right-multiply a matrix by a lower-triangular matrix.
Gan_Matrix44 gan_mat44_rmultl44I_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Right-multiply a matrix by the inverse of a lower-triangular matrix.
Gan_Matrix44 gan_mat44_rmultl44T_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Right-multiply a matrix by the transpose of a lower-triangular matrix.
Gan_Matrix44 gan_mat44_rmultl44IT_s (const Gan_Matrix44 *A, const Gan_SquMatrix44 *B)
 Right-multiply a matrix by the inverse transpose of a lower-triangular matrix.
double gan_mat44_sumsqr_s (const Gan_Matrix44 *A)
 Returns sum of squares of matrix elements.
double gan_mat44_Fnorm_s (const Gan_Matrix44 *A)
 Frobenius norm of matrix.
Gan_Matrix44 gan_mat44_from_mat_s (const Gan_Matrix *A)
 Convert generic rectangular matrix to fixed size matrix structure.
Gan_Matrix44 gan_mat44_from_squmat_s (const Gan_SquMatrix *A)
 Convert square matrix to fixed size matrix structure.
Gan_SquMatrix44 gan_squmat44_from_squmat_s (const Gan_SquMatrix *A)
 Convert a square matrix to a symmetric fixed size matrix.
Gan_SquMatrix44 gan_vec44_outer_sym_s (const Gan_Vector4 *p)
 Returns the outer product of vector with itself.
Gan_SquMatrix44 gan_symmat44_cholesky_s (const Gan_SquMatrix44 *A)
 Compute Cholesky factorisation of fixed size symmetric matrix.
Gan_SquMatrix44 gan_symmat44_ident_s (void)
 Return fixed size square matrix filled with identity.
Gan_SquMatrix44 gan_symmat44_invert_s (const Gan_SquMatrix44 *A)
 Invert fixed size square matrix.
double gan_symmat44_det_s (const Gan_SquMatrix44 *A)
 Determinant of square matrix.
double gan_symmat44_trace_s (const Gan_SquMatrix44 *A)
 Trace of square matrix.
Gan_Bool gan_symmat44_print (const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print fixed size matrix to standard output.
Gan_Bool gan_symmat44_fwrite (FILE *fp, const Gan_SquMatrix44 *A, gan_uint32 magic_number)
 Write fixed size matrix to file stream.
Gan_Bool gan_symmat44_fread (FILE *fp, Gan_SquMatrix44 *A, gan_uint32 *magic_number)
 Read fixed size matrix from file stream.
Gan_SquMatrix44 gan_symmat44_zero_s (void)
 Set fixed size matrix to zero.
Gan_SquMatrix44 gan_symmat44_copy_s (const Gan_SquMatrix44 *A)
 Copy fixed size matrix.
Gan_SquMatrix44 gan_symmat44_scale_s (const Gan_SquMatrix44 *A, double a)
 Scale fixed size matrix.
Gan_SquMatrix44 gan_symmat44_divide_s (const Gan_SquMatrix44 *A, double a)
 Divide fixed size matrix by scalar.
Gan_SquMatrix44 gan_symmat44_negate_s (const Gan_SquMatrix44 *A)
 Negate fixed size matrix.
Gan_SquMatrix44gan_symmat44_unit_q (Gan_SquMatrix44 *A, Gan_SquMatrix44 *B)
 Scale matrix to unit norm.
Gan_SquMatrix44 gan_symmat44_unit_s (const Gan_SquMatrix44 *A)
 Scale matrix to unit norm.
Gan_SquMatrix44 gan_symmat44_add_s (const Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B)
 Add two fixed size matrices.
Gan_SquMatrix44 gan_symmat44_sub_s (const Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B)
 Subtract two fixed size matrices.
Gan_Vector4 gan_symmat44_multv4_s (const Gan_SquMatrix44 *A, const Gan_Vector4 *p)
 Matrix/vector product.
double gan_symmat44_sumsqr_s (const Gan_SquMatrix44 *A)
 Returns sum of squares of matrix elements.
double gan_symmat44_Fnorm_s (const Gan_SquMatrix44 *A)
 Frobenius norm of matrix.
Gan_SquMatrix44 gan_ltmat44_ident_s (void)
 Return fixed size square matrix filled with identity.
Gan_Vector4 gan_ltmat44I_multv4_s (const Gan_SquMatrix44 *A, const Gan_Vector4 *p)
 Computes the product of the inverse of a matrix and a vector.
Gan_Vector4 gan_ltmat44IT_multv4_s (const Gan_SquMatrix44 *A, const Gan_Vector4 *p)
 Computes the product of the inverse transpose of a matrix and a vector.
Gan_SquMatrix44 gan_ltmat44_invert_s (const Gan_SquMatrix44 *A)
 Invert fixed size square matrix.
double gan_ltmat44_det_s (const Gan_SquMatrix44 *A)
 Determinant of square matrix.
double gan_ltmat44_trace_s (const Gan_SquMatrix44 *A)
 Trace of square matrix.
Gan_Bool gan_ltmat44_print (const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print fixed size matrix to standard output.
Gan_Bool gan_ltmat44_fwrite (FILE *fp, const Gan_SquMatrix44 *A, gan_uint32 magic_number)
 Write fixed size matrix to file stream.
Gan_Bool gan_ltmat44_fread (FILE *fp, Gan_SquMatrix44 *A, gan_uint32 *magic_number)
 Read fixed size matrix from file stream.
Gan_SquMatrix44 gan_ltmat44_zero_s (void)
 Set fixed size matrix to zero.
Gan_SquMatrix44 gan_ltmat44_copy_s (const Gan_SquMatrix44 *A)
 Copy fixed size matrix.
Gan_SquMatrix44 gan_ltmat44_scale_s (const Gan_SquMatrix44 *A, double a)
 Scale fixed size matrix.
Gan_SquMatrix44 gan_ltmat44_divide_s (const Gan_SquMatrix44 *A, double a)
 Divide fixed size matrix by scalar.
Gan_SquMatrix44 gan_ltmat44_negate_s (const Gan_SquMatrix44 *A)
 Negate fixed size matrix.
Gan_SquMatrix44gan_ltmat44_unit_q (Gan_SquMatrix44 *A, Gan_SquMatrix44 *B)
 Scale matrix to unit norm.
Gan_SquMatrix44 gan_ltmat44_unit_s (const Gan_SquMatrix44 *A)
 Scale matrix to unit norm.
Gan_SquMatrix44 gan_ltmat44_add_s (const Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B)
 Add two fixed size matrices.
Gan_SquMatrix44 gan_ltmat44_sub_s (const Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B)
 Subtract two fixed size matrices.
Gan_Vector4 gan_ltmat44_multv4_s (const Gan_SquMatrix44 *A, const Gan_Vector4 *p)
 Matrix/vector product.
Gan_Vector4 gan_ltmat44T_multv4_s (const Gan_SquMatrix44 *A, const Gan_Vector4 *p)
 Matrix/vector product with the matrix transposed.
Gan_SquMatrix44 gan_ltmat44_slmultT_s (const Gan_SquMatrix44 *A)
 Left-multiply a matrix by its own transpose, producing a symmetric matrix.
Gan_SquMatrix44 gan_ltmat44_srmultT_s (const Gan_SquMatrix44 *A)
 Right-multiply a matrix by its own transpose, producing a symmetric matrix.
double gan_ltmat44_sumsqr_s (const Gan_SquMatrix44 *A)
 Returns sum of squares of matrix elements.
double gan_ltmat44_Fnorm_s (const Gan_SquMatrix44 *A)
 Frobenius norm of matrix.
Gan_Bool gan_ltmat44T_print (const Gan_SquMatrix44 *A, const char *prefix, int indent, const char *fmt)
 Print fixed size matrix to standard output.

Detailed Description

Module: 4x4 matrices (double precision)

Part of: Gandalf Library

Version:
1.13
Date:
2002/04/18 14:56:23
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:49 2006 by  doxygen 1.3.9.1