Main Page   Modules   Compound List   File List   Compound Members   File Members  

2x3matrix.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028 
00029 #ifndef _GAN_2X3MATRIX_H
00030 #define _GAN_2X3MATRIX_H
00031 
00032 #include <stdlib.h>
00033 #include <stdio.h>
00034 #include <math.h>
00035 #include <gandalf/common/misc_defs.h>
00049 /* This library is free software; you can redistribute it and/or
00050    modify it under the terms of the GNU Lesser General Public
00051    License as published by the Free Software Foundation; either
00052    version 2.1 of the License, or (at your option) any later version.
00053 
00054    This library is distributed in the hope that it will be useful,
00055    but WITHOUT ANY WARRANTY; without even the implied warranty of
00056    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00057    Lesser General Public License for more details.
00058 
00059    You should have received a copy of the GNU Lesser General Public
00060    License along with this library; if not, write to the Free Software
00061    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00062 */
00063 
00064 #ifndef _GAN_REPEAT23_H
00065 #define _GAN_REPEAT23_H
00066 
00080 /* This library is free software; you can redistribute it and/or
00081    modify it under the terms of the GNU Lesser General Public
00082    License as published by the Free Software Foundation; either
00083    version 2.1 of the License, or (at your option) any later version.
00084 
00085    This library is distributed in the hope that it will be useful,
00086    but WITHOUT ANY WARRANTY; without even the implied warranty of
00087    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00088    Lesser General Public License for more details.
00089 
00090    You should have received a copy of the GNU Lesser General Public
00091    License along with this library; if not, write to the Free Software
00092    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00093 */
00094 
00095 #ifndef _GAN_REPEAT3_H
00096 #define _GAN_REPEAT3_H
00097 
00098 #ifdef __cplusplus
00099 extern "C" {
00100 #endif
00101 
00102 /* macros for constructing three-fold repetitions */
00103 #define GAN_REP3_AS(a,b,p1,p2,p3) (a p1 b, a p2 b, a p3 b)
00104 #define GAN_REP3_AS_C(a,b) GAN_REP3_AS(a,b,x,y,z)
00105 #define GAN_REP3_A(a,p1,p2,p3) (a p1, a p2, a p3)
00106 #define GAN_REP3_A_C(a) GAN_REP3_A(a,x,y,z)
00107 
00108 #define GAN_FREP3_A(a,b,p1,p2,p3,q1,q2,q3) (a p1 b q1, a p2 b q2, a p3 b q3)
00109 #define GAN_FREP3_A_C(a,b,p1,p2,p3) GAN_FREP3_A(a,b,x,y,z,p1,p2,p3)
00110 
00111 
00112 #define GAN_REP3_ABS(a,b,c,p1,p2,p3,q1,q2,q3)\
00113            (a p1 b q1 c, a p2 b q2 c, a p3 b q3 c)
00114 #define GAN_REP3_AAS(a,b,c,p1,p2,p3) GAN_REP3_ABS(a,b,c,p1,p2,p3,p1,p2,p3)
00115 #define GAN_REP3_AAS_C(a,b,c) GAN_REP3_AAS(a,b,c,x,y,z)
00116 
00117 #define GAN_REP3_AB(a,b,p1,p2,p3,q1,q2,q3)\
00118            (a p1 b q1, a p2 b q2, a p3 b q3)
00119 #define GAN_REP3_AA(a,b,p1,p2,p3) GAN_REP3_AB(a,b,p1,p2,p3,p1,p2,p3)
00120 #define GAN_REP3_AA_C(a,b) GAN_REP3_AA(a,b,x,y,z)
00121 
00122 #define GAN_REP3_ABCS(a,b,c,d,p1,p2,p3,q1,q2,q3,r1,r2,r3)\
00123            (a p1 b q1 c r1 d, a p2 b q2 c r2 d, a p3 b q3 c r3 d)
00124 #define GAN_REP3_ABC(a,b,c,p1,p2,p3,q1,q2,q3,r1,r2,r3)\
00125            (a p1 b q1 c r1, a p2 b q2 c r2, a p3 b q3 c r3)
00126 #define GAN_REP3_AAA(a,b,c,p1,p2,p3)\
00127         GAN_REP3_ABC(a,b,c,p1,p2,p3,p1,p2,p3,p1,p2,p3)
00128 #define GAN_REP3_AAA_C(a,b,c) GAN_REP3_AAA(a,b,c,x,y,z)
00129 
00130 #define GAN_REP3_OP_AB(a,b,p1,p2,p3,q1,q2,q3,op)\
00131            (a p1 b q1 op a p2 b q2 op a p3 b q3)
00132 #define GAN_REP3_OP_AA(a,b,p1,p2,p3,op)\
00133            GAN_REP3_OP_AB(a,b,p1,p2,p3,p1,p2,p3,op)
00134 #define GAN_REP3_OP_AA_C(a,b,op) GAN_REP3_OP_AA(a,b,x,y,z,op)
00135 
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 
00140 #endif /* #ifndef _GAN_REPEAT3_H */
00141 
00142 #ifdef __cplusplus
00143 extern "C" {
00144 #endif
00145 
00146 /* macros for constructing dual two-fold repetitions */
00147 
00148 #define GAN_FREP23_A(a,b,p1,p2,q1,q2,q3,r11,r12,r13,r21,r22,r23)\
00149             (GAN_FREP3_A(a,b,p1##q1,p1##q2,p1##q3,r11,r12,r13),\
00150              GAN_FREP3_A(a,b,p2##q1,p2##q2,p2##q3,r21,r22,r23))
00151 #define GAN_FREP23_A_C(a,b,r11,r12,r13,r21,r22,r23) \
00152            GAN_FREP23_A(a,b,x,y,x,y,z,r11,r12,r13,r21,r22,r23)
00153 
00154 /* most general macros */
00155 #define GAN_REP23_ABCS(a,b,c,d,p1,p2,q1,q2,q3,r1,r2,s1,s2,s3,t1,t2,u1,u2,u3)\
00156  (GAN_REP3_ABCS(a,b,c,d,p1##q1,p1##q2,p1##q3,r1##s1,r1##s2,r1##s3,t1##u1,t1##u2,t1##u3),\
00157   GAN_REP3_ABCS(a,b,c,d,p2##q1,p2##q2,p2##q3,r2##s1,r2##s2,r2##s3,t2##u1,t2##u2,t2##u3))
00158 #define GAN_REP23_ABC(a,b,c,p1,p2,q1,q2,q3,r1,r2,s1,s2,s3,t1,t2,u1,u2,u3)\
00159  (GAN_REP3_ABC(a,b,c,p1##q1,p1##q2,p1##q3,r1##s1,r1##s2,r1##s3,t1##u1,t1##u2,t1##u3),\
00160   GAN_REP3_ABC(a,b,c,p2##q1,p2##q2,p2##q3,r2##s1,r2##s2,r2##s3,t2##u1,t2##u2,t2##u3))
00161 
00162 #define GAN_REP23_AAAS(a,b,c,d,p1,p2,q1,q2,q3)\
00163    GAN_REP23_ABCS(a,b,c,d,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3)
00164 #define GAN_REP23_AAA(a,b,c,p1,p2,q1,q2,q3)\
00165    GAN_REP23_ABC(a,b,c,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3)
00166 #define GAN_REP23_ABS(a,b,c,p1,p2,q1,q2,q3,r1,r2,s1,s2,s3)\
00167  (GAN_REP3_ABS(a,b,c,p1##q1,p1##q2,p1##q3,r1##s1,r1##s2,r1##s3),\
00168   GAN_REP3_ABS(a,b,c,p2##q1,p2##q2,p2##q3,r2##s1,r2##s2,r2##s3))
00169 #define GAN_REP23_AB(a,b,p1,p2,q1,q2,q3,r1,r2,s1,s2,s3)\
00170  (GAN_REP3_AB(a,b,p1##q1,p1##q2,p1##q3,r1##s1,r1##s2,r1##s3),\
00171   GAN_REP3_AB(a,b,p2##q1,p2##q2,p2##q3,r2##s1,r2##s2,r2##s3))
00172 #define GAN_REP23_AAS(a,b,c,p1,p2,q1,q2,q3)\
00173             GAN_REP23_ABS(a,b,c,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3)
00174 #define GAN_REP23_AA(a,b,p1,p2,q1,q2,q3)\
00175             GAN_REP23_AB(a,b,p1,p2,q1,q2,q3,p1,p2,q1,q2,q3)
00176 #define GAN_REP23_AS(a,b,p1,p2,q1,q2,q3)\
00177  (GAN_REP3_AS(a,b,p1##q1,p1##q2,p1##q3),\
00178   GAN_REP3_AS(a,b,p2##q1,p2##q2,p2##q3))
00179 #define GAN_REP23_A(a,p1,p2,q1,q2,q3)\
00180  (GAN_REP3_A(a,p1##q1,p1##q2,p1##q3),\
00181   GAN_REP3_A(a,p2##q1,p2##q2,p2##q3))
00182 
00183 /* macros specific to xx, xy etc coordinates */
00184 #define GAN_REP23_AS_C(a,b) GAN_REP23_AS(a,b,x,y,x,y,z)
00185 #define GAN_REP23_AAS_C(a,b,c) GAN_REP23_AAS(a,b,c,x,y,x,y,z)
00186 #define GAN_REP23_AAAS_C(a,b,c,d) GAN_REP23_AAAS(a,b,c,d,x,y,x,y,z)
00187 #define GAN_REP23_A_C(a) GAN_REP23_A(a,x,y,x,y,z)
00188 #define GAN_REP23_AA_C(a,b) GAN_REP23_AA(a,b,x,y,x,y,z)
00189 #define GAN_REP23_AAA_C(a,b,c) GAN_REP23_AAA(a,b,c,x,y,x,y,z)
00190 
00191 #ifdef __cplusplus
00192 }
00193 #endif
00194 
00195 #endif /* #ifndef _GAN_REPEAT23_H */
00196 #include <gandalf/linalg/2vector.h>
00197 #include <gandalf/linalg/3vector.h>
00198 #include <gandalf/linalg/2x2matrix.h>
00199 #include <gandalf/linalg/3x3matrix.h>
00213 /* This library is free software; you can redistribute it and/or
00214    modify it under the terms of the GNU Lesser General Public
00215    License as published by the Free Software Foundation; either
00216    version 2.1 of the License, or (at your option) any later version.
00217 
00218    This library is distributed in the hope that it will be useful,
00219    but WITHOUT ANY WARRANTY; without even the implied warranty of
00220    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00221    Lesser General Public License for more details.
00222 
00223    You should have received a copy of the GNU Lesser General Public
00224    License along with this library; if not, write to the Free Software
00225    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00226 */
00227 
00228 #endif /* #ifndef _GAN_MATVECF_MACROS_H */
00229 #include <gandalf/linalg/mat_gen.h>
00230 
00231 #ifdef __cplusplus
00232 extern "C" {
00233 #endif
00234 
00250 
00251 typedef struct Gan_Matrix23
00252 {
00253    double xx, xy, xz,
00254           yx, yy, yz;
00255 } Gan_Matrix23;
00256 
00257 /* generic matrix multiply operations */
00258 #define GAN_MAT23_MULT1D(a,b,c,p1,p2,q1,q2,q3)\
00259  (a p1 = GAN_REP3_OP_AB(b,* c,xx,xy,xz,q1,q2,q3,+),\
00260   a p2 = GAN_REP3_OP_AB(b,* c,yx,yy,yz,q1,q2,q3,+))
00261 #define GAN_MAT23T_MULT1D(a,b,c,p1,p2,p3,q1,q2)\
00262  (a p1 = GAN_REP2_OP_AB(b,* c,xx,yx,q1,q2,+),\
00263   a p2 = GAN_REP2_OP_AB(b,* c,xy,yy,q1,q2,+),\
00264   a p3 = GAN_REP2_OP_AB(b,* c,xz,yz,q1,q2,+))
00265 
00266 /* declare functions specific to 2x3 matrices */
00280 /* This library is free software; you can redistribute it and/or
00281    modify it under the terms of the GNU Lesser General Public
00282    License as published by the Free Software Foundation; either
00283    version 2.1 of the License, or (at your option) any later version.
00284 
00285    This library is distributed in the hope that it will be useful,
00286    but WITHOUT ANY WARRANTY; without even the implied warranty of
00287    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00288    Lesser General Public License for more details.
00289 
00290    You should have received a copy of the GNU Lesser General Public
00291    License along with this library; if not, write to the Free Software
00292    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00293 */
00294 
00295 #ifndef _GAN_2X3MAT_H
00296 
00313 Gan_Matrix23 *gan_mat23_fill_q ( Gan_Matrix23 *A,
00314                                  double XX, double XY, double XZ,
00315                                  double YX, double YY, double YZ );
00316 
00337 Gan_Matrix22 *gan_mat23_rmultm23T_q ( Gan_Matrix23 *A, Gan_Matrix23 *B,
00338                                       Gan_Matrix22 *C );
00339 
00361 Gan_Vector2 *gan_mat23_multv2h_q ( Gan_Matrix23 *A, Gan_Vector2 *p, double h,
00362                                    Gan_Vector2 *q );
00363 
00384 void gan_mat23_get_rows_q ( Gan_Matrix23 *A, Gan_Vector3 *p, Gan_Vector3 *q );
00385 
00397 void gan_mat23_get_cols_q ( Gan_Matrix23 *A,
00398                             Gan_Vector2 *p, Gan_Vector2 *q, Gan_Vector2 *r );
00399 
00407 Gan_Matrix22 *gan_mat23_get_m22l_q ( Gan_Matrix23 *A, Gan_Matrix22 *B );
00408 
00416 Gan_Vector2 *gan_mat23_get_v2r_q ( Gan_Matrix23 *A, Gan_Vector2 *p );
00417 
00439 Gan_Matrix23 *gan_mat23_set_parts_q ( Gan_Matrix23 *A,
00440                                       Gan_Matrix22 *B, Gan_Vector2 *p );
00441 
00447 #endif /* #ifndef _GAN_2X3MAT_H */
00448 
00449 #define GAN_MATTYPE Gan_Matrix23
00450 #define GAN_MATRIX_TYPE Gan_Matrix
00451 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
00452 #define GAN_VECTOR_TYPE Gan_Vector
00453 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
00454 #define GAN_REALTYPE double
00455 #define GAN_VECTYPE1 Gan_Vector2
00456 #define GAN_VECTYPE2 Gan_Vector3
00457 #define GAN_MATTYPEL Gan_Matrix22
00458 #define GAN_MATTYPER Gan_Matrix33
00459 #define GAN_SQUMATTYPEL Gan_SquMatrix22
00460 #define GAN_SQUMATTYPER Gan_SquMatrix33
00461 #define GAN_MAT_FPRINT                     gan_mat23_fprint
00462 #define GAN_MAT_PRINT                      gan_mat23_print
00463 #define GAN_MAT_FSCANF                     gan_mat23_fscanf
00464 #define GAN_MAT_FWRITE                     gan_mat23_fwrite
00465 #define GAN_MAT_FREAD                      gan_mat23_fread
00466 #define GAN_MAT_ZERO_Q                     gan_mat23_zero_q
00467 #define GAN_MAT_ZERO_S                     gan_mat23_zero_s
00468 #define GAN_MAT_COPY_Q                     gan_mat23_copy_q
00469 #define GAN_MAT_COPY_S                     gan_mat23_copy_s
00470 #define GAN_MAT_SCALE_Q                    gan_mat23_scale_q
00471 #define GAN_MAT_SCALE_I                    gan_mat23_scale_i
00472 #define GAN_MAT_SCALE_S                    gan_mat23_scale_s
00473 #define GAN_MAT_DIVIDE_Q                   gan_mat23_divide_q
00474 #define GAN_MAT_DIVIDE_I                   gan_mat23_divide_i
00475 #define GAN_MAT_DIVIDE_S                   gan_mat23_divide_s
00476 #define GAN_MAT_NEGATE_Q                   gan_mat23_negate_q
00477 #define GAN_MAT_NEGATE_I                   gan_mat23_negate_i
00478 #define GAN_MAT_NEGATE_S                   gan_mat23_negate_s
00479 #define GAN_MAT_UNIT_Q                     gan_mat23_unit_q
00480 #define GAN_MAT_UNIT_I                     gan_mat23_unit_i
00481 #define GAN_MAT_UNIT_S                     gan_mat23_unit_s
00482 #define GAN_MAT_ADD_Q                      gan_mat23_add_q
00483 #define GAN_MAT_ADD_I1                     gan_mat23_add_i1
00484 #define GAN_MAT_ADD_I2                     gan_mat23_add_i2
00485 #define GAN_MAT_INCREMENT                  gan_mat23_increment
00486 #define GAN_MAT_ADD_S                      gan_mat23_add_s
00487 #define GAN_MAT_SUB_Q                      gan_mat23_sub_q
00488 #define GAN_MAT_SUB_I1                     gan_mat23_sub_i1
00489 #define GAN_MAT_SUB_I2                     gan_mat23_sub_i2
00490 #define GAN_MAT_DECREMENT                  gan_mat23_decrement
00491 #define GAN_MAT_SUB_S                      gan_mat23_sub_s
00492 #define GAN_VEC_OUTER_Q                    gan_vec23_outer_q
00493 #define GAN_VEC_OUTER_S                    gan_vec23_outer_s
00494 #define GAN_MAT_MULTV_Q                    gan_mat23_multv3_q
00495 #define GAN_MAT_MULTV_S                    gan_mat23_multv3_s
00496 #define GAN_MATT_MULTV_Q                   gan_mat23T_multv2_q
00497 #define GAN_MATT_MULTV_S                   gan_mat23T_multv2_s
00498 #define GAN_MAT_LMULTM_Q                   gan_mat23_lmultm22_q
00499 #define GAN_MAT_LMULTM_S                   gan_mat23_lmultm22_s
00500 #define GAN_MAT_LMULTMT_Q                  gan_mat23_lmultm22T_q
00501 #define GAN_MAT_LMULTMT_S                  gan_mat23_lmultm22T_s
00502 #define GAN_MAT_RMULTM_Q                   gan_mat23_rmultm33_q
00503 #define GAN_MAT_RMULTM_S                   gan_mat23_rmultm33_s
00504 #define GAN_MAT_RMULTMT_Q                  gan_mat23_rmultm33T_q
00505 #define GAN_MAT_RMULTMT_S                  gan_mat23_rmultm33T_s
00506 #define GAN_MAT_LMULTMT_SYM_Q              gan_mat23_lmultm23T_sym_q
00507 #define GAN_MAT_LMULTMT_SYM_S              gan_mat23_lmultm23T_sym_s
00508 #define GAN_MAT_RMULTMT_SYM_Q              gan_mat23_rmultm23T_sym_q
00509 #define GAN_MAT_RMULTMT_SYM_S              gan_mat23_rmultm23T_sym_s
00510 #define GAN_MAT_SLMULTT_Q                  gan_mat23_slmultT_q
00511 #define GAN_MAT_SLMULTT_S                  gan_mat23_slmultT_s
00512 #define GAN_MAT_SRMULTT_Q                  gan_mat23_srmultT_q
00513 #define GAN_MAT_SRMULTT_S                  gan_mat23_srmultT_s
00514 #define GAN_MAT_LMULTS_Q                   gan_mat23_lmults22_q
00515 #define GAN_MAT_LMULTS_S                   gan_mat23_lmults22_s
00516 #define GAN_MAT_RMULTS_Q                   gan_mat23_rmults33_q
00517 #define GAN_MAT_RMULTS_S                   gan_mat23_rmults33_s
00518 #define GAN_SYMMATL_LRMULT_Q               gan_symmat22_lrmultm23T_q
00519 #define GAN_SYMMATL_LRMULT_S               gan_symmat22_lrmultm23T_s
00520 #define GAN_SYMMATR_LRMULT_Q               gan_symmat33_lrmultm23_q
00521 #define GAN_SYMMATR_LRMULT_S               gan_symmat33_lrmultm23_s
00522 #define GAN_MAT_LMULTL_Q                   gan_mat23_lmultl22_q
00523 #define GAN_MAT_LMULTL_S                   gan_mat23_lmultl22_s
00524 #define GAN_MAT_LMULTL_I                   gan_mat23_lmultl22_i
00525 #define GAN_MAT_LMULTLI_Q                  gan_mat23_lmultl22I_q
00526 #define GAN_MAT_LMULTLI_S                  gan_mat23_lmultl22I_s
00527 #define GAN_MAT_LMULTLI_I                  gan_mat23_lmultl22I_i
00528 #define GAN_MAT_LMULTLT_Q                  gan_mat23_lmultl22T_q
00529 #define GAN_MAT_LMULTLT_S                  gan_mat23_lmultl22T_s
00530 #define GAN_MAT_LMULTLT_I                  gan_mat23_lmultl22T_i
00531 #define GAN_MAT_LMULTLIT_Q                 gan_mat23_lmultl22IT_q
00532 #define GAN_MAT_LMULTLIT_S                 gan_mat23_lmultl22IT_s
00533 #define GAN_MAT_LMULTLIT_I                 gan_mat23_lmultl22IT_i
00534 #define GAN_MAT_RMULTL_Q                   gan_mat23_rmultl33_q
00535 #define GAN_MAT_RMULTL_S                   gan_mat23_rmultl33_s
00536 #define GAN_MAT_RMULTL_I                   gan_mat23_rmultl33_i
00537 #define GAN_MAT_RMULTLI_Q                  gan_mat23_rmultl33I_q
00538 #define GAN_MAT_RMULTLI_S                  gan_mat23_rmultl33I_s
00539 #define GAN_MAT_RMULTLI_I                  gan_mat23_rmultl33I_i
00540 #define GAN_MAT_RMULTLT_Q                  gan_mat23_rmultl33T_q
00541 #define GAN_MAT_RMULTLT_S                  gan_mat23_rmultl33T_s
00542 #define GAN_MAT_RMULTLT_I                  gan_mat23_rmultl33T_i
00543 #define GAN_MAT_RMULTLIT_Q                 gan_mat23_rmultl33IT_q
00544 #define GAN_MAT_RMULTLIT_S                 gan_mat23_rmultl33IT_s
00545 #define GAN_MAT_RMULTLIT_I                 gan_mat23_rmultl33IT_i
00546 #define GAN_MAT_SUMSQR_Q                   gan_mat23_sumsqr_q
00547 #define GAN_MAT_SUMSQR_S                   gan_mat23_sumsqr_s
00548 #define GAN_MAT_FNORM_Q                    gan_mat23_Fnorm_q
00549 #define GAN_MAT_FNORM_S                    gan_mat23_Fnorm_s
00550 #define GAN_MAT_FROM_MAT_Q                 gan_mat23_from_mat_q
00551 #define GAN_MAT_FROM_MAT_S                 gan_mat23_from_mat_s
00552 
00553 #ifndef _GAN_2X3MAT_H
00554 #define _GAN_2X3MAT_H
00555 
00556 
00557 #endif /* #ifndef _GAN_2X3MAT_H */
00558 
00571 /* This library is free software; you can redistribute it and/or
00572    modify it under the terms of the GNU Lesser General Public
00573    License as published by the Free Software Foundation; either
00574    version 2.1 of the License, or (at your option) any later version.
00575 
00576    This library is distributed in the hope that it will be useful,
00577    but WITHOUT ANY WARRANTY; without even the implied warranty of
00578    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00579    Lesser General Public License for more details.
00580 
00581    You should have received a copy of the GNU Lesser General Public
00582    License along with this library; if not, write to the Free Software
00583    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00584 */
00585 
00586 /* function declarations for functions common to all small vector types */
00587 
00588 
00589 
00590 /* documentation for macros defined in individual header files */
00591 
00602 Gan_Matrix23 *gan_mat23_zero_q ( Gan_Matrix23 *A );
00603 
00620 Gan_Matrix23 *gan_mat23_copy_q ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00621 
00639 Gan_Matrix23 *gan_mat23_scale_q ( Gan_Matrix23 *A, double a,
00640                                Gan_Matrix23 *B );
00641 
00649 Gan_Matrix23 *gan_mat23_scale_i ( Gan_Matrix23 *A, double a );
00650 
00659 Gan_Matrix23 *gan_mat23_divide_q ( Gan_Matrix23 *A, double a,
00660                                 Gan_Matrix23 *B );
00661 
00669 Gan_Matrix23 *gan_mat23_divide_i ( Gan_Matrix23 *A, double a );
00670 
00678 Gan_Matrix23 *gan_mat23_negate_q ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00679 
00687 Gan_Matrix23 *gan_mat23_negate_i ( Gan_Matrix23 *A );
00688 
00696 Gan_Matrix23 *gan_mat23_unit_i ( Gan_Matrix23 *A );
00697 
00715 Gan_Matrix23 *gan_mat23_add_q ( Gan_Matrix23 *A, Gan_Matrix23 *B, Gan_Matrix23 *C );
00716 
00725 Gan_Matrix23 *gan_mat23_add_i1 ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00726 
00735 Gan_Matrix23 *gan_mat23_add_i2 ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00736 
00745 Gan_Matrix23 *gan_mat23_increment ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00746 
00764 Gan_Matrix23 *gan_mat23_sub_q ( Gan_Matrix23 *A, Gan_Matrix23 *B, Gan_Matrix23 *C );
00765 
00774 Gan_Matrix23 *gan_mat23_sub_i1 ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00775 
00784 Gan_Matrix23 *gan_mat23_sub_i2 ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00785 
00794 Gan_Matrix23 *gan_mat23_decrement ( Gan_Matrix23 *A, Gan_Matrix23 *B );
00795 
00813 Gan_Matrix23 *gan_vec23_outer_q ( Gan_Vector2 *p, Gan_Vector3 *q,
00814                                Gan_Matrix23 *A );
00815 
00824 Gan_Vector2 *gan_mat23_multv3_q ( Gan_Matrix23 *A, Gan_Vector3 *p,
00825                                 Gan_Vector2 *q );
00826 
00827 
00836 Gan_Vector3 *gan_mat23T_multv2_q ( Gan_Matrix23 *A, Gan_Vector2 *p,
00837                                  Gan_Vector3 *q );
00838 
00839 
00858 Gan_Matrix23 *gan_mat23_lmultm22_q ( Gan_Matrix23 *A, Gan_Matrix22 *B,
00859                                 Gan_Matrix23 *C );
00860 
00870 Gan_Matrix23 *gan_mat23_lmultm22T_q ( Gan_Matrix23 *A, Gan_Matrix22 *B,
00871                                  Gan_Matrix23 *C );
00872 
00882 Gan_Matrix23 *gan_mat23_rmultm33_q ( Gan_Matrix23 *A, Gan_Matrix33 *B,
00883                                 Gan_Matrix23 *C );
00884 
00894 Gan_Matrix23 *gan_mat23_rmultm33T_q ( Gan_Matrix23 *A, Gan_Matrix33 *B,
00895                                  Gan_Matrix23 *C );
00896 
00908 Gan_SquMatrix33 *gan_mat23_lmultm23T_sym_q ( Gan_Matrix23 *A, Gan_Matrix23 *B,
00909                                          Gan_SquMatrix33 *C );
00910 
00922 Gan_SquMatrix22 *gan_mat23_rmultm23T_sym_q ( Gan_Matrix23 *A, Gan_Matrix23 *B,
00923                                          Gan_SquMatrix22 *C );
00924 
00933 Gan_Matrix23 *gan_mat23_lmults22_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B,
00934                                 Gan_Matrix23 *C );
00935 
00944 Gan_Matrix23 *gan_mat23_rmults33_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B,
00945                                 Gan_Matrix23 *C );
00946 
00966 Gan_SquMatrix33 *gan_symmat22_lrmultm23T_q ( Gan_SquMatrix22 *A, Gan_Matrix23 *B,
00967                                         Gan_Matrix23 *C, Gan_SquMatrix33 *D );
00968 
00979 Gan_SquMatrix22 *gan_symmat33_lrmultm23_q ( Gan_SquMatrix33 *A, Gan_Matrix23 *B,
00980                                         Gan_Matrix23 *C, Gan_SquMatrix22 *D );
00981 
01000 Gan_Matrix23 *gan_mat23_lmultl22_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B,
01001                                 Gan_Matrix23 *C );
01002 
01012 Gan_Matrix23 *gan_mat23_lmultl22I_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B,
01013                                  Gan_Matrix23 *C );
01014 
01024 Gan_Matrix23 *gan_mat23_lmultl22T_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B,
01025                                  Gan_Matrix23 *C );
01026 
01036 Gan_Matrix23 *gan_mat23_lmultl22IT_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B,
01037                                   Gan_Matrix23 *C );
01038 
01048 Gan_Matrix23 *gan_mat23_rmultl33_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B,
01049                                 Gan_Matrix23 *C );
01050 
01060 Gan_Matrix23 *gan_mat23_rmultl33I_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B,
01061                                  Gan_Matrix23 *C );
01062 
01072 Gan_Matrix23 *gan_mat23_rmultl33T_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B,
01073                                  Gan_Matrix23 *C );
01074 
01084 Gan_Matrix23 *gan_mat23_rmultl33IT_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B,
01085                                   Gan_Matrix23 *C );
01086 
01096 Gan_Matrix23 *gan_mat23_lmultl22_i ( Gan_Matrix23 *A, Gan_SquMatrix22 *B );
01097 
01107 Gan_Matrix23 *gan_mat23_lmultl22I_i ( Gan_Matrix23 *A, Gan_SquMatrix22 *B );
01108 
01118 Gan_Matrix23 *gan_mat23_lmultl22T_i ( Gan_Matrix23 *A, Gan_SquMatrix22 *B );
01119 
01129 Gan_Matrix23 *gan_mat23_lmultl22IT_i ( Gan_Matrix23 *A, Gan_SquMatrix22 *B );
01130 
01140 Gan_Matrix23 *gan_mat23_rmultl33_i ( Gan_Matrix23 *A, Gan_SquMatrix33 *B );
01141 
01151 Gan_Matrix23 *gan_mat23_rmultl33I_i ( Gan_Matrix23 *A, Gan_SquMatrix33 *B );
01152 
01162 Gan_Matrix23 *gan_mat23_rmultl33T_i ( Gan_Matrix23 *A, Gan_SquMatrix33 *B );
01163 
01173 Gan_Matrix23 *gan_mat23_rmultl33IT_i ( Gan_Matrix23 *A, Gan_SquMatrix33 *B );
01174 
01183 Gan_SquMatrix33 *gan_mat23_slmultT_q ( Gan_Matrix23 *A, Gan_SquMatrix33 *B );
01184 
01185 
01194 Gan_SquMatrix22 *gan_mat23_srmultT_q ( Gan_Matrix23 *A, Gan_SquMatrix22 *B );
01195 
01196 
01211 double gan_mat23_sumsqr_q ( Gan_Matrix23 *A );
01212 
01219 double gan_mat23_Fnorm_q ( Gan_Matrix23 *A );
01220 
01238 Gan_Matrix23 *gan_mat23_from_mat_q ( Gan_Matrix *A, Gan_Matrix23 *B );
01239 
01240 
01241 
01260 /* This library is free software; you can redistribute it and/or
01261    modify it under the terms of the GNU Lesser General Public
01262    License as published by the Free Software Foundation; either
01263    version 2.1 of the License, or (at your option) any later version.
01264 
01265    This library is distributed in the hope that it will be useful,
01266    but WITHOUT ANY WARRANTY; without even the implied warranty of
01267    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01268    Lesser General Public License for more details.
01269 
01270    You should have received a copy of the GNU Lesser General Public
01271    License along with this library; if not, write to the Free Software
01272    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01273 */
01274 
01275 #undef GAN_MATTYPE
01276 #undef GAN_MATRIX_TYPE
01277 #undef GAN_SQUMATRIX_TYPE
01278 #undef GAN_VECTOR_TYPE
01279 #undef GAN_MAT_ELEMENT_TYPE
01280 #undef GAN_REALTYPE
01281 #undef GAN_VECTYPE1
01282 #undef GAN_VECTYPE2
01283 #undef GAN_MATTYPEL
01284 #undef GAN_MATTYPER
01285 #undef GAN_SQUMATTYPEL
01286 #undef GAN_SQUMATTYPER
01287 #undef GAN_FIXED_MATRIX_TYPE
01288 #undef GAN_MAT_FPRINT
01289 #undef GAN_MAT_PRINT
01290 #undef GAN_MAT_FSCANF
01291 #undef GAN_MAT_FWRITE
01292 #undef GAN_MAT_FREAD
01293 #undef GAN_MAT_ZERO_Q
01294 #undef GAN_MAT_ZERO_S
01295 #undef GAN_MAT_COPY_Q
01296 #undef GAN_MAT_COPY_S
01297 #undef GAN_MAT_SCALE_Q
01298 #undef GAN_MAT_SCALE_S
01299 #undef GAN_MAT_SCALE_I
01300 #undef GAN_MAT_DIVIDE_Q
01301 #undef GAN_MAT_DIVIDE_S
01302 #undef GAN_MAT_DIVIDE_I
01303 #undef GAN_MAT_NEGATE_Q
01304 #undef GAN_MAT_NEGATE_S
01305 #undef GAN_MAT_NEGATE_I
01306 #undef GAN_MAT_UNIT_Q
01307 #undef GAN_MAT_UNIT_S
01308 #undef GAN_MAT_UNIT_I
01309 #undef GAN_MAT_ADD_Q
01310 #undef GAN_MAT_ADD_I1
01311 #undef GAN_MAT_ADD_I2
01312 #undef GAN_MAT_INCREMENT
01313 #undef GAN_MAT_ADD_S
01314 #undef GAN_MAT_SUB_Q
01315 #undef GAN_MAT_SUB_I1
01316 #undef GAN_MAT_SUB_I2
01317 #undef GAN_MAT_DECREMENT
01318 #undef GAN_MAT_SUB_S
01319 #undef GAN_VEC_OUTER_Q
01320 #undef GAN_VEC_OUTER_S
01321 #undef GAN_MAT_MULTV_Q
01322 #undef GAN_MAT_MULTV_S
01323 #undef GAN_MAT_MULTV_I
01324 #undef GAN_MATT_MULTV_Q
01325 #undef GAN_MATT_MULTV_S
01326 #undef GAN_MATT_MULTV_I
01327 #undef GAN_MAT_LMULTM_Q
01328 #undef GAN_MAT_LMULTM_S
01329 #undef GAN_MAT_LMULTMT_Q
01330 #undef GAN_MAT_LMULTMT_S
01331 #undef GAN_MAT_RMULTM_Q
01332 #undef GAN_MAT_RMULTM_S
01333 #undef GAN_MAT_RMULTMT_Q
01334 #undef GAN_MAT_RMULTMT_S
01335 #undef GAN_MAT_LMULTMT_SYM_Q
01336 #undef GAN_MAT_LMULTMT_SYM_S
01337 #undef GAN_MAT_RMULTMT_SYM_Q
01338 #undef GAN_MAT_RMULTMT_SYM_S
01339 #undef GAN_MAT_LMULTS_Q
01340 #undef GAN_MAT_LMULTS_S
01341 #undef GAN_MAT_RMULTS_Q
01342 #undef GAN_MAT_RMULTS_S
01343 #undef GAN_SYMMATL_LRMULT_Q
01344 #undef GAN_SYMMATL_LRMULT_S
01345 #undef GAN_SYMMATR_LRMULT_Q
01346 #undef GAN_SYMMATR_LRMULT_S
01347 #undef GAN_MAT_LMULTL_Q
01348 #undef GAN_MAT_LMULTL_S
01349 #undef GAN_MAT_LMULTL_I
01350 #undef GAN_MAT_LMULTLI_Q
01351 #undef GAN_MAT_LMULTLI_S
01352 #undef GAN_MAT_LMULTLI_I
01353 #undef GAN_MAT_LMULTLT_Q
01354 #undef GAN_MAT_LMULTLT_S
01355 #undef GAN_MAT_LMULTLT_I
01356 #undef GAN_MAT_LMULTLIT_Q
01357 #undef GAN_MAT_LMULTLIT_S
01358 #undef GAN_MAT_LMULTLIT_I
01359 #undef GAN_MAT_RMULTL_Q
01360 #undef GAN_MAT_RMULTL_S
01361 #undef GAN_MAT_RMULTL_I
01362 #undef GAN_MAT_RMULTLI_Q
01363 #undef GAN_MAT_RMULTLI_S
01364 #undef GAN_MAT_RMULTLI_I
01365 #undef GAN_MAT_RMULTLT_Q
01366 #undef GAN_MAT_RMULTLT_S
01367 #undef GAN_MAT_RMULTLT_I
01368 #undef GAN_MAT_RMULTLIT_Q
01369 #undef GAN_MAT_RMULTLIT_S
01370 #undef GAN_MAT_RMULTLIT_I
01371 #undef GAN_MAT_SRMULTT_Q
01372 #undef GAN_MAT_SRMULTT_S
01373 #undef GAN_MAT_SRMULTT_I
01374 #undef GAN_MAT_SLMULTT_Q
01375 #undef GAN_MAT_SLMULTT_S
01376 #undef GAN_MAT_SLMULTT_I
01377 #undef GAN_MAT_RMULTLIT_S
01378 #undef GAN_MAT_SUMSQR_Q
01379 #undef GAN_MAT_SUMSQR_S
01380 #undef GAN_MAT_FNORM_Q
01381 #undef GAN_MAT_FNORM_S
01382 #undef GAN_MAT_FROM_MAT_Q
01383 #undef GAN_MAT_FROM_MAT_S
01384 #undef GAN_MAT_FROM_SQUMAT_Q
01385 #undef GAN_MAT_FROM_SQUMAT_S
01386 #undef GAN_SQUMAT_FROM_SQUMAT_Q
01387 #undef GAN_SQUMAT_FROM_SQUMAT_S
01388 
01401 #ifdef __cplusplus
01402 }
01403 #endif
01404 
01405 #endif /* #ifndef _GAN_2X3MATRIX_H */

Generated on Mon Oct 13 16:14:30 2003 by doxygen1.3-rc1