Main Page   Modules   Compound List   File List   Compound Members   File Members  

2x2matrix.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_2X2MATRIX_H
00030 #define _GAN_2X2MATRIX_H
00031 
00032 #include <stdlib.h>
00033 #include <math.h>
00034 #include <stdio.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_REPEAT22_H
00065 #define _GAN_REPEAT22_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_REPEAT1_H
00096 #define _GAN_REPEAT1_H
00097 
00098 #ifdef __cplusplus
00099 extern "C" {
00100 #endif
00101 
00102 /* macros for constructing one-fold repetitions (for consistency) */
00103 #define GAN_REP1_AS(a,b,p1) (a p1 b)
00104 #define GAN_REP1_A(a,p1) (a p1)
00105 #define GAN_REP1_A_C(a,b) GAN_REP1_A(a,b,x)
00106 
00107 #define GAN_FREP1_A(a,b,p1,q1) (a p1 b q1)
00108 #define GAN_FREP1_A_C(a,b,p1) GAN_FREP1_A(a,b,x,p1)
00109 
00110 #define GAN_REP1_ABS(a,b,c,p1,q1) (a p1 b q1 c)
00111 #define GAN_REP1_AAS(a,b,c,p1) GAN_REP1_ABS(a,b,c,p1,p1)
00112 #define GAN_REP1_AAS_C(a,b,c) GAN_REP1_AAS(a,b,c,x)
00113 
00114 #define GAN_REP1_AB(a,b,p1,q1) (a p1 b q1)
00115 #define GAN_REP1_AA(a,b,p1) GAN_REP1_AB(a,b,p1,p1)
00116 #define GAN_REP1_AA_C(a,b) GAN_REP1_AA(a,b,x)
00117 
00118 #define GAN_REP1_ABCS(a,b,c,d,p1,q1,r1) (a p1 b q1 c r1 d)
00119 #define GAN_REP1_ABC(a,b,c,p1,q1,r1) (a p1 b q1 c r1)
00120 #define GAN_REP1_AAA(a,b,c,p1) GAN_REP1_ABC(a,b,c,p1,p1,p1)
00121 #define GAN_REP1_AAA_C(a,b,c) GAN_REP1_AAA(a,b,c,x)
00122 
00123 #define GAN_REP1_OP_AB(a,b,p1,q1,op) (a p1 b q1)
00124 #define GAN_REP1_OP_AA(a,b,p1,op) GAN_REP1_OP_AB(a,b,p1,p1,op)
00125 #define GAN_REP1_OP_AA_C(a,b,op) GAN_REP1_OP_AA(a,b,x,op)
00126 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif /* #ifndef _GAN_REPEAT1_H */
00132 
00145 /* This library is free software; you can redistribute it and/or
00146    modify it under the terms of the GNU Lesser General Public
00147    License as published by the Free Software Foundation; either
00148    version 2.1 of the License, or (at your option) any later version.
00149 
00150    This library is distributed in the hope that it will be useful,
00151    but WITHOUT ANY WARRANTY; without even the implied warranty of
00152    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00153    Lesser General Public License for more details.
00154 
00155    You should have received a copy of the GNU Lesser General Public
00156    License along with this library; if not, write to the Free Software
00157    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00158 */
00159 
00160 #ifndef _GAN_REPEAT2_H
00161 #define _GAN_REPEAT2_H
00162 
00163 #ifdef __cplusplus
00164 extern "C" {
00165 #endif
00166 
00167 /* macros for constructing two-fold repetitions */
00168 #define GAN_REP2_AS(a,b,p1,p2) (a p1 b, a p2 b)
00169 #define GAN_REP2_A(a,p1,p2) (a p1, a p2)
00170 #define GAN_REP2_AS_C(a,b) GAN_REP2_AS(a,b,x,y)
00171 #define GAN_REP2_A_C(a) GAN_REP2_A(a,x,y)
00172 
00173 #define GAN_FREP2_A(a,b,p1,p2,q1,q2) (a p1 b q1, a p2 b q2)
00174 #define GAN_FREP2_A_C(a,b,p1,p2) GAN_FREP2_A(a,b,x,y,p1,p2)
00175 
00176 #define GAN_REP2_AB(a,b,p1,p2,q1,q2) (a p1 b q1, a p2 b q2)
00177 #define GAN_REP2_AA(a,b,p1,p2) GAN_REP2_AB(a,b,p1,p2,p1,p2)
00178 #define GAN_REP2_AA_C(a,b) GAN_REP2_AA(a,b,x,y)
00179 
00180 #define GAN_REP2_ABS(a,b,c,p1,p2,q1,q2) (a p1 b q1 c, a p2 b q2 c)
00181 #define GAN_REP2_AAS(a,b,c,p1,p2) GAN_REP2_ABS(a,b,c,p1,p2,p1,p2)
00182 #define GAN_REP2_AAS_C(a,b,c) GAN_REP2_AAS(a,b,c,x,y)
00183 
00184 #define GAN_REP2_AB(a,b,p1,p2,q1,q2) (a p1 b q1, a p2 b q2)
00185 #define GAN_REP2_AA(a,b,p1,p2) GAN_REP2_AB(a,b,p1,p2,p1,p2)
00186 #define GAN_REP2_AA_C(a,b) GAN_REP2_AA(a,b,x,y)
00187 
00188 #define GAN_REP2_ABCS(a,b,c,d,p1,p2,q1,q2,r1,r2)\
00189            (a p1 b q1 c r1 d, a p2 b q2 c r2 d)
00190 #define GAN_REP2_ABC(a,b,c,p1,p2,q1,q2,r1,r2)\
00191            (a p1 b q1 c r1, a p2 b q2 c r2)
00192 #define GAN_REP2_AAA(a,b,c,p1,p2) GAN_REP2_ABC(a,b,c,p1,p2,p1,p2,p1,p2)
00193 #define GAN_REP2_AAA_C(a,b,c) GAN_REP2_AAA(a,b,c,x,y)
00194 
00195 #define GAN_REP2_OP_AB(a,b,p1,p2,q1,q2,op)\
00196            (a p1 b q1 op a p2 b q2)
00197 #define GAN_REP2_OP_AA(a,b,p1,p2,op) GAN_REP2_OP_AB(a,b,p1,p2,p1,p2,op)
00198 #define GAN_REP2_OP_AA_C(a,b,op) GAN_REP2_OP_AA(a,b,x,y,op)
00199 
00200 #ifdef __cplusplus
00201 }
00202 #endif
00203 
00204 #endif /* #ifndef _GAN_REPEAT2_H */
00205 
00206 #ifdef __cplusplus
00207 extern "C" {
00208 #endif
00209 
00210 /* macros for constructing dual two-fold repetitions */
00211 
00212 #define GAN_FREP22_A(a,b,p1,p2,q1,q2,r11,r12,r21,r22)\
00213            (GAN_FREP2_A(a,b,p1##q1,p1##q2,r11,r12),\
00214             GAN_FREP2_A(a,b,p2##q1,p2##q2,r21,r22))
00215 #define GAN_FREP22_A_C(a,b,r11,r12,r21,r22) \
00216            GAN_FREP22_A(a,b,x,y,x,y,r11,r12,r21,r22)
00217 
00218 /* most general macros */
00219 #define GAN_REP22_ABCS(a,b,c,d,p1,p2,q1,q2,r1,r2,s1,s2,t1,t2,u1,u2)\
00220  (GAN_REP2_ABCS(a,b,c,d,p1##q1,p1##q2,r1##s1,r1##s2,t1##u1,t1##u2),\
00221   GAN_REP2_ABCS(a,b,c,d,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2))
00222 #define GAN_REP22_ABC(a,b,c,p1,p2,q1,q2,r1,r2,s1,s2,t1,t2,u1,u2)\
00223  (GAN_REP2_ABC(a,b,c,p1##q1,p1##q2,r1##s1,r1##s2,t1##u1,t1##u2),\
00224   GAN_REP2_ABC(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2))
00225 
00226 #define GAN_REP22_AAAS(a,b,c,d,p1,p2,q1,q2)\
00227            GAN_REP22_ABCS(a,b,c,d,p1,p2,q1,q2,p1,p2,q1,q2,p1,p2,q1,q2)
00228 #define GAN_REP22_AAA(a,b,c,p1,p2,q1,q2)\
00229            GAN_REP22_ABC(a,b,c,p1,p2,q1,q2,p1,p2,q1,q2,p1,p2,q1,q2)
00230 
00231 #define GAN_REP22_ABS(a,b,c,p1,p2,q1,q2,r1,r2,s1,s2)\
00232  (GAN_REP2_ABS(a,b,c,p1##q1,p1##q2,r1##s1,r1##s2),\
00233   GAN_REP2_ABS(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2))
00234 #define GAN_REP22_AB(a,b,p1,p2,q1,q2,r1,r2,s1,s2)\
00235  (GAN_REP2_AB(a,b,p1##q1,p1##q2,r1##s1,r1##s2),\
00236   GAN_REP2_AB(a,b,p2##q1,p2##q2,r2##s1,r2##s2))
00237 
00238 #define GAN_REP22_AAS(a,b,c,p1,p2,q1,q2)\
00239             GAN_REP22_ABS(a,b,c,p1,p2,q1,q2,p1,p2,q1,q2)
00240 #define GAN_REP22_AA(a,b,p1,p2,q1,q2)\
00241             GAN_REP22_AB(a,b,p1,p2,q1,q2,p1,p2,q1,q2)
00242 
00243 #define GAN_REP22_AS(a,b,p1,p2,q1,q2)\
00244  (GAN_REP2_AS(a,b,p1##q1,p1##q2), GAN_REP2_AS(a,b,p2##q1,p2##q2))
00245 #define GAN_REP22_A(a,p1,p2,q1,q2)\
00246  (GAN_REP2_A(a,p1##q1,p1##q2), GAN_REP2_A(a,p2##q1,p2##q2))
00247 
00248 /* macros specific to xx, xy etc coordinates */
00249 #define GAN_REP22_AS_C(a,b) GAN_REP22_AS(a,b,x,y,x,y)
00250 #define GAN_REP22_AAS_C(a,b,c) GAN_REP22_AAS(a,b,c,x,y,x,y)
00251 #define GAN_REP22_AAAS_C(a,b,c,d) GAN_REP22_AAAS(a,b,c,d,x,y,x,y)
00252 #define GAN_REP22_A_C(a) GAN_REP22_A(a,x,y,x,y)
00253 #define GAN_REP22_AA_C(a,b) GAN_REP22_AA(a,b,x,y,x,y)
00254 #define GAN_REP22_AAA_C(a,b,c) GAN_REP22_AAA(a,b,c,x,y,x,y)
00255 
00256 /* macro for transpose operation */
00257 #define GAN_REP22_AAT(a,b,p1,p2,q1,q2)\
00258  (GAN_REP2_AB(a,b,p1##q1,p1##q2,p1##q1,p2##q1),\
00259   GAN_REP2_AB(a,b,p2##q1,p2##q2,p1##q2,p2##q2))
00260 #define GAN_REP22_AAT_C(a,b) GAN_REP22_AAT(a,b,x,y,x,y)
00261 
00262 /* macros for operations on lower triangle of matrices only */
00263 #define GAN_FREP22L_A(a,b,p1,p2,q1,q2,r11,r21,r22)\
00264  (GAN_FREP1_A(a,b,p1##q1,r11),\
00265   GAN_FREP2_A(a,b,p2##q1,p2##q2,r21,r22))
00266 #define GAN_FREP22L_A_C(a,b,r11,r21,r22) \
00267            GAN_FREP22L_A(a,b,x,y,x,y,r11,r21,r22)
00268 
00269 #define GAN_REP22L_ABCS(a,b,c,d,p1,p2,q1,q2,r1,r2,s1,s2,t1,t2,u1,u2)\
00270  (GAN_REP1_ABCS(a,b,c,d,p1##q1,r1##s1,t1##u1),\
00271   GAN_REP2_ABCS(a,b,c,d,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2))
00272 #define GAN_REP22L_ABC(a,b,c,p1,p2,q1,q2,r1,r2,s1,s2,t1,t2,u1,u2)\
00273  (GAN_REP1_ABC(a,b,c,p1##q1,r1##s1,t1##u1),\
00274   GAN_REP2_ABC(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2))
00275 #define GAN_REP22L_AAAS(a,b,c,d,p1,p2,q1,q2)\
00276            GAN_REP22L_ABCS(a,b,c,d,p1,p2,q1,q2,p1,p2,q1,q2,p1,p2,q1,q2)
00277 #define GAN_REP22L_AAA(a,b,c,p1,p2,q1,q2)\
00278            GAN_REP22L_ABC(a,b,c,p1,p2,q1,q2,p1,p2,q1,q2,p1,p2,q1,q2)
00279 #define GAN_REP22L_ABS(a,b,c,p1,p2,q1,q2,r1,r2,s1,s2)\
00280  (GAN_REP1_ABS(a,b,c,p1##q1,r1##s1),\
00281   GAN_REP2_ABS(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2))
00282 #define GAN_REP22L_AB(a,b,p1,p2,q1,q2,r1,r2,s1,s2)\
00283  (GAN_REP1_AB(a,b,p1##q1,r1##s1),\
00284   GAN_REP2_AB(a,b,p2##q1,p2##q2,r2##s1,r2##s2))
00285 #define GAN_REP22L_AAS(a,b,c,p1,p2,q1,q2)\
00286            GAN_REP22L_ABS(a,b,c,p1,p2,q1,q2,p1,p2,q1,q2)
00287 #define GAN_REP22L_AA(a,b,p1,p2,q1,q2)\
00288            GAN_REP22L_AB(a,b,p1,p2,q1,q2,p1,p2,q1,q2)
00289 #define GAN_REP22L_AS(a,b,p1,p2,q1,q2)\
00290  (GAN_REP1_AS(a,b,p1##q1),\
00291   GAN_REP2_AS(a,b,p2##q1,p2##q2))
00292 #define GAN_REP22L_A(a,p1,p2,q1,q2)\
00293  (GAN_REP1_A(a,p1##q1),\
00294   GAN_REP2_A(a,p2##q1,p2##q2))
00295 #define GAN_REP22L_AS_C(a,b) GAN_REP22L_AS(a,b,x,y,x,y)
00296 #define GAN_REP22L_AAS_C(a,b,c) GAN_REP22L_AAS(a,b,c,x,y,x,y)
00297 #define GAN_REP22L_AAAS_C(a,b,c,d) GAN_REP22L_AAAS(a,b,c,d,x,y,x,y)
00298 #define GAN_REP22L_A_C(a) GAN_REP22L_A(a,x,y,x,y)
00299 #define GAN_REP22L_AA_C(a,b) GAN_REP22L_AA(a,b,x,y,x,y)
00300 #define GAN_REP22L_AAA_C(a,b,c) GAN_REP22L_AAA(a,b,c,x,y,x,y)
00301 #define GAN_FREP22L_A_C(a,b,r11,r21,r22)\
00302            GAN_FREP22L_A(a,b,x,y,x,y,r11,r21,r22)
00303 
00304 #ifdef __cplusplus
00305 }
00306 #endif
00307 
00308 #endif /* #ifndef _GAN_REPEAT22_H */
00309 #include <gandalf/linalg/2vector.h>
00323 /* This library is free software; you can redistribute it and/or
00324    modify it under the terms of the GNU Lesser General Public
00325    License as published by the Free Software Foundation; either
00326    version 2.1 of the License, or (at your option) any later version.
00327 
00328    This library is distributed in the hope that it will be useful,
00329    but WITHOUT ANY WARRANTY; without even the implied warranty of
00330    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00331    Lesser General Public License for more details.
00332 
00333    You should have received a copy of the GNU Lesser General Public
00334    License along with this library; if not, write to the Free Software
00335    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00336 */
00337 
00338 #endif /* #ifndef _GAN_MATVECF_MACROS_H */
00339 #include <gandalf/linalg/mat_gen.h>
00340 #include <gandalf/linalg/mat_square.h>
00341 
00342 #ifdef __cplusplus
00343 extern "C" {
00344 #endif
00345 
00361 
00362 typedef struct Gan_Matrix22
00363 {
00364    double xx, xy,
00365           yx, yy;
00366 } Gan_Matrix22;
00367 
00368 #ifndef NDEBUG
00369 
00370 typedef enum { GAN_SYMMETRIC_MATRIX22, GAN_LOWER_TRI_MATRIX22 }
00371  Gan_SquMatrix22Type;
00372 #endif /* #ifndef NDEBUG */
00373 
00375 typedef struct Gan_SquMatrix22
00376 {
00377 #ifndef NDEBUG
00378    /* square matrix type, for setting and checking in debug mode */
00379    Gan_SquMatrix22Type type;
00380 #endif /* #ifndef NDEBUG */
00381 
00382    /* matrix data */
00383    double xx,
00384           yx, yy;
00385 } Gan_SquMatrix22;
00386 
00387 /* matrix definitions specific to 2x2 matrices */
00388 #define GAN_ST22_FILL(A,t,XX,YX,YY)\
00389            (GAN_TEST_OP1(A,Gan_SquMatrix22),gan_eval((A)->type=t),\
00390             GAN_FREP22L_A_C((A)->,=,(XX),(YX),(YY)))
00391 #define GAN_ST22_IDENT(A,t)\
00392            (GAN_TEST_OP1(A,Gan_SquMatrix22),gan_eval((A)->type=t),\
00393             GAN_FREP22L_A_C((A)->,=,1.0,0.0,1.0))
00394 
00395 /* generic matrix multiply operations */
00396 #define GAN_MAT22_MULT1D(a,b,c,p1,p2,q1,q2)\
00397  (a p1 = GAN_REP2_OP_AB(b,* c,xx,xy,q1,q2,+),\
00398   a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+))
00399 #define GAN_MAT22T_MULT1D(a,b,c,p1,p2,q1,q2)\
00400  (a p1 = GAN_REP2_OP_AB(b,* c,xx,yx,q1,q2,+),\
00401   a p2 = GAN_REP2_OP_AB(b,* c,xy,yy,q1,q2,+))
00402 
00403 /* symmetric matrix multiply operation */
00404 #define GAN_SYM22_MULT1D(a,b,c,p1,p2,q1,q2)\
00405  (a p1 = GAN_REP2_OP_AB(b,* c,xx,yx,q1,q2,+),\
00406   a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+))
00407 
00408 /* lower triangular matrix multiply operations */
00409 #define GAN_LOW22_MULT1D(a,b,c,p1,p2,q1,q2)\
00410  (a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+),\
00411   a p1 = GAN_REP1_OP_AB(b,* c,xx,q1,+))
00412 #define GAN_LOW22I_MULT1D(a,b,c,p1,p2,q1,q2)\
00413  (a p1 =  c q1 / b xx,\
00414   a p2 = (c q2 - b yx * a p1) / b yy)
00415 
00416 /* upper triangular matrix multiply operations */
00417 #define GAN_UPP22_MULT1D(a,b,c,p1,p2,q1,q2)\
00418  (a p1 = GAN_REP2_OP_AB(b,* c,xx,yx,q1,q2,+),\
00419   a p2 = GAN_REP1_OP_AB(b,* c,yy,q2,+))
00420 #define GAN_UPP22I_MULT1D(a,b,c,p1,p2,q1,q2)\
00421  (a p2 =  c q2 / b yy,\
00422   a p1 = (c q1 - b yx * a p2) / b xx)
00423 
00424 /* symmetric/lower triangular square matrix definitions */
00425 #define GAN_ST22_ZERO(A,t)\
00426            (GAN_TEST_OP1(A,Gan_SquMatrix22), gan_eval((A)->type=t),\
00427             GAN_REP22L_AS_C((A)->,=0.0))
00428 #define GAN_ST22_COPY(A,B,t)\
00429            (GAN_TEST_OP2(A,B,Gan_SquMatrix22,Gan_SquMatrix22),\
00430             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00431             GAN_REP22L_AA_C((B)->,=(A)->))
00432 #define GAN_ST22_SCALE(A,a,B,t)\
00433            (GAN_TEST_OP2(A,B,Gan_SquMatrix22,Gan_SquMatrix22),\
00434             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00435             GAN_REP22L_AAS_C((B)->,=(A)->,*(a)))
00436 #define GAN_ST22_DIVIDE(A,a,B,t)\
00437            (GAN_TEST_OP2(A,B,Gan_SquMatrix22,Gan_SquMatrix22),\
00438             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00439             GAN_REP22L_AAS_C((B)->,=(A)->,/(a)))
00440 #define GAN_ST22_NEGATE(A,B,t)\
00441            (GAN_TEST_OP2(A,B,Gan_SquMatrix22,Gan_SquMatrix22),\
00442             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00443             GAN_REP22L_AA_C((B)->,=-(A)->))
00444 #define GAN_ST22_ADD(A,B,C,t)\
00445          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix22,Gan_SquMatrix22,Gan_SquMatrix22),\
00446           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00447           GAN_REP22L_AAA_C((C)->,=(A)->,+(B)->))
00448 #define GAN_ST22_SUB(A,B,C,t)\
00449          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix22,Gan_SquMatrix22,Gan_SquMatrix22),\
00450           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00451           GAN_REP22L_AAA_C((C)->,=(A)->,-(B)->))
00452 
00453 /* declare functions specific to generic 2x2 matrices */
00467 /* This library is free software; you can redistribute it and/or
00468    modify it under the terms of the GNU Lesser General Public
00469    License as published by the Free Software Foundation; either
00470    version 2.1 of the License, or (at your option) any later version.
00471 
00472    This library is distributed in the hope that it will be useful,
00473    but WITHOUT ANY WARRANTY; without even the implied warranty of
00474    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00475    Lesser General Public License for more details.
00476 
00477    You should have received a copy of the GNU Lesser General Public
00478    License along with this library; if not, write to the Free Software
00479    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00480 */
00481 
00482 #ifndef _GAN_2X2MAT_H
00483 
00498 Gan_Matrix22 *gan_mat22_fill_q ( Gan_Matrix22 *A, double XX, double XY,
00499                                  double YX, double YY );
00500 
00521 void gan_mat22_get_rows_q ( Gan_Matrix22 *A, Gan_Vector2 *p, Gan_Vector2 *q );
00522 
00534 void gan_mat22_get_cols_q ( Gan_Matrix22 *A, Gan_Vector2 *p, Gan_Vector2 *q );
00535 
00541 #endif /* #ifndef _GAN_2X2MAT_H */
00542 
00543 #define GAN_MATTYPE Gan_Matrix22
00544 #define GAN_MATRIX_TYPE Gan_Matrix
00545 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
00546 #define GAN_VECTOR_TYPE Gan_Vector
00547 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
00548 #define GAN_REALTYPE double
00549 #define GAN_VECTYPE1 Gan_Vector2
00550 #define GAN_VECTYPE2 Gan_Vector2
00551 #define GAN_MATTYPEL Gan_Matrix22
00552 #define GAN_MATTYPER Gan_Matrix22
00553 #define GAN_SQUMATTYPEL Gan_SquMatrix22
00554 #define GAN_SQUMATTYPER Gan_SquMatrix22
00555 #define GAN_MAT_FPRINT                     gan_mat22_fprint
00556 #define GAN_MAT_PRINT                      gan_mat22_print
00557 #define GAN_MAT_FSCANF                     gan_mat22_fscanf
00558 #define GAN_MAT_FWRITE                     gan_mat22_fwrite
00559 #define GAN_MAT_FREAD                      gan_mat22_fread
00560 #define GAN_MAT_ZERO_Q                     gan_mat22_zero_q
00561 #define GAN_MAT_ZERO_S                     gan_mat22_zero_s
00562 #define GAN_MAT_COPY_Q                     gan_mat22_copy_q
00563 #define GAN_MAT_COPY_S                     gan_mat22_copy_s
00564 #define GAN_MAT_SCALE_Q                    gan_mat22_scale_q
00565 #define GAN_MAT_SCALE_I                    gan_mat22_scale_i
00566 #define GAN_MAT_SCALE_S                    gan_mat22_scale_s
00567 #define GAN_MAT_DIVIDE_Q                   gan_mat22_divide_q
00568 #define GAN_MAT_DIVIDE_I                   gan_mat22_divide_i
00569 #define GAN_MAT_DIVIDE_S                   gan_mat22_divide_s
00570 #define GAN_MAT_NEGATE_Q                   gan_mat22_negate_q
00571 #define GAN_MAT_NEGATE_I                   gan_mat22_negate_i
00572 #define GAN_MAT_NEGATE_S                   gan_mat22_negate_s
00573 #define GAN_MAT_UNIT_Q                     gan_mat22_unit_q
00574 #define GAN_MAT_UNIT_I                     gan_mat22_unit_i
00575 #define GAN_MAT_UNIT_S                     gan_mat22_unit_s
00576 #define GAN_MAT_ADD_Q                      gan_mat22_add_q
00577 #define GAN_MAT_ADD_I1                     gan_mat22_add_i1
00578 #define GAN_MAT_ADD_I2                     gan_mat22_add_i2
00579 #define GAN_MAT_INCREMENT                  gan_mat22_increment
00580 #define GAN_MAT_ADD_S                      gan_mat22_add_s
00581 #define GAN_MAT_SUB_Q                      gan_mat22_sub_q
00582 #define GAN_MAT_SUB_I1                     gan_mat22_sub_i1
00583 #define GAN_MAT_SUB_I2                     gan_mat22_sub_i2
00584 #define GAN_MAT_DECREMENT                  gan_mat22_decrement
00585 #define GAN_MAT_SUB_S                      gan_mat22_sub_s
00586 #define GAN_VEC_OUTER_Q                    gan_vec22_outer_q
00587 #define GAN_VEC_OUTER_S                    gan_vec22_outer_s
00588 #define GAN_MAT_MULTV_Q                    gan_mat22_multv2_q
00589 #define GAN_MAT_MULTV_S                    gan_mat22_multv2_s
00590 #define GAN_MATT_MULTV_Q                   gan_mat22T_multv2_q
00591 #define GAN_MATT_MULTV_S                   gan_mat22T_multv2_s
00592 #define GAN_MAT_LMULTMT_Q                  gan_mat22_lmultm22T_q
00593 #define GAN_MAT_LMULTMT_S                  gan_mat22_lmultm22T_s
00594 #define GAN_MAT_RMULTM_Q                   gan_mat22_rmultm22_q
00595 #define GAN_MAT_RMULTM_S                   gan_mat22_rmultm22_s
00596 #define GAN_MAT_RMULTMT_Q                  gan_mat22_rmultm22T_q
00597 #define GAN_MAT_RMULTMT_S                  gan_mat22_rmultm22T_s
00598 #define GAN_MAT_LMULTMT_SYM_Q              gan_mat22_lmultm22T_sym_q
00599 #define GAN_MAT_LMULTMT_SYM_S              gan_mat22_lmultm22T_sym_s
00600 #define GAN_MAT_RMULTMT_SYM_Q              gan_mat22_rmultm22T_sym_q
00601 #define GAN_MAT_RMULTMT_SYM_S              gan_mat22_rmultm22T_sym_s
00602 #define GAN_MAT_SLMULTT_Q                  gan_mat22_slmultT_q
00603 #define GAN_MAT_SLMULTT_S                  gan_mat22_slmultT_s
00604 #define GAN_MAT_SRMULTT_Q                  gan_mat22_srmultT_q
00605 #define GAN_MAT_SRMULTT_S                  gan_mat22_srmultT_s
00606 #define GAN_MAT_LMULTS_Q                   gan_mat22_lmults22_q
00607 #define GAN_MAT_LMULTS_S                   gan_mat22_lmults22_s
00608 #define GAN_MAT_RMULTS_Q                   gan_mat22_rmults22_q
00609 #define GAN_MAT_RMULTS_S                   gan_mat22_rmults22_s
00610 #define GAN_SYMMATL_LRMULT_Q               gan_symmat22_lrmultm22T_q
00611 #define GAN_SYMMATL_LRMULT_S               gan_symmat22_lrmultm22T_s
00612 #define GAN_SYMMATR_LRMULT_Q               gan_symmat22_lrmultm22_q
00613 #define GAN_SYMMATR_LRMULT_S               gan_symmat22_lrmultm22_s
00614 #define GAN_MAT_LMULTL_Q                   gan_mat22_lmultl22_q
00615 #define GAN_MAT_LMULTL_S                   gan_mat22_lmultl22_s
00616 #define GAN_MAT_LMULTL_I                   gan_mat22_lmultl22_i
00617 #define GAN_MAT_LMULTLI_Q                  gan_mat22_lmultl22I_q
00618 #define GAN_MAT_LMULTLI_S                  gan_mat22_lmultl22I_s
00619 #define GAN_MAT_LMULTLI_I                  gan_mat22_lmultl22I_i
00620 #define GAN_MAT_LMULTLT_Q                  gan_mat22_lmultl22T_q
00621 #define GAN_MAT_LMULTLT_S                  gan_mat22_lmultl22T_s
00622 #define GAN_MAT_LMULTLT_I                  gan_mat22_lmultl22T_i
00623 #define GAN_MAT_LMULTLIT_Q                 gan_mat22_lmultl22IT_q
00624 #define GAN_MAT_LMULTLIT_S                 gan_mat22_lmultl22IT_s
00625 #define GAN_MAT_LMULTLIT_I                 gan_mat22_lmultl22IT_i
00626 #define GAN_MAT_RMULTL_Q                   gan_mat22_rmultl22_q
00627 #define GAN_MAT_RMULTL_S                   gan_mat22_rmultl22_s
00628 #define GAN_MAT_RMULTL_I                   gan_mat22_rmultl22_i
00629 #define GAN_MAT_RMULTLI_Q                  gan_mat22_rmultl22I_q
00630 #define GAN_MAT_RMULTLI_S                  gan_mat22_rmultl22I_s
00631 #define GAN_MAT_RMULTLI_I                  gan_mat22_rmultl22I_i
00632 #define GAN_MAT_RMULTLT_Q                  gan_mat22_rmultl22T_q
00633 #define GAN_MAT_RMULTLT_S                  gan_mat22_rmultl22T_s
00634 #define GAN_MAT_RMULTLT_I                  gan_mat22_rmultl22T_i
00635 #define GAN_MAT_RMULTLIT_Q                 gan_mat22_rmultl22IT_q
00636 #define GAN_MAT_RMULTLIT_S                 gan_mat22_rmultl22IT_s
00637 #define GAN_MAT_RMULTLIT_I                 gan_mat22_rmultl22IT_i
00638 #define GAN_MAT_SUMSQR_Q                   gan_mat22_sumsqr_q
00639 #define GAN_MAT_SUMSQR_S                   gan_mat22_sumsqr_s
00640 #define GAN_MAT_FNORM_Q                    gan_mat22_Fnorm_q
00641 #define GAN_MAT_FNORM_S                    gan_mat22_Fnorm_s
00642 #define GAN_MAT_FROM_MAT_Q                 gan_mat22_from_mat_q
00643 #define GAN_MAT_FROM_MAT_S                 gan_mat22_from_mat_s
00644 #define GAN_MAT_FROM_SQUMAT_Q              gan_mat22_from_squmat_q
00645 #define GAN_MAT_FROM_SQUMAT_S              gan_mat22_from_squmat_s
00646 #define GAN_SQUMAT_FROM_SQUMAT_Q           gan_squmat22_from_squmat_q
00647 #define GAN_SQUMAT_FROM_SQUMAT_S           gan_squmat22_from_squmat_s
00648 
00649 #define GAN_SQUMAT_IDENT_Q    gan_mat22_ident_q
00650 #define GAN_SQUMAT_IDENT_S    gan_mat22_ident_s
00651 #define GAN_SQUMAT_TPOSE_Q    gan_mat22_tpose_q
00652 #define GAN_SQUMAT_TPOSE_S    gan_mat22_tpose_s
00653 #define GAN_SQUMAT_TPOSE_I    gan_mat22_tpose_i
00654 #define GAN_MAT_SADDT_Q       gan_mat22_saddT_q
00655 #define GAN_MAT_SADDT_S       gan_mat22_saddT_s
00656 #define GAN_SQUMAT_INVERT     gan_mat22_invert
00657 #define GAN_SQUMAT_INVERT_Q   gan_mat22_invert_q
00658 #define GAN_SQUMAT_INVERT_S   gan_mat22_invert_s
00659 #define GAN_SQUMAT_INVERT_I   gan_mat22_invert_i
00660 #define GAN_SQUMAT_ADJOINT_Q  gan_mat22_adjoint_q
00661 #define GAN_SQUMAT_ADJOINT_S  gan_mat22_adjoint_s
00662 #define GAN_SQUMAT_ADJOINTT_Q gan_mat22_adjointT_q
00663 #define GAN_SQUMAT_ADJOINTT_S gan_mat22_adjointT_s
00664 #define GAN_SQUMAT_DET_Q      gan_mat22_det_q
00665 #define GAN_SQUMAT_DET_S      gan_mat22_det_s
00666 #define GAN_SQUMAT_TRACE_Q    gan_mat22_trace_q
00667 #define GAN_SQUMAT_TRACE_S    gan_mat22_trace_s
00668 
00669 #ifndef _GAN_2X2MAT_H
00670 #define _GAN_2X2MAT_H
00671 
00672 
00673 #endif /* #ifndef _GAN_2X2MAT_H */
00674 
00687 /* This library is free software; you can redistribute it and/or
00688    modify it under the terms of the GNU Lesser General Public
00689    License as published by the Free Software Foundation; either
00690    version 2.1 of the License, or (at your option) any later version.
00691 
00692    This library is distributed in the hope that it will be useful,
00693    but WITHOUT ANY WARRANTY; without even the implied warranty of
00694    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00695    Lesser General Public License for more details.
00696 
00697    You should have received a copy of the GNU Lesser General Public
00698    License along with this library; if not, write to the Free Software
00699    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00700 */
00701 
00702 /* function declarations for functions common to all small square matrix
00703  * types */
00704 
00705 
00706 
00707 /* documentation for macros defined in individual header files */
00708 
00721 Gan_Matrix22 *gan_mat22_ident_q ( Gan_Matrix22 *A );
00722 
00740 Gan_Matrix22 *gan_mat22_tpose_q ( Gan_Matrix22 *A, Gan_Matrix22 *B );
00741 
00759 Gan_SquMatrix22 *gan_mat22_saddT_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
00760 
00791 Gan_Matrix22 *gan_mat22_invert_q ( Gan_Matrix22 *A, Gan_Matrix22 *B );
00792 
00801 Gan_Matrix22 *gan_mat22_invert_i ( Gan_Matrix22 *A );
00802 
00817 double gan_mat22_det_q ( Gan_Matrix22 *A );
00818 
00824 double gan_mat22_trace_q ( Gan_Matrix22 *A );
00825 
00831 #undef GAN_SQUMAT_IDENT_Q
00832 #undef GAN_SQUMAT_IDENT_S
00833 #undef GAN_SQUMAT_TPOSE_Q
00834 #undef GAN_SQUMAT_TPOSE_S
00835 #undef GAN_SQUMAT_TPOSE_I
00836 #undef GAN_MAT_SADDT_Q
00837 #undef GAN_MAT_SADDT_S
00838 #undef GAN_SQUMATI_MULTV_Q
00839 #undef GAN_SQUMATI_MULTV_S
00840 #undef GAN_SQUMATI_MULTV_I
00841 #undef GAN_SQUMATIT_MULTV_Q
00842 #undef GAN_SQUMATIT_MULTV_S
00843 #undef GAN_SQUMATIT_MULTV_I
00844 #undef GAN_SQUMAT_INVERT
00845 #undef GAN_SQUMAT_INVERT_Q
00846 #undef GAN_SQUMAT_INVERT_S
00847 #undef GAN_SQUMAT_INVERT_I
00848 #undef GAN_SQUMAT_ADJOINT_Q
00849 #undef GAN_SQUMAT_ADJOINT_S
00850 #undef GAN_SQUMAT_ADJOINTT_Q
00851 #undef GAN_SQUMAT_ADJOINTT_S
00852 #undef GAN_SQUMAT_DET_Q
00853 #undef GAN_SQUMAT_DET_S
00854 #undef GAN_SQUMAT_TRACE_Q
00855 #undef GAN_SQUMAT_TRACE_S
00856 
00869 /* This library is free software; you can redistribute it and/or
00870    modify it under the terms of the GNU Lesser General Public
00871    License as published by the Free Software Foundation; either
00872    version 2.1 of the License, or (at your option) any later version.
00873 
00874    This library is distributed in the hope that it will be useful,
00875    but WITHOUT ANY WARRANTY; without even the implied warranty of
00876    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00877    Lesser General Public License for more details.
00878 
00879    You should have received a copy of the GNU Lesser General Public
00880    License along with this library; if not, write to the Free Software
00881    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00882 */
00883 
00884 /* function declarations for functions common to all small vector types */
00885 
00886 
00887 
00888 /* documentation for macros defined in individual header files */
00889 
00900 Gan_Matrix22 *gan_mat22_zero_q ( Gan_Matrix22 *A );
00901 
00918 Gan_Matrix22 *gan_mat22_copy_q ( Gan_Matrix22 *A, Gan_Matrix22 *B );
00919 
00937 Gan_Matrix22 *gan_mat22_scale_q ( Gan_Matrix22 *A, double a,
00938                                Gan_Matrix22 *B );
00939 
00947 Gan_Matrix22 *gan_mat22_scale_i ( Gan_Matrix22 *A, double a );
00948 
00957 Gan_Matrix22 *gan_mat22_divide_q ( Gan_Matrix22 *A, double a,
00958                                 Gan_Matrix22 *B );
00959 
00967 Gan_Matrix22 *gan_mat22_divide_i ( Gan_Matrix22 *A, double a );
00968 
00976 Gan_Matrix22 *gan_mat22_negate_q ( Gan_Matrix22 *A, Gan_Matrix22 *B );
00977 
00985 Gan_Matrix22 *gan_mat22_negate_i ( Gan_Matrix22 *A );
00986 
00994 Gan_Matrix22 *gan_mat22_unit_i ( Gan_Matrix22 *A );
00995 
01013 Gan_Matrix22 *gan_mat22_add_q ( Gan_Matrix22 *A, Gan_Matrix22 *B, Gan_Matrix22 *C );
01014 
01023 Gan_Matrix22 *gan_mat22_add_i1 ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01024 
01033 Gan_Matrix22 *gan_mat22_add_i2 ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01034 
01043 Gan_Matrix22 *gan_mat22_increment ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01044 
01062 Gan_Matrix22 *gan_mat22_sub_q ( Gan_Matrix22 *A, Gan_Matrix22 *B, Gan_Matrix22 *C );
01063 
01072 Gan_Matrix22 *gan_mat22_sub_i1 ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01073 
01082 Gan_Matrix22 *gan_mat22_sub_i2 ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01083 
01092 Gan_Matrix22 *gan_mat22_decrement ( Gan_Matrix22 *A, Gan_Matrix22 *B );
01093 
01111 Gan_Matrix22 *gan_vec22_outer_q ( Gan_Vector2 *p, Gan_Vector2 *q,
01112                                Gan_Matrix22 *A );
01113 
01122 Gan_Vector2 *gan_mat22_multv2_q ( Gan_Matrix22 *A, Gan_Vector2 *p,
01123                                 Gan_Vector2 *q );
01124 
01125 
01134 Gan_Vector2 *gan_mat22T_multv2_q ( Gan_Matrix22 *A, Gan_Vector2 *p,
01135                                  Gan_Vector2 *q );
01136 
01137 
01157 Gan_Matrix22 *gan_mat22_lmultm22T_q ( Gan_Matrix22 *A, Gan_Matrix22 *B,
01158                                  Gan_Matrix22 *C );
01159 
01169 Gan_Matrix22 *gan_mat22_rmultm22_q ( Gan_Matrix22 *A, Gan_Matrix22 *B,
01170                                 Gan_Matrix22 *C );
01171 
01181 Gan_Matrix22 *gan_mat22_rmultm22T_q ( Gan_Matrix22 *A, Gan_Matrix22 *B,
01182                                  Gan_Matrix22 *C );
01183 
01195 Gan_SquMatrix22 *gan_mat22_lmultm22T_sym_q ( Gan_Matrix22 *A, Gan_Matrix22 *B,
01196                                          Gan_SquMatrix22 *C );
01197 
01209 Gan_SquMatrix22 *gan_mat22_rmultm22T_sym_q ( Gan_Matrix22 *A, Gan_Matrix22 *B,
01210                                          Gan_SquMatrix22 *C );
01211 
01220 Gan_Matrix22 *gan_mat22_lmults22_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01221                                 Gan_Matrix22 *C );
01222 
01231 Gan_Matrix22 *gan_mat22_rmults22_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01232                                 Gan_Matrix22 *C );
01233 
01253 Gan_SquMatrix22 *gan_symmat22_lrmultm22T_q ( Gan_SquMatrix22 *A, Gan_Matrix22 *B,
01254                                         Gan_Matrix22 *C, Gan_SquMatrix22 *D );
01255 
01266 Gan_SquMatrix22 *gan_symmat22_lrmultm22_q ( Gan_SquMatrix22 *A, Gan_Matrix22 *B,
01267                                         Gan_Matrix22 *C, Gan_SquMatrix22 *D );
01268 
01287 Gan_Matrix22 *gan_mat22_lmultl22_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01288                                 Gan_Matrix22 *C );
01289 
01299 Gan_Matrix22 *gan_mat22_lmultl22I_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01300                                  Gan_Matrix22 *C );
01301 
01311 Gan_Matrix22 *gan_mat22_lmultl22T_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01312                                  Gan_Matrix22 *C );
01313 
01323 Gan_Matrix22 *gan_mat22_lmultl22IT_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01324                                   Gan_Matrix22 *C );
01325 
01335 Gan_Matrix22 *gan_mat22_rmultl22_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01336                                 Gan_Matrix22 *C );
01337 
01347 Gan_Matrix22 *gan_mat22_rmultl22I_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01348                                  Gan_Matrix22 *C );
01349 
01359 Gan_Matrix22 *gan_mat22_rmultl22T_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01360                                  Gan_Matrix22 *C );
01361 
01371 Gan_Matrix22 *gan_mat22_rmultl22IT_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B,
01372                                   Gan_Matrix22 *C );
01373 
01383 Gan_Matrix22 *gan_mat22_lmultl22_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01384 
01394 Gan_Matrix22 *gan_mat22_lmultl22I_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01395 
01405 Gan_Matrix22 *gan_mat22_lmultl22T_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01406 
01416 Gan_Matrix22 *gan_mat22_lmultl22IT_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01417 
01427 Gan_Matrix22 *gan_mat22_rmultl22_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01428 
01438 Gan_Matrix22 *gan_mat22_rmultl22I_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01439 
01449 Gan_Matrix22 *gan_mat22_rmultl22T_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01450 
01460 Gan_Matrix22 *gan_mat22_rmultl22IT_i ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01461 
01470 Gan_SquMatrix22 *gan_mat22_slmultT_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01471 
01472 
01481 Gan_SquMatrix22 *gan_mat22_srmultT_q ( Gan_Matrix22 *A, Gan_SquMatrix22 *B );
01482 
01483 
01498 double gan_mat22_sumsqr_q ( Gan_Matrix22 *A );
01499 
01506 double gan_mat22_Fnorm_q ( Gan_Matrix22 *A );
01507 
01525 Gan_Matrix22 *gan_mat22_from_mat_q ( Gan_Matrix *A, Gan_Matrix22 *B );
01526 
01535 Gan_Matrix22 *gan_mat22_from_squmat_q ( Gan_SquMatrix *A, Gan_Matrix22 *B );
01536 
01545 Gan_SquMatrix22 *gan_squmat22_from_squmat_q ( Gan_SquMatrix *A,
01546                                             Gan_SquMatrix22 *B );
01547 
01566 /* This library is free software; you can redistribute it and/or
01567    modify it under the terms of the GNU Lesser General Public
01568    License as published by the Free Software Foundation; either
01569    version 2.1 of the License, or (at your option) any later version.
01570 
01571    This library is distributed in the hope that it will be useful,
01572    but WITHOUT ANY WARRANTY; without even the implied warranty of
01573    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01574    Lesser General Public License for more details.
01575 
01576    You should have received a copy of the GNU Lesser General Public
01577    License along with this library; if not, write to the Free Software
01578    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01579 */
01580 
01581 #undef GAN_MATTYPE
01582 #undef GAN_MATRIX_TYPE
01583 #undef GAN_SQUMATRIX_TYPE
01584 #undef GAN_VECTOR_TYPE
01585 #undef GAN_MAT_ELEMENT_TYPE
01586 #undef GAN_REALTYPE
01587 #undef GAN_VECTYPE1
01588 #undef GAN_VECTYPE2
01589 #undef GAN_MATTYPEL
01590 #undef GAN_MATTYPER
01591 #undef GAN_SQUMATTYPEL
01592 #undef GAN_SQUMATTYPER
01593 #undef GAN_FIXED_MATRIX_TYPE
01594 #undef GAN_MAT_FPRINT
01595 #undef GAN_MAT_PRINT
01596 #undef GAN_MAT_FSCANF
01597 #undef GAN_MAT_FWRITE
01598 #undef GAN_MAT_FREAD
01599 #undef GAN_MAT_ZERO_Q
01600 #undef GAN_MAT_ZERO_S
01601 #undef GAN_MAT_COPY_Q
01602 #undef GAN_MAT_COPY_S
01603 #undef GAN_MAT_SCALE_Q
01604 #undef GAN_MAT_SCALE_S
01605 #undef GAN_MAT_SCALE_I
01606 #undef GAN_MAT_DIVIDE_Q
01607 #undef GAN_MAT_DIVIDE_S
01608 #undef GAN_MAT_DIVIDE_I
01609 #undef GAN_MAT_NEGATE_Q
01610 #undef GAN_MAT_NEGATE_S
01611 #undef GAN_MAT_NEGATE_I
01612 #undef GAN_MAT_UNIT_Q
01613 #undef GAN_MAT_UNIT_S
01614 #undef GAN_MAT_UNIT_I
01615 #undef GAN_MAT_ADD_Q
01616 #undef GAN_MAT_ADD_I1
01617 #undef GAN_MAT_ADD_I2
01618 #undef GAN_MAT_INCREMENT
01619 #undef GAN_MAT_ADD_S
01620 #undef GAN_MAT_SUB_Q
01621 #undef GAN_MAT_SUB_I1
01622 #undef GAN_MAT_SUB_I2
01623 #undef GAN_MAT_DECREMENT
01624 #undef GAN_MAT_SUB_S
01625 #undef GAN_VEC_OUTER_Q
01626 #undef GAN_VEC_OUTER_S
01627 #undef GAN_MAT_MULTV_Q
01628 #undef GAN_MAT_MULTV_S
01629 #undef GAN_MAT_MULTV_I
01630 #undef GAN_MATT_MULTV_Q
01631 #undef GAN_MATT_MULTV_S
01632 #undef GAN_MATT_MULTV_I
01633 #undef GAN_MAT_LMULTM_Q
01634 #undef GAN_MAT_LMULTM_S
01635 #undef GAN_MAT_LMULTMT_Q
01636 #undef GAN_MAT_LMULTMT_S
01637 #undef GAN_MAT_RMULTM_Q
01638 #undef GAN_MAT_RMULTM_S
01639 #undef GAN_MAT_RMULTMT_Q
01640 #undef GAN_MAT_RMULTMT_S
01641 #undef GAN_MAT_LMULTMT_SYM_Q
01642 #undef GAN_MAT_LMULTMT_SYM_S
01643 #undef GAN_MAT_RMULTMT_SYM_Q
01644 #undef GAN_MAT_RMULTMT_SYM_S
01645 #undef GAN_MAT_LMULTS_Q
01646 #undef GAN_MAT_LMULTS_S
01647 #undef GAN_MAT_RMULTS_Q
01648 #undef GAN_MAT_RMULTS_S
01649 #undef GAN_SYMMATL_LRMULT_Q
01650 #undef GAN_SYMMATL_LRMULT_S
01651 #undef GAN_SYMMATR_LRMULT_Q
01652 #undef GAN_SYMMATR_LRMULT_S
01653 #undef GAN_MAT_LMULTL_Q
01654 #undef GAN_MAT_LMULTL_S
01655 #undef GAN_MAT_LMULTL_I
01656 #undef GAN_MAT_LMULTLI_Q
01657 #undef GAN_MAT_LMULTLI_S
01658 #undef GAN_MAT_LMULTLI_I
01659 #undef GAN_MAT_LMULTLT_Q
01660 #undef GAN_MAT_LMULTLT_S
01661 #undef GAN_MAT_LMULTLT_I
01662 #undef GAN_MAT_LMULTLIT_Q
01663 #undef GAN_MAT_LMULTLIT_S
01664 #undef GAN_MAT_LMULTLIT_I
01665 #undef GAN_MAT_RMULTL_Q
01666 #undef GAN_MAT_RMULTL_S
01667 #undef GAN_MAT_RMULTL_I
01668 #undef GAN_MAT_RMULTLI_Q
01669 #undef GAN_MAT_RMULTLI_S
01670 #undef GAN_MAT_RMULTLI_I
01671 #undef GAN_MAT_RMULTLT_Q
01672 #undef GAN_MAT_RMULTLT_S
01673 #undef GAN_MAT_RMULTLT_I
01674 #undef GAN_MAT_RMULTLIT_Q
01675 #undef GAN_MAT_RMULTLIT_S
01676 #undef GAN_MAT_RMULTLIT_I
01677 #undef GAN_MAT_SRMULTT_Q
01678 #undef GAN_MAT_SRMULTT_S
01679 #undef GAN_MAT_SRMULTT_I
01680 #undef GAN_MAT_SLMULTT_Q
01681 #undef GAN_MAT_SLMULTT_S
01682 #undef GAN_MAT_SLMULTT_I
01683 #undef GAN_MAT_RMULTLIT_S
01684 #undef GAN_MAT_SUMSQR_Q
01685 #undef GAN_MAT_SUMSQR_S
01686 #undef GAN_MAT_FNORM_Q
01687 #undef GAN_MAT_FNORM_S
01688 #undef GAN_MAT_FROM_MAT_Q
01689 #undef GAN_MAT_FROM_MAT_S
01690 #undef GAN_MAT_FROM_SQUMAT_Q
01691 #undef GAN_MAT_FROM_SQUMAT_S
01692 #undef GAN_SQUMAT_FROM_SQUMAT_Q
01693 #undef GAN_SQUMAT_FROM_SQUMAT_S
01694 
01695 /* declare functions specific to symmetric 2x2 matrices */
01709 /* This library is free software; you can redistribute it and/or
01710    modify it under the terms of the GNU Lesser General Public
01711    License as published by the Free Software Foundation; either
01712    version 2.1 of the License, or (at your option) any later version.
01713 
01714    This library is distributed in the hope that it will be useful,
01715    but WITHOUT ANY WARRANTY; without even the implied warranty of
01716    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01717    Lesser General Public License for more details.
01718 
01719    You should have received a copy of the GNU Lesser General Public
01720    License along with this library; if not, write to the Free Software
01721    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01722 */
01723 
01724 #ifndef _GAN_2X2SYMMAT_H
01725 
01741 Gan_SquMatrix22 *gan_symmat22_fill_q ( Gan_SquMatrix22 *A, double XX,
01742                                        double YX, double YY );
01743 
01749 #endif /* #ifndef _GAN_2X2SYMMAT_H */
01750 
01751 #define GAN_MATTYPE Gan_SquMatrix22
01752 #define GAN_MATRIX_TYPE Gan_SquMatrix
01753 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
01754 #define GAN_VECTOR_TYPE Gan_Vector
01755 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
01756 #define GAN_REALTYPE double
01757 #define GAN_VECTYPE1 Gan_Vector2
01758 #define GAN_VECTYPE2 Gan_Vector2
01759 #define GAN_FIXED_MATRIX_TYPE GAN_SYMMETRIC_MATRIX22
01760 #define GAN_MAT_FPRINT      gan_symmat22_fprint
01761 #define GAN_MAT_PRINT       gan_symmat22_print
01762 #define GAN_MAT_FSCANF      gan_symmat22_fscanf
01763 #define GAN_MAT_FWRITE      gan_symmat22_fwrite
01764 #define GAN_MAT_FREAD       gan_symmat22_fread
01765 #define GAN_MAT_ZERO_Q      gan_symmat22_zero_q
01766 #define GAN_MAT_ZERO_S      gan_symmat22_zero_s
01767 #define GAN_MAT_COPY_Q      gan_symmat22_copy_q
01768 #define GAN_MAT_COPY_S      gan_symmat22_copy_s
01769 #define GAN_MAT_SCALE_Q     gan_symmat22_scale_q
01770 #define GAN_MAT_SCALE_S     gan_symmat22_scale_s
01771 #define GAN_MAT_SCALE_I     gan_symmat22_scale_i
01772 #define GAN_MAT_DIVIDE_Q    gan_symmat22_divide_q
01773 #define GAN_MAT_DIVIDE_S    gan_symmat22_divide_s
01774 #define GAN_MAT_DIVIDE_I    gan_symmat22_divide_i
01775 #define GAN_MAT_NEGATE_Q    gan_symmat22_negate_q
01776 #define GAN_MAT_NEGATE_S    gan_symmat22_negate_s
01777 #define GAN_MAT_NEGATE_I    gan_symmat22_negate_i
01778 #define GAN_MAT_UNIT_Q      gan_symmat22_unit_q
01779 #define GAN_MAT_UNIT_S      gan_symmat22_unit_s
01780 #define GAN_MAT_UNIT_I      gan_symmat22_unit_i
01781 #define GAN_MAT_ADD_Q       gan_symmat22_add_q
01782 #define GAN_MAT_ADD_I1      gan_symmat22_add_i1
01783 #define GAN_MAT_ADD_I2      gan_symmat22_add_i2
01784 #define GAN_MAT_INCREMENT   gan_symmat22_increment
01785 #define GAN_MAT_ADD_S       gan_symmat22_add_s
01786 #define GAN_MAT_SUB_Q       gan_symmat22_sub_q
01787 #define GAN_MAT_SUB_I1      gan_symmat22_sub_i1
01788 #define GAN_MAT_SUB_I2      gan_symmat22_sub_i2
01789 #define GAN_MAT_DECREMENT   gan_symmat22_decrement
01790 #define GAN_MAT_SUB_S       gan_symmat22_sub_s
01791 #define GAN_MAT_MULTV_Q     gan_symmat22_multv2_q
01792 #define GAN_MAT_MULTV_S     gan_symmat22_multv2_s
01793 #define GAN_MAT_SUMSQR_Q    gan_symmat22_sumsqr_q
01794 #define GAN_MAT_SUMSQR_S    gan_symmat22_sumsqr_s
01795 #define GAN_MAT_FNORM_Q     gan_symmat22_Fnorm_q
01796 #define GAN_MAT_FNORM_S     gan_symmat22_Fnorm_s
01797 
01798 #define GAN_SQUMAT_IDENT_Q       gan_symmat22_ident_q
01799 #define GAN_SQUMAT_IDENT_S       gan_symmat22_ident_s
01800 #define GAN_SQUMAT_INVERT        gan_symmat22_invert
01801 #define GAN_SQUMAT_INVERT_Q      gan_symmat22_invert_q
01802 #define GAN_SQUMAT_INVERT_S      gan_symmat22_invert_s
01803 #define GAN_SQUMAT_INVERT_I      gan_symmat22_invert_i
01804 #define GAN_SQUMAT_DET_Q         gan_symmat22_det_q
01805 #define GAN_SQUMAT_DET_S         gan_symmat22_det_s
01806 #define GAN_SQUMAT_TRACE_Q       gan_symmat22_trace_q
01807 #define GAN_SQUMAT_TRACE_S       gan_symmat22_trace_s
01808 
01809 #define GAN_VEC_OUTER_SYM_Q    gan_vec22_outer_sym_q
01810 #define GAN_VEC_OUTER_SYM_S    gan_vec22_outer_sym_s
01811 #define GAN_SYMMAT_CHOLESKY    gan_symmat22_cholesky
01812 #define GAN_SYMMAT_CHOLESKY_Q  gan_symmat22_cholesky_q
01813 #define GAN_SYMMAT_CHOLESKY_S  gan_symmat22_cholesky_s
01814 #define GAN_SYMMAT_CHOLESKY_I  gan_symmat22_cholesky_i
01815 
01816 #ifndef _GAN_2X2SYMMAT_H
01817 #define _GAN_2X2SYMMAT_H
01818 
01819 
01820 #endif /* #ifndef _GAN_2X2SYMMAT_H */
01821 
01834 /* This library is free software; you can redistribute it and/or
01835    modify it under the terms of the GNU Lesser General Public
01836    License as published by the Free Software Foundation; either
01837    version 2.1 of the License, or (at your option) any later version.
01838 
01839    This library is distributed in the hope that it will be useful,
01840    but WITHOUT ANY WARRANTY; without even the implied warranty of
01841    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01842    Lesser General Public License for more details.
01843 
01844    You should have received a copy of the GNU Lesser General Public
01845    License along with this library; if not, write to the Free Software
01846    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01847 */
01848 
01849 /* function declarations for functions common to all small symmetric matrix
01850  * types */
01851 
01852 
01853 
01854 /* documentation for macros defined in individual header files */
01855 
01866 Gan_SquMatrix22 *gan_vec22_outer_sym_q ( Gan_Vector2 *p, Gan_SquMatrix22 *A );
01867 
01889 Gan_SquMatrix22 *gan_symmat22_cholesky_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
01890 
01899 Gan_SquMatrix22 *gan_symmat22_cholesky_i ( Gan_SquMatrix22 *A );
01900 
01906 #undef GAN_VEC_OUTER_SYM_Q
01907 #undef GAN_VEC_OUTER_SYM_S
01908 #undef GAN_SYMMAT_CHOLESKY
01909 #undef GAN_SYMMAT_CHOLESKY_Q
01910 #undef GAN_SYMMAT_CHOLESKY_S
01911 #undef GAN_SYMMAT_CHOLESKY_I
01912 
01925 /* This library is free software; you can redistribute it and/or
01926    modify it under the terms of the GNU Lesser General Public
01927    License as published by the Free Software Foundation; either
01928    version 2.1 of the License, or (at your option) any later version.
01929 
01930    This library is distributed in the hope that it will be useful,
01931    but WITHOUT ANY WARRANTY; without even the implied warranty of
01932    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01933    Lesser General Public License for more details.
01934 
01935    You should have received a copy of the GNU Lesser General Public
01936    License along with this library; if not, write to the Free Software
01937    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01938 */
01939 
01940 /* function declarations for functions common to all small square matrix
01941  * types */
01942 
01943 
01944 
01945 /* documentation for macros defined in individual header files */
01946 
01959 Gan_SquMatrix22 *gan_symmat22_ident_q ( Gan_SquMatrix22 *A );
01960 
02011 Gan_SquMatrix22 *gan_symmat22_invert_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02012 
02021 Gan_SquMatrix22 *gan_symmat22_invert_i ( Gan_SquMatrix22 *A );
02022 
02037 double gan_symmat22_det_q ( Gan_SquMatrix22 *A );
02038 
02044 double gan_symmat22_trace_q ( Gan_SquMatrix22 *A );
02045 
02051 #undef GAN_SQUMAT_IDENT_Q
02052 #undef GAN_SQUMAT_IDENT_S
02053 #undef GAN_SQUMAT_TPOSE_Q
02054 #undef GAN_SQUMAT_TPOSE_S
02055 #undef GAN_SQUMAT_TPOSE_I
02056 #undef GAN_MAT_SADDT_Q
02057 #undef GAN_MAT_SADDT_S
02058 #undef GAN_SQUMATI_MULTV_Q
02059 #undef GAN_SQUMATI_MULTV_S
02060 #undef GAN_SQUMATI_MULTV_I
02061 #undef GAN_SQUMATIT_MULTV_Q
02062 #undef GAN_SQUMATIT_MULTV_S
02063 #undef GAN_SQUMATIT_MULTV_I
02064 #undef GAN_SQUMAT_INVERT
02065 #undef GAN_SQUMAT_INVERT_Q
02066 #undef GAN_SQUMAT_INVERT_S
02067 #undef GAN_SQUMAT_INVERT_I
02068 #undef GAN_SQUMAT_ADJOINT_Q
02069 #undef GAN_SQUMAT_ADJOINT_S
02070 #undef GAN_SQUMAT_ADJOINTT_Q
02071 #undef GAN_SQUMAT_ADJOINTT_S
02072 #undef GAN_SQUMAT_DET_Q
02073 #undef GAN_SQUMAT_DET_S
02074 #undef GAN_SQUMAT_TRACE_Q
02075 #undef GAN_SQUMAT_TRACE_S
02076 
02089 /* This library is free software; you can redistribute it and/or
02090    modify it under the terms of the GNU Lesser General Public
02091    License as published by the Free Software Foundation; either
02092    version 2.1 of the License, or (at your option) any later version.
02093 
02094    This library is distributed in the hope that it will be useful,
02095    but WITHOUT ANY WARRANTY; without even the implied warranty of
02096    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02097    Lesser General Public License for more details.
02098 
02099    You should have received a copy of the GNU Lesser General Public
02100    License along with this library; if not, write to the Free Software
02101    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02102 */
02103 
02104 /* function declarations for functions common to all small vector types */
02105 
02106 
02107 
02108 /* documentation for macros defined in individual header files */
02109 
02120 Gan_SquMatrix22 *gan_symmat22_zero_q ( Gan_SquMatrix22 *A );
02121 
02138 Gan_SquMatrix22 *gan_symmat22_copy_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02139 
02157 Gan_SquMatrix22 *gan_symmat22_scale_q ( Gan_SquMatrix22 *A, double a,
02158                                Gan_SquMatrix22 *B );
02159 
02167 Gan_SquMatrix22 *gan_symmat22_scale_i ( Gan_SquMatrix22 *A, double a );
02168 
02177 Gan_SquMatrix22 *gan_symmat22_divide_q ( Gan_SquMatrix22 *A, double a,
02178                                 Gan_SquMatrix22 *B );
02179 
02187 Gan_SquMatrix22 *gan_symmat22_divide_i ( Gan_SquMatrix22 *A, double a );
02188 
02196 Gan_SquMatrix22 *gan_symmat22_negate_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02197 
02205 Gan_SquMatrix22 *gan_symmat22_negate_i ( Gan_SquMatrix22 *A );
02206 
02214 Gan_SquMatrix22 *gan_symmat22_unit_i ( Gan_SquMatrix22 *A );
02215 
02233 Gan_SquMatrix22 *gan_symmat22_add_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B, Gan_SquMatrix22 *C );
02234 
02243 Gan_SquMatrix22 *gan_symmat22_add_i1 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02244 
02253 Gan_SquMatrix22 *gan_symmat22_add_i2 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02254 
02263 Gan_SquMatrix22 *gan_symmat22_increment ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02264 
02282 Gan_SquMatrix22 *gan_symmat22_sub_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B, Gan_SquMatrix22 *C );
02283 
02292 Gan_SquMatrix22 *gan_symmat22_sub_i1 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02293 
02302 Gan_SquMatrix22 *gan_symmat22_sub_i2 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02303 
02312 Gan_SquMatrix22 *gan_symmat22_decrement ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02313 
02332 Gan_Vector2 *gan_symmat22_multv2_q ( Gan_SquMatrix22 *A, Gan_Vector2 *p,
02333                                 Gan_Vector2 *q );
02334 
02335 
02336 
02337 
02409 double gan_symmat22_sumsqr_q ( Gan_SquMatrix22 *A );
02410 
02417 double gan_symmat22_Fnorm_q ( Gan_SquMatrix22 *A );
02418 
02449 /* This library is free software; you can redistribute it and/or
02450    modify it under the terms of the GNU Lesser General Public
02451    License as published by the Free Software Foundation; either
02452    version 2.1 of the License, or (at your option) any later version.
02453 
02454    This library is distributed in the hope that it will be useful,
02455    but WITHOUT ANY WARRANTY; without even the implied warranty of
02456    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02457    Lesser General Public License for more details.
02458 
02459    You should have received a copy of the GNU Lesser General Public
02460    License along with this library; if not, write to the Free Software
02461    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02462 */
02463 
02464 #undef GAN_MATTYPE
02465 #undef GAN_MATRIX_TYPE
02466 #undef GAN_SQUMATRIX_TYPE
02467 #undef GAN_VECTOR_TYPE
02468 #undef GAN_MAT_ELEMENT_TYPE
02469 #undef GAN_REALTYPE
02470 #undef GAN_VECTYPE1
02471 #undef GAN_VECTYPE2
02472 #undef GAN_MATTYPEL
02473 #undef GAN_MATTYPER
02474 #undef GAN_SQUMATTYPEL
02475 #undef GAN_SQUMATTYPER
02476 #undef GAN_FIXED_MATRIX_TYPE
02477 #undef GAN_MAT_FPRINT
02478 #undef GAN_MAT_PRINT
02479 #undef GAN_MAT_FSCANF
02480 #undef GAN_MAT_FWRITE
02481 #undef GAN_MAT_FREAD
02482 #undef GAN_MAT_ZERO_Q
02483 #undef GAN_MAT_ZERO_S
02484 #undef GAN_MAT_COPY_Q
02485 #undef GAN_MAT_COPY_S
02486 #undef GAN_MAT_SCALE_Q
02487 #undef GAN_MAT_SCALE_S
02488 #undef GAN_MAT_SCALE_I
02489 #undef GAN_MAT_DIVIDE_Q
02490 #undef GAN_MAT_DIVIDE_S
02491 #undef GAN_MAT_DIVIDE_I
02492 #undef GAN_MAT_NEGATE_Q
02493 #undef GAN_MAT_NEGATE_S
02494 #undef GAN_MAT_NEGATE_I
02495 #undef GAN_MAT_UNIT_Q
02496 #undef GAN_MAT_UNIT_S
02497 #undef GAN_MAT_UNIT_I
02498 #undef GAN_MAT_ADD_Q
02499 #undef GAN_MAT_ADD_I1
02500 #undef GAN_MAT_ADD_I2
02501 #undef GAN_MAT_INCREMENT
02502 #undef GAN_MAT_ADD_S
02503 #undef GAN_MAT_SUB_Q
02504 #undef GAN_MAT_SUB_I1
02505 #undef GAN_MAT_SUB_I2
02506 #undef GAN_MAT_DECREMENT
02507 #undef GAN_MAT_SUB_S
02508 #undef GAN_VEC_OUTER_Q
02509 #undef GAN_VEC_OUTER_S
02510 #undef GAN_MAT_MULTV_Q
02511 #undef GAN_MAT_MULTV_S
02512 #undef GAN_MAT_MULTV_I
02513 #undef GAN_MATT_MULTV_Q
02514 #undef GAN_MATT_MULTV_S
02515 #undef GAN_MATT_MULTV_I
02516 #undef GAN_MAT_LMULTM_Q
02517 #undef GAN_MAT_LMULTM_S
02518 #undef GAN_MAT_LMULTMT_Q
02519 #undef GAN_MAT_LMULTMT_S
02520 #undef GAN_MAT_RMULTM_Q
02521 #undef GAN_MAT_RMULTM_S
02522 #undef GAN_MAT_RMULTMT_Q
02523 #undef GAN_MAT_RMULTMT_S
02524 #undef GAN_MAT_LMULTMT_SYM_Q
02525 #undef GAN_MAT_LMULTMT_SYM_S
02526 #undef GAN_MAT_RMULTMT_SYM_Q
02527 #undef GAN_MAT_RMULTMT_SYM_S
02528 #undef GAN_MAT_LMULTS_Q
02529 #undef GAN_MAT_LMULTS_S
02530 #undef GAN_MAT_RMULTS_Q
02531 #undef GAN_MAT_RMULTS_S
02532 #undef GAN_SYMMATL_LRMULT_Q
02533 #undef GAN_SYMMATL_LRMULT_S
02534 #undef GAN_SYMMATR_LRMULT_Q
02535 #undef GAN_SYMMATR_LRMULT_S
02536 #undef GAN_MAT_LMULTL_Q
02537 #undef GAN_MAT_LMULTL_S
02538 #undef GAN_MAT_LMULTL_I
02539 #undef GAN_MAT_LMULTLI_Q
02540 #undef GAN_MAT_LMULTLI_S
02541 #undef GAN_MAT_LMULTLI_I
02542 #undef GAN_MAT_LMULTLT_Q
02543 #undef GAN_MAT_LMULTLT_S
02544 #undef GAN_MAT_LMULTLT_I
02545 #undef GAN_MAT_LMULTLIT_Q
02546 #undef GAN_MAT_LMULTLIT_S
02547 #undef GAN_MAT_LMULTLIT_I
02548 #undef GAN_MAT_RMULTL_Q
02549 #undef GAN_MAT_RMULTL_S
02550 #undef GAN_MAT_RMULTL_I
02551 #undef GAN_MAT_RMULTLI_Q
02552 #undef GAN_MAT_RMULTLI_S
02553 #undef GAN_MAT_RMULTLI_I
02554 #undef GAN_MAT_RMULTLT_Q
02555 #undef GAN_MAT_RMULTLT_S
02556 #undef GAN_MAT_RMULTLT_I
02557 #undef GAN_MAT_RMULTLIT_Q
02558 #undef GAN_MAT_RMULTLIT_S
02559 #undef GAN_MAT_RMULTLIT_I
02560 #undef GAN_MAT_SRMULTT_Q
02561 #undef GAN_MAT_SRMULTT_S
02562 #undef GAN_MAT_SRMULTT_I
02563 #undef GAN_MAT_SLMULTT_Q
02564 #undef GAN_MAT_SLMULTT_S
02565 #undef GAN_MAT_SLMULTT_I
02566 #undef GAN_MAT_RMULTLIT_S
02567 #undef GAN_MAT_SUMSQR_Q
02568 #undef GAN_MAT_SUMSQR_S
02569 #undef GAN_MAT_FNORM_Q
02570 #undef GAN_MAT_FNORM_S
02571 #undef GAN_MAT_FROM_MAT_Q
02572 #undef GAN_MAT_FROM_MAT_S
02573 #undef GAN_MAT_FROM_SQUMAT_Q
02574 #undef GAN_MAT_FROM_SQUMAT_S
02575 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02576 #undef GAN_SQUMAT_FROM_SQUMAT_S
02577 
02578 /* declare functions specific to lower triangular 2x2 matrices */
02592 /* This library is free software; you can redistribute it and/or
02593    modify it under the terms of the GNU Lesser General Public
02594    License as published by the Free Software Foundation; either
02595    version 2.1 of the License, or (at your option) any later version.
02596 
02597    This library is distributed in the hope that it will be useful,
02598    but WITHOUT ANY WARRANTY; without even the implied warranty of
02599    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02600    Lesser General Public License for more details.
02601 
02602    You should have received a copy of the GNU Lesser General Public
02603    License along with this library; if not, write to the Free Software
02604    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02605 */
02606 
02607 #ifndef _GAN_2X2LTMAT_H
02608 
02624 Gan_SquMatrix22 *gan_ltmat22_fill_q ( Gan_SquMatrix22 *A, double XX,
02625                                       double YX, double YY );
02626 
02632 #endif /* #ifndef _GAN_2X2LTMAT_H */
02633 
02634 #define GAN_MATTYPE Gan_SquMatrix22
02635 #define GAN_MATRIX_TYPE Gan_SquMatrix
02636 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
02637 #define GAN_VECTOR_TYPE Gan_Vector
02638 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
02639 #define GAN_REALTYPE double
02640 #define GAN_VECTYPE1 Gan_Vector2
02641 #define GAN_VECTYPE2 Gan_Vector2
02642 #define GAN_SQUMATTYPEL Gan_SquMatrix22
02643 #define GAN_SQUMATTYPER Gan_SquMatrix22
02644 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX22
02645 #define GAN_MAT_FPRINT     gan_ltmat22_fprint
02646 #define GAN_MAT_PRINT      gan_ltmat22_print
02647 #define GAN_MAT_FSCANF     gan_ltmat22_fscanf
02648 #define GAN_MAT_FWRITE     gan_ltmat22_fwrite
02649 #define GAN_MAT_FREAD      gan_ltmat22_fread
02650 #define GAN_MAT_ZERO_Q     gan_ltmat22_zero_q
02651 #define GAN_MAT_ZERO_S     gan_ltmat22_zero_s
02652 #define GAN_MAT_COPY_Q     gan_ltmat22_copy_q
02653 #define GAN_MAT_COPY_S     gan_ltmat22_copy_s
02654 #define GAN_MAT_SCALE_Q    gan_ltmat22_scale_q
02655 #define GAN_MAT_SCALE_S    gan_ltmat22_scale_s
02656 #define GAN_MAT_SCALE_I    gan_ltmat22_scale_i
02657 #define GAN_MAT_DIVIDE_Q   gan_ltmat22_divide_q
02658 #define GAN_MAT_DIVIDE_S   gan_ltmat22_divide_s
02659 #define GAN_MAT_DIVIDE_I   gan_ltmat22_divide_i
02660 #define GAN_MAT_NEGATE_Q   gan_ltmat22_negate_q
02661 #define GAN_MAT_NEGATE_S   gan_ltmat22_negate_s
02662 #define GAN_MAT_NEGATE_I   gan_ltmat22_negate_i
02663 #define GAN_MAT_UNIT_Q     gan_ltmat22_unit_q
02664 #define GAN_MAT_UNIT_S     gan_ltmat22_unit_s
02665 #define GAN_MAT_UNIT_I     gan_ltmat22_unit_i
02666 #define GAN_MAT_ADD_Q      gan_ltmat22_add_q
02667 #define GAN_MAT_ADD_I1     gan_ltmat22_add_i1
02668 #define GAN_MAT_ADD_I2     gan_ltmat22_add_i2
02669 #define GAN_MAT_INCREMENT  gan_ltmat22_increment
02670 #define GAN_MAT_ADD_S      gan_ltmat22_add_s
02671 #define GAN_MAT_SUB_Q      gan_ltmat22_sub_q
02672 #define GAN_MAT_SUB_I1     gan_ltmat22_sub_i1
02673 #define GAN_MAT_SUB_I2     gan_ltmat22_sub_i2
02674 #define GAN_MAT_DECREMENT  gan_ltmat22_decrement
02675 #define GAN_MAT_SUB_S      gan_ltmat22_sub_s
02676 #define GAN_MAT_MULTV_Q    gan_ltmat22_multv2_q
02677 #define GAN_MAT_MULTV_S    gan_ltmat22_multv2_s
02678 #define GAN_MAT_MULTV_I    gan_ltmat22_multv2_i
02679 #define GAN_MATT_MULTV_Q   gan_ltmat22T_multv2_q
02680 #define GAN_MATT_MULTV_S   gan_ltmat22T_multv2_s
02681 #define GAN_MATT_MULTV_I   gan_ltmat22T_multv2_i
02682 #define GAN_MAT_SRMULTT_Q  gan_ltmat22_srmultT_q
02683 #define GAN_MAT_SRMULTT_S  gan_ltmat22_srmultT_s
02684 #define GAN_MAT_SRMULTT_I  gan_ltmat22_srmultT_i
02685 #define GAN_MAT_SLMULTT_Q  gan_ltmat22_slmultT_q
02686 #define GAN_MAT_SLMULTT_S  gan_ltmat22_slmultT_s
02687 #define GAN_MAT_SLMULTT_I  gan_ltmat22_slmultT_i
02688 #define GAN_MAT_SUMSQR_Q   gan_ltmat22_sumsqr_q
02689 #define GAN_MAT_SUMSQR_S   gan_ltmat22_sumsqr_s
02690 #define GAN_MAT_FNORM_Q    gan_ltmat22_Fnorm_q
02691 #define GAN_MAT_FNORM_S    gan_ltmat22_Fnorm_s
02692 
02693 #define GAN_SQUMAT_IDENT_Q    gan_ltmat22_ident_q
02694 #define GAN_SQUMAT_IDENT_S    gan_ltmat22_ident_s
02695 #define GAN_SQUMATI_MULTV_Q   gan_ltmat22I_multv2_q
02696 #define GAN_SQUMATI_MULTV_S   gan_ltmat22I_multv2_s
02697 #define GAN_SQUMATI_MULTV_I   gan_ltmat22I_multv2_i
02698 #define GAN_SQUMATIT_MULTV_Q  gan_ltmat22IT_multv2_q
02699 #define GAN_SQUMATIT_MULTV_S  gan_ltmat22IT_multv2_s
02700 #define GAN_SQUMATIT_MULTV_I  gan_ltmat22IT_multv2_i
02701 #define GAN_SQUMAT_INVERT     gan_ltmat22_invert
02702 #define GAN_SQUMAT_INVERT_Q   gan_ltmat22_invert_q
02703 #define GAN_SQUMAT_INVERT_S   gan_ltmat22_invert_s
02704 #define GAN_SQUMAT_INVERT_I   gan_ltmat22_invert_i
02705 #define GAN_SQUMAT_DET_Q      gan_ltmat22_det_q
02706 #define GAN_SQUMAT_DET_S      gan_ltmat22_det_s
02707 #define GAN_SQUMAT_TRACE_Q    gan_ltmat22_trace_q
02708 #define GAN_SQUMAT_TRACE_S    gan_ltmat22_trace_s
02709 
02710 #ifndef _GAN_2X2LTMAT_H
02711 #define _GAN_2X2LTMAT_H
02712 
02713 
02714 #endif /* #ifndef _GAN_2X2LTMAT_H */
02715 
02728 /* This library is free software; you can redistribute it and/or
02729    modify it under the terms of the GNU Lesser General Public
02730    License as published by the Free Software Foundation; either
02731    version 2.1 of the License, or (at your option) any later version.
02732 
02733    This library is distributed in the hope that it will be useful,
02734    but WITHOUT ANY WARRANTY; without even the implied warranty of
02735    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02736    Lesser General Public License for more details.
02737 
02738    You should have received a copy of the GNU Lesser General Public
02739    License along with this library; if not, write to the Free Software
02740    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02741 */
02742 
02743 /* function declarations for functions common to all small square matrix
02744  * types */
02745 
02746 
02747 
02748 /* documentation for macros defined in individual header files */
02749 
02762 Gan_SquMatrix22 *gan_ltmat22_ident_q ( Gan_SquMatrix22 *A );
02763 
02801 Gan_Vector2 *gan_ltmat22I_multv2_q ( Gan_SquMatrix22 *A, Gan_Vector2 *p,
02802                                     Gan_Vector2 *q );
02803 
02812 Gan_Vector2 *gan_ltmat22I_multv2_i ( Gan_SquMatrix22 *A, Gan_Vector2 *p );
02813 
02822 Gan_Vector2 *gan_ltmat22IT_multv2_q ( Gan_SquMatrix22 *A, Gan_Vector2 *p,
02823                                      Gan_Vector2 *q );
02824 
02833 Gan_Vector2 *gan_ltmat22IT_multv2_i ( Gan_SquMatrix22 *A, Gan_Vector2 *p );
02834 
02852 Gan_SquMatrix22 *gan_ltmat22_invert_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02853 
02862 Gan_SquMatrix22 *gan_ltmat22_invert_i ( Gan_SquMatrix22 *A );
02863 
02878 double gan_ltmat22_det_q ( Gan_SquMatrix22 *A );
02879 
02885 double gan_ltmat22_trace_q ( Gan_SquMatrix22 *A );
02886 
02892 #undef GAN_SQUMAT_IDENT_Q
02893 #undef GAN_SQUMAT_IDENT_S
02894 #undef GAN_SQUMAT_TPOSE_Q
02895 #undef GAN_SQUMAT_TPOSE_S
02896 #undef GAN_SQUMAT_TPOSE_I
02897 #undef GAN_MAT_SADDT_Q
02898 #undef GAN_MAT_SADDT_S
02899 #undef GAN_SQUMATI_MULTV_Q
02900 #undef GAN_SQUMATI_MULTV_S
02901 #undef GAN_SQUMATI_MULTV_I
02902 #undef GAN_SQUMATIT_MULTV_Q
02903 #undef GAN_SQUMATIT_MULTV_S
02904 #undef GAN_SQUMATIT_MULTV_I
02905 #undef GAN_SQUMAT_INVERT
02906 #undef GAN_SQUMAT_INVERT_Q
02907 #undef GAN_SQUMAT_INVERT_S
02908 #undef GAN_SQUMAT_INVERT_I
02909 #undef GAN_SQUMAT_ADJOINT_Q
02910 #undef GAN_SQUMAT_ADJOINT_S
02911 #undef GAN_SQUMAT_ADJOINTT_Q
02912 #undef GAN_SQUMAT_ADJOINTT_S
02913 #undef GAN_SQUMAT_DET_Q
02914 #undef GAN_SQUMAT_DET_S
02915 #undef GAN_SQUMAT_TRACE_Q
02916 #undef GAN_SQUMAT_TRACE_S
02917 
02930 /* This library is free software; you can redistribute it and/or
02931    modify it under the terms of the GNU Lesser General Public
02932    License as published by the Free Software Foundation; either
02933    version 2.1 of the License, or (at your option) any later version.
02934 
02935    This library is distributed in the hope that it will be useful,
02936    but WITHOUT ANY WARRANTY; without even the implied warranty of
02937    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02938    Lesser General Public License for more details.
02939 
02940    You should have received a copy of the GNU Lesser General Public
02941    License along with this library; if not, write to the Free Software
02942    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02943 */
02944 
02945 /* function declarations for functions common to all small vector types */
02946 
02947 
02948 
02949 /* documentation for macros defined in individual header files */
02950 
02961 Gan_SquMatrix22 *gan_ltmat22_zero_q ( Gan_SquMatrix22 *A );
02962 
02979 Gan_SquMatrix22 *gan_ltmat22_copy_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
02980 
02998 Gan_SquMatrix22 *gan_ltmat22_scale_q ( Gan_SquMatrix22 *A, double a,
02999                                Gan_SquMatrix22 *B );
03000 
03008 Gan_SquMatrix22 *gan_ltmat22_scale_i ( Gan_SquMatrix22 *A, double a );
03009 
03018 Gan_SquMatrix22 *gan_ltmat22_divide_q ( Gan_SquMatrix22 *A, double a,
03019                                 Gan_SquMatrix22 *B );
03020 
03028 Gan_SquMatrix22 *gan_ltmat22_divide_i ( Gan_SquMatrix22 *A, double a );
03029 
03037 Gan_SquMatrix22 *gan_ltmat22_negate_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03038 
03046 Gan_SquMatrix22 *gan_ltmat22_negate_i ( Gan_SquMatrix22 *A );
03047 
03055 Gan_SquMatrix22 *gan_ltmat22_unit_i ( Gan_SquMatrix22 *A );
03056 
03074 Gan_SquMatrix22 *gan_ltmat22_add_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B, Gan_SquMatrix22 *C );
03075 
03084 Gan_SquMatrix22 *gan_ltmat22_add_i1 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03085 
03094 Gan_SquMatrix22 *gan_ltmat22_add_i2 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03095 
03104 Gan_SquMatrix22 *gan_ltmat22_increment ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03105 
03123 Gan_SquMatrix22 *gan_ltmat22_sub_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B, Gan_SquMatrix22 *C );
03124 
03133 Gan_SquMatrix22 *gan_ltmat22_sub_i1 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03134 
03143 Gan_SquMatrix22 *gan_ltmat22_sub_i2 ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03144 
03153 Gan_SquMatrix22 *gan_ltmat22_decrement ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03154 
03173 Gan_Vector2 *gan_ltmat22_multv2_q ( Gan_SquMatrix22 *A, Gan_Vector2 *p,
03174                                 Gan_Vector2 *q );
03175 
03184 Gan_Vector2 *gan_ltmat22_multv2_i ( Gan_SquMatrix22 *A, Gan_Vector2 *p );
03185 
03194 Gan_Vector2 *gan_ltmat22T_multv2_q ( Gan_SquMatrix22 *A, Gan_Vector2 *p,
03195                                  Gan_Vector2 *q );
03196 
03205 Gan_Vector2 *gan_ltmat22T_multv2_i ( Gan_SquMatrix22 *A, Gan_Vector2 *p );
03206 
03268 Gan_SquMatrix22 *gan_ltmat22_slmultT_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03269 
03279 Gan_SquMatrix22 *gan_ltmat22_slmultT_i ( Gan_SquMatrix22 *A );
03280 
03289 Gan_SquMatrix22 *gan_ltmat22_srmultT_q ( Gan_SquMatrix22 *A, Gan_SquMatrix22 *B );
03290 
03300 Gan_SquMatrix22 *gan_ltmat22_srmultT_i ( Gan_SquMatrix22 *A );
03301 
03316 double gan_ltmat22_sumsqr_q ( Gan_SquMatrix22 *A );
03317 
03324 double gan_ltmat22_Fnorm_q ( Gan_SquMatrix22 *A );
03325 
03356 /* This library is free software; you can redistribute it and/or
03357    modify it under the terms of the GNU Lesser General Public
03358    License as published by the Free Software Foundation; either
03359    version 2.1 of the License, or (at your option) any later version.
03360 
03361    This library is distributed in the hope that it will be useful,
03362    but WITHOUT ANY WARRANTY; without even the implied warranty of
03363    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03364    Lesser General Public License for more details.
03365 
03366    You should have received a copy of the GNU Lesser General Public
03367    License along with this library; if not, write to the Free Software
03368    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03369 */
03370 
03371 #undef GAN_MATTYPE
03372 #undef GAN_MATRIX_TYPE
03373 #undef GAN_SQUMATRIX_TYPE
03374 #undef GAN_VECTOR_TYPE
03375 #undef GAN_MAT_ELEMENT_TYPE
03376 #undef GAN_REALTYPE
03377 #undef GAN_VECTYPE1
03378 #undef GAN_VECTYPE2
03379 #undef GAN_MATTYPEL
03380 #undef GAN_MATTYPER
03381 #undef GAN_SQUMATTYPEL
03382 #undef GAN_SQUMATTYPER
03383 #undef GAN_FIXED_MATRIX_TYPE
03384 #undef GAN_MAT_FPRINT
03385 #undef GAN_MAT_PRINT
03386 #undef GAN_MAT_FSCANF
03387 #undef GAN_MAT_FWRITE
03388 #undef GAN_MAT_FREAD
03389 #undef GAN_MAT_ZERO_Q
03390 #undef GAN_MAT_ZERO_S
03391 #undef GAN_MAT_COPY_Q
03392 #undef GAN_MAT_COPY_S
03393 #undef GAN_MAT_SCALE_Q
03394 #undef GAN_MAT_SCALE_S
03395 #undef GAN_MAT_SCALE_I
03396 #undef GAN_MAT_DIVIDE_Q
03397 #undef GAN_MAT_DIVIDE_S
03398 #undef GAN_MAT_DIVIDE_I
03399 #undef GAN_MAT_NEGATE_Q
03400 #undef GAN_MAT_NEGATE_S
03401 #undef GAN_MAT_NEGATE_I
03402 #undef GAN_MAT_UNIT_Q
03403 #undef GAN_MAT_UNIT_S
03404 #undef GAN_MAT_UNIT_I
03405 #undef GAN_MAT_ADD_Q
03406 #undef GAN_MAT_ADD_I1
03407 #undef GAN_MAT_ADD_I2
03408 #undef GAN_MAT_INCREMENT
03409 #undef GAN_MAT_ADD_S
03410 #undef GAN_MAT_SUB_Q
03411 #undef GAN_MAT_SUB_I1
03412 #undef GAN_MAT_SUB_I2
03413 #undef GAN_MAT_DECREMENT
03414 #undef GAN_MAT_SUB_S
03415 #undef GAN_VEC_OUTER_Q
03416 #undef GAN_VEC_OUTER_S
03417 #undef GAN_MAT_MULTV_Q
03418 #undef GAN_MAT_MULTV_S
03419 #undef GAN_MAT_MULTV_I
03420 #undef GAN_MATT_MULTV_Q
03421 #undef GAN_MATT_MULTV_S
03422 #undef GAN_MATT_MULTV_I
03423 #undef GAN_MAT_LMULTM_Q
03424 #undef GAN_MAT_LMULTM_S
03425 #undef GAN_MAT_LMULTMT_Q
03426 #undef GAN_MAT_LMULTMT_S
03427 #undef GAN_MAT_RMULTM_Q
03428 #undef GAN_MAT_RMULTM_S
03429 #undef GAN_MAT_RMULTMT_Q
03430 #undef GAN_MAT_RMULTMT_S
03431 #undef GAN_MAT_LMULTMT_SYM_Q
03432 #undef GAN_MAT_LMULTMT_SYM_S
03433 #undef GAN_MAT_RMULTMT_SYM_Q
03434 #undef GAN_MAT_RMULTMT_SYM_S
03435 #undef GAN_MAT_LMULTS_Q
03436 #undef GAN_MAT_LMULTS_S
03437 #undef GAN_MAT_RMULTS_Q
03438 #undef GAN_MAT_RMULTS_S
03439 #undef GAN_SYMMATL_LRMULT_Q
03440 #undef GAN_SYMMATL_LRMULT_S
03441 #undef GAN_SYMMATR_LRMULT_Q
03442 #undef GAN_SYMMATR_LRMULT_S
03443 #undef GAN_MAT_LMULTL_Q
03444 #undef GAN_MAT_LMULTL_S
03445 #undef GAN_MAT_LMULTL_I
03446 #undef GAN_MAT_LMULTLI_Q
03447 #undef GAN_MAT_LMULTLI_S
03448 #undef GAN_MAT_LMULTLI_I
03449 #undef GAN_MAT_LMULTLT_Q
03450 #undef GAN_MAT_LMULTLT_S
03451 #undef GAN_MAT_LMULTLT_I
03452 #undef GAN_MAT_LMULTLIT_Q
03453 #undef GAN_MAT_LMULTLIT_S
03454 #undef GAN_MAT_LMULTLIT_I
03455 #undef GAN_MAT_RMULTL_Q
03456 #undef GAN_MAT_RMULTL_S
03457 #undef GAN_MAT_RMULTL_I
03458 #undef GAN_MAT_RMULTLI_Q
03459 #undef GAN_MAT_RMULTLI_S
03460 #undef GAN_MAT_RMULTLI_I
03461 #undef GAN_MAT_RMULTLT_Q
03462 #undef GAN_MAT_RMULTLT_S
03463 #undef GAN_MAT_RMULTLT_I
03464 #undef GAN_MAT_RMULTLIT_Q
03465 #undef GAN_MAT_RMULTLIT_S
03466 #undef GAN_MAT_RMULTLIT_I
03467 #undef GAN_MAT_SRMULTT_Q
03468 #undef GAN_MAT_SRMULTT_S
03469 #undef GAN_MAT_SRMULTT_I
03470 #undef GAN_MAT_SLMULTT_Q
03471 #undef GAN_MAT_SLMULTT_S
03472 #undef GAN_MAT_SLMULTT_I
03473 #undef GAN_MAT_RMULTLIT_S
03474 #undef GAN_MAT_SUMSQR_Q
03475 #undef GAN_MAT_SUMSQR_S
03476 #undef GAN_MAT_FNORM_Q
03477 #undef GAN_MAT_FNORM_S
03478 #undef GAN_MAT_FROM_MAT_Q
03479 #undef GAN_MAT_FROM_MAT_S
03480 #undef GAN_MAT_FROM_SQUMAT_Q
03481 #undef GAN_MAT_FROM_SQUMAT_S
03482 #undef GAN_SQUMAT_FROM_SQUMAT_Q
03483 #undef GAN_SQUMAT_FROM_SQUMAT_S
03484 
03485 /* declare functions specific to upper triangular 2x2 matrices */
03499 /* This library is free software; you can redistribute it and/or
03500    modify it under the terms of the GNU Lesser General Public
03501    License as published by the Free Software Foundation; either
03502    version 2.1 of the License, or (at your option) any later version.
03503 
03504    This library is distributed in the hope that it will be useful,
03505    but WITHOUT ANY WARRANTY; without even the implied warranty of
03506    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03507    Lesser General Public License for more details.
03508 
03509    You should have received a copy of the GNU Lesser General Public
03510    License along with this library; if not, write to the Free Software
03511    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03512 */
03513 
03514 #define GAN_MATTYPE Gan_SquMatrix22
03515 #define GAN_MATRIX_TYPE Gan_SquMatrix
03516 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03517 #define GAN_VECTOR_TYPE Gan_Vector
03518 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03519 #define GAN_REALTYPE double
03520 #define GAN_MAT_FPRINT   gan_ltmat22T_fprint
03521 #define GAN_MAT_PRINT    gan_ltmat22T_print
03522 #define GAN_MAT_FSCANF   gan_ltmat22T_fscanf
03523 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX22
03524 
03525 #define gan_ltmat22T_fwrite gan_ltmat22_fwrite
03526 #define gan_ltmat22T_fread  gan_ltmat22_fread
03527 
03540 /* This library is free software; you can redistribute it and/or
03541    modify it under the terms of the GNU Lesser General Public
03542    License as published by the Free Software Foundation; either
03543    version 2.1 of the License, or (at your option) any later version.
03544 
03545    This library is distributed in the hope that it will be useful,
03546    but WITHOUT ANY WARRANTY; without even the implied warranty of
03547    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03548    Lesser General Public License for more details.
03549 
03550    You should have received a copy of the GNU Lesser General Public
03551    License along with this library; if not, write to the Free Software
03552    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03553 */
03554 
03555 /* function declarations for functions common to all small square matrix
03556  * types */
03557 
03558 
03559 
03560 /* documentation for macros defined in individual header files */
03561 
03628 #undef GAN_SQUMAT_IDENT_Q
03629 #undef GAN_SQUMAT_IDENT_S
03630 #undef GAN_SQUMAT_TPOSE_Q
03631 #undef GAN_SQUMAT_TPOSE_S
03632 #undef GAN_SQUMAT_TPOSE_I
03633 #undef GAN_MAT_SADDT_Q
03634 #undef GAN_MAT_SADDT_S
03635 #undef GAN_SQUMATI_MULTV_Q
03636 #undef GAN_SQUMATI_MULTV_S
03637 #undef GAN_SQUMATI_MULTV_I
03638 #undef GAN_SQUMATIT_MULTV_Q
03639 #undef GAN_SQUMATIT_MULTV_S
03640 #undef GAN_SQUMATIT_MULTV_I
03641 #undef GAN_SQUMAT_INVERT
03642 #undef GAN_SQUMAT_INVERT_Q
03643 #undef GAN_SQUMAT_INVERT_S
03644 #undef GAN_SQUMAT_INVERT_I
03645 #undef GAN_SQUMAT_ADJOINT_Q
03646 #undef GAN_SQUMAT_ADJOINT_S
03647 #undef GAN_SQUMAT_ADJOINTT_Q
03648 #undef GAN_SQUMAT_ADJOINTT_S
03649 #undef GAN_SQUMAT_DET_Q
03650 #undef GAN_SQUMAT_DET_S
03651 #undef GAN_SQUMAT_TRACE_Q
03652 #undef GAN_SQUMAT_TRACE_S
03653 
03666 /* This library is free software; you can redistribute it and/or
03667    modify it under the terms of the GNU Lesser General Public
03668    License as published by the Free Software Foundation; either
03669    version 2.1 of the License, or (at your option) any later version.
03670 
03671    This library is distributed in the hope that it will be useful,
03672    but WITHOUT ANY WARRANTY; without even the implied warranty of
03673    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03674    Lesser General Public License for more details.
03675 
03676    You should have received a copy of the GNU Lesser General Public
03677    License along with this library; if not, write to the Free Software
03678    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03679 */
03680 
03681 /* function declarations for functions common to all small vector types */
03682 
03683 
03684 
03685 /* documentation for macros defined in individual header files */
03686 
03857 /* This library is free software; you can redistribute it and/or
03858    modify it under the terms of the GNU Lesser General Public
03859    License as published by the Free Software Foundation; either
03860    version 2.1 of the License, or (at your option) any later version.
03861 
03862    This library is distributed in the hope that it will be useful,
03863    but WITHOUT ANY WARRANTY; without even the implied warranty of
03864    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03865    Lesser General Public License for more details.
03866 
03867    You should have received a copy of the GNU Lesser General Public
03868    License along with this library; if not, write to the Free Software
03869    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03870 */
03871 
03872 #undef GAN_MATTYPE
03873 #undef GAN_MATRIX_TYPE
03874 #undef GAN_SQUMATRIX_TYPE
03875 #undef GAN_VECTOR_TYPE
03876 #undef GAN_MAT_ELEMENT_TYPE
03877 #undef GAN_REALTYPE
03878 #undef GAN_VECTYPE1
03879 #undef GAN_VECTYPE2
03880 #undef GAN_MATTYPEL
03881 #undef GAN_MATTYPER
03882 #undef GAN_SQUMATTYPEL
03883 #undef GAN_SQUMATTYPER
03884 #undef GAN_FIXED_MATRIX_TYPE
03885 #undef GAN_MAT_FPRINT
03886 #undef GAN_MAT_PRINT
03887 #undef GAN_MAT_FSCANF
03888 #undef GAN_MAT_FWRITE
03889 #undef GAN_MAT_FREAD
03890 #undef GAN_MAT_ZERO_Q
03891 #undef GAN_MAT_ZERO_S
03892 #undef GAN_MAT_COPY_Q
03893 #undef GAN_MAT_COPY_S
03894 #undef GAN_MAT_SCALE_Q
03895 #undef GAN_MAT_SCALE_S
03896 #undef GAN_MAT_SCALE_I
03897 #undef GAN_MAT_DIVIDE_Q
03898 #undef GAN_MAT_DIVIDE_S
03899 #undef GAN_MAT_DIVIDE_I
03900 #undef GAN_MAT_NEGATE_Q
03901 #undef GAN_MAT_NEGATE_S
03902 #undef GAN_MAT_NEGATE_I
03903 #undef GAN_MAT_UNIT_Q
03904 #undef GAN_MAT_UNIT_S
03905 #undef GAN_MAT_UNIT_I
03906 #undef GAN_MAT_ADD_Q
03907 #undef GAN_MAT_ADD_I1
03908 #undef GAN_MAT_ADD_I2
03909 #undef GAN_MAT_INCREMENT
03910 #undef GAN_MAT_ADD_S
03911 #undef GAN_MAT_SUB_Q
03912 #undef GAN_MAT_SUB_I1
03913 #undef GAN_MAT_SUB_I2
03914 #undef GAN_MAT_DECREMENT
03915 #undef GAN_MAT_SUB_S
03916 #undef GAN_VEC_OUTER_Q
03917 #undef GAN_VEC_OUTER_S
03918 #undef GAN_MAT_MULTV_Q
03919 #undef GAN_MAT_MULTV_S
03920 #undef GAN_MAT_MULTV_I
03921 #undef GAN_MATT_MULTV_Q
03922 #undef GAN_MATT_MULTV_S
03923 #undef GAN_MATT_MULTV_I
03924 #undef GAN_MAT_LMULTM_Q
03925 #undef GAN_MAT_LMULTM_S
03926 #undef GAN_MAT_LMULTMT_Q
03927 #undef GAN_MAT_LMULTMT_S
03928 #undef GAN_MAT_RMULTM_Q
03929 #undef GAN_MAT_RMULTM_S
03930 #undef GAN_MAT_RMULTMT_Q
03931 #undef GAN_MAT_RMULTMT_S
03932 #undef GAN_MAT_LMULTMT_SYM_Q
03933 #undef GAN_MAT_LMULTMT_SYM_S
03934 #undef GAN_MAT_RMULTMT_SYM_Q
03935 #undef GAN_MAT_RMULTMT_SYM_S
03936 #undef GAN_MAT_LMULTS_Q
03937 #undef GAN_MAT_LMULTS_S
03938 #undef GAN_MAT_RMULTS_Q
03939 #undef GAN_MAT_RMULTS_S
03940 #undef GAN_SYMMATL_LRMULT_Q
03941 #undef GAN_SYMMATL_LRMULT_S
03942 #undef GAN_SYMMATR_LRMULT_Q
03943 #undef GAN_SYMMATR_LRMULT_S
03944 #undef GAN_MAT_LMULTL_Q
03945 #undef GAN_MAT_LMULTL_S
03946 #undef GAN_MAT_LMULTL_I
03947 #undef GAN_MAT_LMULTLI_Q
03948 #undef GAN_MAT_LMULTLI_S
03949 #undef GAN_MAT_LMULTLI_I
03950 #undef GAN_MAT_LMULTLT_Q
03951 #undef GAN_MAT_LMULTLT_S
03952 #undef GAN_MAT_LMULTLT_I
03953 #undef GAN_MAT_LMULTLIT_Q
03954 #undef GAN_MAT_LMULTLIT_S
03955 #undef GAN_MAT_LMULTLIT_I
03956 #undef GAN_MAT_RMULTL_Q
03957 #undef GAN_MAT_RMULTL_S
03958 #undef GAN_MAT_RMULTL_I
03959 #undef GAN_MAT_RMULTLI_Q
03960 #undef GAN_MAT_RMULTLI_S
03961 #undef GAN_MAT_RMULTLI_I
03962 #undef GAN_MAT_RMULTLT_Q
03963 #undef GAN_MAT_RMULTLT_S
03964 #undef GAN_MAT_RMULTLT_I
03965 #undef GAN_MAT_RMULTLIT_Q
03966 #undef GAN_MAT_RMULTLIT_S
03967 #undef GAN_MAT_RMULTLIT_I
03968 #undef GAN_MAT_SRMULTT_Q
03969 #undef GAN_MAT_SRMULTT_S
03970 #undef GAN_MAT_SRMULTT_I
03971 #undef GAN_MAT_SLMULTT_Q
03972 #undef GAN_MAT_SLMULTT_S
03973 #undef GAN_MAT_SLMULTT_I
03974 #undef GAN_MAT_RMULTLIT_S
03975 #undef GAN_MAT_SUMSQR_Q
03976 #undef GAN_MAT_SUMSQR_S
03977 #undef GAN_MAT_FNORM_Q
03978 #undef GAN_MAT_FNORM_S
03979 #undef GAN_MAT_FROM_MAT_Q
03980 #undef GAN_MAT_FROM_MAT_S
03981 #undef GAN_MAT_FROM_SQUMAT_Q
03982 #undef GAN_MAT_FROM_SQUMAT_S
03983 #undef GAN_SQUMAT_FROM_SQUMAT_Q
03984 #undef GAN_SQUMAT_FROM_SQUMAT_S
03985 
03998 #ifdef __cplusplus
03999 }
04000 #endif
04001 
04002 #endif /* #ifndef _GAN_2X2MATRIX_H */

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