Main Page   Modules   Compound List   File List   Compound Members   File Members  

4x4matrix.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_4X4MATRIX_H
00030 #define _GAN_4X4MATRIX_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_REPEAT44_H
00065 #define _GAN_REPEAT44_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 
00218 /* This library is free software; you can redistribute it and/or
00219    modify it under the terms of the GNU Lesser General Public
00220    License as published by the Free Software Foundation; either
00221    version 2.1 of the License, or (at your option) any later version.
00222 
00223    This library is distributed in the hope that it will be useful,
00224    but WITHOUT ANY WARRANTY; without even the implied warranty of
00225    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00226    Lesser General Public License for more details.
00227 
00228    You should have received a copy of the GNU Lesser General Public
00229    License along with this library; if not, write to the Free Software
00230    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00231 */
00232 
00233 #ifndef _GAN_REPEAT3_H
00234 #define _GAN_REPEAT3_H
00235 
00236 #ifdef __cplusplus
00237 extern "C" {
00238 #endif
00239 
00240 /* macros for constructing three-fold repetitions */
00241 #define GAN_REP3_AS(a,b,p1,p2,p3) (a p1 b, a p2 b, a p3 b)
00242 #define GAN_REP3_AS_C(a,b) GAN_REP3_AS(a,b,x,y,z)
00243 #define GAN_REP3_A(a,p1,p2,p3) (a p1, a p2, a p3)
00244 #define GAN_REP3_A_C(a) GAN_REP3_A(a,x,y,z)
00245 
00246 #define GAN_FREP3_A(a,b,p1,p2,p3,q1,q2,q3) (a p1 b q1, a p2 b q2, a p3 b q3)
00247 #define GAN_FREP3_A_C(a,b,p1,p2,p3) GAN_FREP3_A(a,b,x,y,z,p1,p2,p3)
00248 
00249 
00250 #define GAN_REP3_ABS(a,b,c,p1,p2,p3,q1,q2,q3)\
00251            (a p1 b q1 c, a p2 b q2 c, a p3 b q3 c)
00252 #define GAN_REP3_AAS(a,b,c,p1,p2,p3) GAN_REP3_ABS(a,b,c,p1,p2,p3,p1,p2,p3)
00253 #define GAN_REP3_AAS_C(a,b,c) GAN_REP3_AAS(a,b,c,x,y,z)
00254 
00255 #define GAN_REP3_AB(a,b,p1,p2,p3,q1,q2,q3)\
00256            (a p1 b q1, a p2 b q2, a p3 b q3)
00257 #define GAN_REP3_AA(a,b,p1,p2,p3) GAN_REP3_AB(a,b,p1,p2,p3,p1,p2,p3)
00258 #define GAN_REP3_AA_C(a,b) GAN_REP3_AA(a,b,x,y,z)
00259 
00260 #define GAN_REP3_ABCS(a,b,c,d,p1,p2,p3,q1,q2,q3,r1,r2,r3)\
00261            (a p1 b q1 c r1 d, a p2 b q2 c r2 d, a p3 b q3 c r3 d)
00262 #define GAN_REP3_ABC(a,b,c,p1,p2,p3,q1,q2,q3,r1,r2,r3)\
00263            (a p1 b q1 c r1, a p2 b q2 c r2, a p3 b q3 c r3)
00264 #define GAN_REP3_AAA(a,b,c,p1,p2,p3)\
00265         GAN_REP3_ABC(a,b,c,p1,p2,p3,p1,p2,p3,p1,p2,p3)
00266 #define GAN_REP3_AAA_C(a,b,c) GAN_REP3_AAA(a,b,c,x,y,z)
00267 
00268 #define GAN_REP3_OP_AB(a,b,p1,p2,p3,q1,q2,q3,op)\
00269            (a p1 b q1 op a p2 b q2 op a p3 b q3)
00270 #define GAN_REP3_OP_AA(a,b,p1,p2,p3,op)\
00271            GAN_REP3_OP_AB(a,b,p1,p2,p3,p1,p2,p3,op)
00272 #define GAN_REP3_OP_AA_C(a,b,op) GAN_REP3_OP_AA(a,b,x,y,z,op)
00273 
00274 #ifdef __cplusplus
00275 }
00276 #endif
00277 
00278 #endif /* #ifndef _GAN_REPEAT3_H */
00279 
00292 /* This library is free software; you can redistribute it and/or
00293    modify it under the terms of the GNU Lesser General Public
00294    License as published by the Free Software Foundation; either
00295    version 2.1 of the License, or (at your option) any later version.
00296 
00297    This library is distributed in the hope that it will be useful,
00298    but WITHOUT ANY WARRANTY; without even the implied warranty of
00299    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00300    Lesser General Public License for more details.
00301 
00302    You should have received a copy of the GNU Lesser General Public
00303    License along with this library; if not, write to the Free Software
00304    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00305 */
00306 
00307 #ifndef _GAN_REPEAT4_H
00308 #define _GAN_REPEAT4_H
00309 
00310 #ifdef __cplusplus
00311 extern "C" {
00312 #endif
00313 
00314 /* macros for constructing four-fold repetitions */
00315 #define GAN_REP4_AS(a,b,p1,p2,p3,p4) (a p1 b, a p2 b, a p3 b, a p4 b)
00316 #define GAN_REP4_AS_C(a,b) GAN_REP4_AS(a,b,x,y,z,w)
00317 #define GAN_REP4_A(a,p1,p2,p3,p4) (a p1, a p2, a p3, a p4)
00318 #define GAN_REP4_A_C(a) GAN_REP4_A(a,x,y,z,w)
00319 
00320 #define GAN_FREP4_A(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00321     (a p1 b q1, a p2 b q2,\
00322      a p3 b q3, a p4 b q4)
00323 #define GAN_FREP4_A_C(a,b,p1,p2,p3,p4) GAN_FREP4_A(a,b,x,y,z,w,p1,p2,p3,p4)
00324 
00325 #define GAN_REP4_ABS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00326            (a p1 b q1 c, a p2 b q2 c, a p3 b q3 c, a p4 b q4 c)
00327 #define GAN_REP4_AAS(a,b,c,p1,p2,p3,p4)\
00328            GAN_REP4_ABS(a,b,c,p1,p2,p3,p4,p1,p2,p3,p4)
00329 #define GAN_REP4_AAS_C(a,b,c) GAN_REP4_AAS(a,b,c,x,y,z,w)
00330 
00331 #define GAN_REP4_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00332            (a p1 b q1, a p2 b q2, a p3 b q3, a p4 b q4)
00333 #define GAN_REP4_AA(a,b,p1,p2,p3,p4)\
00334            GAN_REP4_AB(a,b,p1,p2,p3,p4,p1,p2,p3,p4)
00335 #define GAN_REP4_AA_C(a,b) GAN_REP4_AA(a,b,x,y,z,w)
00336 
00337 #define GAN_REP4_ABCS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4)\
00338      (a p1 b q1 c r1 d, a p2 b q2 c r2 d, a p3 b q3 c r3 d, a p4 b q4 c r4 d)
00339 #define GAN_REP4_ABC(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4)\
00340      (a p1 b q1 c r1, a p2 b q2 c r2, a p3 b q3 c r3, a p4 b q4 c r4)
00341 #define GAN_REP4_AAA(a,b,c,p1,p2,p3,p4)\
00342            GAN_REP4_ABC(a,b,c,p1,p2,p3,p4,p1,p2,p3,p4,p1,p2,p3,p4)
00343 #define GAN_REP4_AAA_C(a,b,c) GAN_REP4_AAA(a,b,c,x,y,z,w)
00344 
00345 #define GAN_REP4_OP_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4,op)\
00346         (a p1 b q1 op a p2 b q2 op a p3 b q3 op a p4 b q4)
00347 #define GAN_REP4_OP_AA(a,b,p1,p2,p3,p4,op)\
00348            GAN_REP4_OP_AB(a,b,p1,p2,p3,p4,p1,p2,p3,p4,op)
00349 #define GAN_REP4_OP_AA_C(a,b,op) GAN_REP4_OP_AA(a,b,x,y,z,w,op)
00350 
00351 #ifdef __cplusplus
00352 }
00353 #endif
00354 
00355 #endif /* #ifndef _GAN_REPEAT4_H */
00356 
00357 #ifdef __cplusplus
00358 extern "C" {
00359 #endif
00360 
00361 /* macros for constructing dual two-fold repetitions */
00362 
00363 #define GAN_FREP44_A(a,b,p1,p2,p3,p4,q1,q2,q3,q4,r11,r12,r13,r14,r21,r22,r23,r24,r31,r32,r33,r34,r41,r42,r43,r44)\
00364 (GAN_FREP4_A(a,b,p1##q1,p1##q2,p1##q3,p1##q4,r11,r12,r13,r14),\
00365  GAN_FREP4_A(a,b,p2##q1,p2##q2,p2##q3,p2##q4,r21,r22,r23,r24),\
00366  GAN_FREP4_A(a,b,p3##q1,p3##q2,p3##q3,p3##q4,r31,r32,r33,r34),\
00367  GAN_FREP4_A(a,b,p4##q1,p4##q2,p4##q3,p4##q4,r41,r42,r43,r44))
00368 #define GAN_FREP44_A_C(a,b,r11,r12,r13,r14,r21,r22,r23,r24,r31,r32,r33,r34,r41,r42,r43,r44) \
00369         GAN_FREP44_A(a,b,x,y,z,w,x,y,z,w,r11,r12,r13,r14,r21,r22,r23,r24,r31,r32,r33,r34,r41,r42,r43,r44)
00370 
00371 /* most general macros */
00372 #define GAN_REP44_ABCS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4,t1,t2,t3,t4,u1,u2,u3,u4)\
00373  (GAN_REP4_ABCS(a,b,c,d,p1##q1,p1##q2,p1##q3,p1##q4,\
00374                         r1##s1,r1##s2,r1##s3,r1##s4,\
00375                         t1##u1,t1##u2,t1##u3,t1##u4),\
00376   GAN_REP4_ABCS(a,b,c,d,p2##q1,p2##q2,p2##q3,p2##q4,\
00377                         r2##s1,r2##s2,r2##s3,r2##s4,\
00378                         t2##u1,t2##u2,t2##u3,t2##u4),\
00379   GAN_REP4_ABCS(a,b,c,d,p3##q1,p3##q2,p3##q3,p3##q4,\
00380                         r3##s1,r3##s2,r3##s3,r3##s4,\
00381                         t3##u1,t3##u2,t3##u3,t3##u4),\
00382   GAN_REP4_ABCS(a,b,c,d,p4##q1,p4##q2,p4##q3,p4##q4,\
00383                         r4##s1,r4##s2,r4##s3,r4##s4,\
00384                         t4##u1,t4##u2,t4##u3,t4##u4))
00385 #define GAN_REP44_ABC(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4,t1,t2,t3,t4,u1,u2,u3,u4)\
00386  (GAN_REP4_ABC(a,b,c,p1##q1,p1##q2,p1##q3,p1##q4,\
00387                      r1##s1,r1##s2,r1##s3,r1##s4,\
00388                      t1##u1,t1##u2,t1##u3,t1##u4),\
00389   GAN_REP4_ABC(a,b,c,p2##q1,p2##q2,p2##q3,p2##q4,\
00390                      r2##s1,r2##s2,r2##s3,r2##s4,\
00391                      t2##u1,t2##u2,t2##u3,t2##u4),\
00392   GAN_REP4_ABC(a,b,c,p3##q1,p3##q2,p3##q3,p3##q4,\
00393                      r3##s1,r3##s2,r3##s3,r3##s4,\
00394                      t3##u1,t3##u2,t3##u3,t3##u4),\
00395   GAN_REP4_ABC(a,b,c,p4##q1,p4##q2,p4##q3,p4##q4,\
00396                      r4##s1,r4##s2,r4##s3,r4##s4,\
00397                      t4##u1,t4##u2,t4##u3,t4##u4))
00398 
00399 #define GAN_REP44_AAAS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4)\
00400    GAN_REP44_ABCS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00401 #define GAN_REP44_AAA(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00402    GAN_REP44_ABC(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00403 
00404 #define GAN_REP44_ABS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4)\
00405  (GAN_REP4_ABS(a,b,c,p1##q1,p1##q2,p1##q3,p1##q4,\
00406                      r1##s1,r1##s2,r1##s3,r1##s4),\
00407   GAN_REP4_ABS(a,b,c,p2##q1,p2##q2,p2##q3,p2##q4,\
00408                      r2##s1,r2##s2,r2##s3,r2##s4),\
00409   GAN_REP4_ABS(a,b,c,p3##q1,p3##q2,p3##q3,p3##q4,\
00410                      r3##s1,r3##s2,r3##s3,r3##s4),\
00411   GAN_REP4_ABS(a,b,c,p4##q1,p4##q2,p4##q3,p4##q4,\
00412                      r4##s1,r4##s2,r4##s3,r4##s4))
00413 #define GAN_REP44_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4)\
00414  (GAN_REP4_AB(a,b,p1##q1,p1##q2,p1##q3,p1##q4,\
00415                   r1##s1,r1##s2,r1##s3,r1##s4),\
00416   GAN_REP4_AB(a,b,p2##q1,p2##q2,p2##q3,p2##q4,\
00417                   r2##s1,r2##s2,r2##s3,r2##s4),\
00418   GAN_REP4_AB(a,b,p3##q1,p3##q2,p3##q3,p3##q4,\
00419                   r3##s1,r3##s2,r3##s3,r3##s4),\
00420   GAN_REP4_AB(a,b,p4##q1,p4##q2,p4##q3,p4##q4,\
00421                   r4##s1,r4##s2,r4##s3,r4##s4))
00422 
00423 #define GAN_REP44_AAS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00424            GAN_REP44_ABS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00425 #define GAN_REP44_AA(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00426             GAN_REP44_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00427 
00428 #define GAN_REP44_AS(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00429  (GAN_REP4_AS(a,b,p1##q1,p1##q2,p1##q3,p1##q4),\
00430   GAN_REP4_AS(a,b,p2##q1,p2##q2,p2##q3,p2##q4),\
00431   GAN_REP4_AS(a,b,p3##q1,p3##q2,p3##q3,p3##q4),\
00432   GAN_REP4_AS(a,b,p4##q1,p4##q2,p4##q3,p4##q4))
00433 #define GAN_REP44_A(a,p1,p2,p3,p4,q1,q2,q3,q4)\
00434  (GAN_REP4_A(a,p1##q1,p1##q2,p1##q3,p1##q4),\
00435   GAN_REP4_A(a,p2##q1,p2##q2,p2##q3,p2##q4),\
00436   GAN_REP4_A(a,p3##q1,p3##q2,p3##q3,p3##q4),\
00437   GAN_REP4_A(a,p4##q1,p4##q2,p4##q3,p4##q4))
00438 
00439 /* macros specific to xx, xy etc coordinates */
00440 #define GAN_REP44_AS_C(a,b) GAN_REP44_AS(a,b,x,y,z,w,x,y,z,w)
00441 #define GAN_REP44_AAS_C(a,b,c) GAN_REP44_AAS(a,b,c,x,y,z,w,x,y,z,w)
00442 #define GAN_REP44_AAAS_C(a,b,c,d) GAN_REP44_AAAS(a,b,c,d,x,y,z,w,x,y,z,w)
00443 #define GAN_REP44_A_C(a) GAN_REP44_A(a,x,y,z,w,x,y,z,w)
00444 #define GAN_REP44_AA_C(a,b) GAN_REP44_AA(a,b,x,y,z,w,x,y,z,w)
00445 #define GAN_REP44_AAA_C(a,b,c) GAN_REP44_AAA(a,b,c,x,y,z,w,x,y,z,w)
00446 
00447 /* macro for transpose operation */
00448 #define GAN_REP44_AAT(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00449  (GAN_REP4_AB(a,b,p1##q1,p1##q2,p1##q3,p1##q4,p1##q1,p2##q1,p3##q1,p4##q1),\
00450   GAN_REP4_AB(a,b,p2##q1,p2##q2,p2##q3,p2##q4,p1##q2,p2##q2,p3##q2,p4##q2),\
00451   GAN_REP4_AB(a,b,p3##q1,p3##q2,p3##q3,p3##q4,p1##q3,p2##q3,p3##q3,p4##q3),\
00452   GAN_REP4_AB(a,b,p4##q1,p4##q2,p4##q3,p4##q4,p1##q4,p2##q4,p3##q4,p4##q4))
00453 #define GAN_REP44_AAT_C(a,b) GAN_REP44_AAT(a,b,x,y,z,w,x,y,z,w)
00454 
00455 /* macros for operations on lower triangle of matrices only */
00456 #define GAN_FREP44L_A(a,b,p1,p2,p3,p4,q1,q2,q3,q4,r11,r21,r22,r31,r32,r33,r41,r42,r43,r44)\
00457  (GAN_FREP1_A(a,b,p1##q1,r11),\
00458   GAN_FREP2_A(a,b,p2##q1,p2##q2,r21,r22),\
00459   GAN_FREP3_A(a,b,p3##q1,p3##q2,p3##q3,r31,r32,r33),\
00460   GAN_FREP4_A(a,b,p4##q1,p4##q2,p4##q3,p4##q4,r41,r42,r43,r44))
00461 #define GAN_FREP44L_A_C(a,b,r11,r21,r22,r31,r32,r33,r41,r42,r43,r44) \
00462            GAN_FREP44L_A(a,b,x,y,z,w,x,y,z,w,r11,r21,r22,r31,r32,r33,r41,r42,r43,r44)
00463 
00464 #define GAN_REP44L_ABCS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4,t1,t2,t3,t4,u1,u2,u3,u4)\
00465  (GAN_REP1_ABCS(a,b,c,d,p1##q1,r1##s1,t1##u1),\
00466   GAN_REP2_ABCS(a,b,c,d,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2),\
00467   GAN_REP3_ABCS(a,b,c,d,p3##q1,p3##q2,p3##q3,r3##s1,r3##s2,r3##s3,t3##u1,t3##u2,t3##u3),\
00468   GAN_REP4_ABCS(a,b,c,d,p4##q1,p4##q2,p4##q3,p4##q4,r4##s1,r4##s2,r4##s3,r4##s4,t4##u1,t4##u2,t4##u3,t4##u4))
00469 #define GAN_REP44L_ABC(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4,t1,t2,t3,t4,u1,u2,u3,u4)\
00470  (GAN_REP1_ABC(a,b,c,p1##q1,r1##s1,t1##u1),\
00471   GAN_REP2_ABC(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2,t2##u1,t2##u2),\
00472   GAN_REP3_ABC(a,b,c,p3##q1,p3##q2,p3##q3,r3##s1,r3##s2,r3##s3,t3##u1,t3##u2,t3##u3),\
00473   GAN_REP4_ABC(a,b,c,p4##q1,p4##q2,p4##q3,p4##q4,r4##s1,r4##s2,r4##s3,r4##s4,t4##u1,t4##u2,t4##u3,t4##u4))
00474 #define GAN_REP44L_AAAS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4)\
00475            GAN_REP44L_ABCS(a,b,c,d,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00476 #define GAN_REP44L_AAA(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00477            GAN_REP44L_ABC(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00478 #define GAN_REP44L_ABS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4)\
00479  (GAN_REP1_ABS(a,b,c,p1##q1,r1##s1),\
00480   GAN_REP2_ABS(a,b,c,p2##q1,p2##q2,r2##s1,r2##s2),\
00481   GAN_REP3_ABS(a,b,c,p3##q1,p3##q2,p3##q3,r3##s1,r3##s2,r3##s3),\
00482   GAN_REP4_ABS(a,b,c,p4##q1,p4##q2,p4##q3,p4##q4,r4##s1,r4##s2,r4##s3,r4##s4))
00483 #define GAN_REP44L_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4,r1,r2,r3,r4,s1,s2,s3,s4)\
00484  (GAN_REP1_AB(a,b,p1##q1,r1##s1),\
00485   GAN_REP2_AB(a,b,p2##q1,p2##q2,r2##s1,r2##s2),\
00486   GAN_REP3_AB(a,b,p3##q1,p3##q2,p3##q3,r3##s1,r3##s2,r3##s3),\
00487   GAN_REP4_AB(a,b,p4##q1,p4##q2,p4##q3,p4##q4,r4##s1,r4##s2,r4##s3,r4##s4))
00488 #define GAN_REP44L_AAS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00489           GAN_REP44L_ABS(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00490 #define GAN_REP44L_AA(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00491            GAN_REP44L_AB(a,b,p1,p2,p3,p4,q1,q2,q3,q4,p1,p2,p3,p4,q1,q2,q3,q4)
00492 #define GAN_REP44L_AS(a,b,p1,p2,p3,p4,q1,q2,q3,q4)\
00493  (GAN_REP1_AS(a,b,p1##q1),\
00494   GAN_REP2_AS(a,b,p2##q1,p2##q2),\
00495   GAN_REP3_AS(a,b,p3##q1,p3##q2,p3##q3),\
00496   GAN_REP4_AS(a,b,p4##q1,p4##q2,p4##q3,p4##q4))
00497 #define GAN_REP44L_A(a,p1,p2,p3,p4,q1,q2,q3,q4)\
00498  (GAN_REP1_A(a,p1##q1),\
00499   GAN_REP2_A(a,p2##q1,p2##q2),\
00500   GAN_REP3_A(a,p3##q1,p3##q2,p3##q3),\
00501   GAN_REP4_A(a,p4##q1,p4##q2,p4##q3,p4##q4))
00502 #define GAN_REP44L_AS_C(a,b) GAN_REP44L_AS(a,b,x,y,z,w,x,y,z,w)
00503 #define GAN_REP44L_AAS_C(a,b,c) GAN_REP44L_AAS(a,b,c,x,y,z,w,x,y,z,w)
00504 #define GAN_REP44L_AAAS_C(a,b,c,d) GAN_REP44L_AAAS(a,b,c,d,x,y,z,w,x,y,z,w)
00505 #define GAN_REP44L_A_C(a) GAN_REP44L_A(a,x,y,z,w,x,y,z,w)
00506 #define GAN_REP44L_AA_C(a,b) GAN_REP44L_AA(a,b,x,y,z,w,x,y,z,w)
00507 #define GAN_REP44L_AAA_C(a,b,c) GAN_REP44L_AAA(a,b,c,x,y,z,w,x,y,z,w)
00508 #define GAN_FREP44L_A_C(a,b,r11,r21,r22,r31,r32,r33,r41,r42,r43,r44)\
00509            GAN_FREP44L_A(a,b,x,y,z,w,x,y,z,w,r11,r21,r22,r31,r32,r33,r41,r42,r43,r44)
00510 
00511 #ifdef __cplusplus
00512 }
00513 #endif
00514 
00515 #endif /* #ifndef _GAN_REPEAT44_H */
00516 #include <gandalf/linalg/4vector.h>
00517 #include <gandalf/linalg/3x3matrix.h>
00531 /* This library is free software; you can redistribute it and/or
00532    modify it under the terms of the GNU Lesser General Public
00533    License as published by the Free Software Foundation; either
00534    version 2.1 of the License, or (at your option) any later version.
00535 
00536    This library is distributed in the hope that it will be useful,
00537    but WITHOUT ANY WARRANTY; without even the implied warranty of
00538    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00539    Lesser General Public License for more details.
00540 
00541    You should have received a copy of the GNU Lesser General Public
00542    License along with this library; if not, write to the Free Software
00543    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00544 */
00545 
00546 #endif /* #ifndef _GAN_MATVECF_MACROS_H */
00547 #include <gandalf/linalg/mat_gen.h>
00548 #include <gandalf/linalg/mat_square.h>
00549 
00550 #ifdef __cplusplus
00551 extern "C" {
00552 #endif
00553 
00564 
00565 typedef struct Gan_Matrix44
00566 {
00567    double xx, xy, xz, xw,
00568           yx, yy, yz, yw,
00569           zx, zy, zz, zw,
00570           wx, wy, wz, ww;
00571 } Gan_Matrix44;
00572 
00573 #ifndef NDEBUG
00574 
00575 typedef enum { GAN_SYMMETRIC_MATRIX44, GAN_LOWER_TRI_MATRIX44 }
00576  Gan_SquMatrix44Type;
00577 #endif /* #ifndef NDEBUG */
00578 
00580 typedef struct Gan_SquMatrix44
00581 {
00582 #ifndef NDEBUG
00583    /* square matrix type, for setting and checking in debug mode */
00584    Gan_SquMatrix44Type type;
00585 #endif /* #ifndef NDEBUG */
00586 
00587    /* matrix data */
00588    double xx,
00589           yx, yy,
00590           zx, zy, zz,
00591           wx, wy, wz, ww;
00592 } Gan_SquMatrix44;
00593 
00594 /* matrix definitions specific to 4x4 matrices */
00595 #define GAN_ST44_FILL(A,t,XX,YX,YY,ZX,ZY,ZZ,WX,WY,WZ,WW)\
00596     (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00597     GAN_FREP44L_A_C((A)->,=,(XX),(YX),(YY),(ZX),(ZY),(ZZ),(WX),(WY),(WZ),(WW)))
00598 #define GAN_ST44_IDENT(A,t)\
00599            (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00600             GAN_FREP44L_A_C((A)->,=,1.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0))
00601 
00602 /* generic matrix multiply operations */
00603 #define GAN_MAT44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00604  (a p1 = GAN_REP4_OP_AB(b,* c,xx,xy,xz,xw,q1,q2,q3,q4,+),\
00605   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,yz,yw,q1,q2,q3,q4,+),\
00606   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,zw,q1,q2,q3,q4,+),\
00607   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00608 #define GAN_MAT44T_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00609  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00610   a p2 = GAN_REP4_OP_AB(b,* c,xy,yy,zy,wy,q1,q2,q3,q4,+),\
00611   a p3 = GAN_REP4_OP_AB(b,* c,xz,yz,zz,wz,q1,q2,q3,q4,+),\
00612   a p4 = GAN_REP4_OP_AB(b,* c,xw,yw,zw,ww,q1,q2,q3,q4,+))
00613 
00614 /* symmetric matrix multiply operation */
00615 #define GAN_SYM44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00616  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00617   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,zy,wy,q1,q2,q3,q4,+),\
00618   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,wz,q1,q2,q3,q4,+),\
00619   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00620 
00621 /* lower triangular matrix multiply operations */
00622 #define GAN_LOW44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00623  (a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+),\
00624   a p3 = GAN_REP3_OP_AB(b,* c,zx,zy,zz,q1,q2,q3,+),\
00625   a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+),\
00626   a p1 = GAN_REP1_OP_AB(b,* c,xx,q1,+))
00627 #define GAN_LOW44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00628  (a p1 =  c q1 / b xx,\
00629   a p2 = (c q2 - b yx * a p1) / b yy,\
00630   a p3 = (c q3 - b zx * a p1 - b zy * a p2) / b zz,\
00631   a p4 = (c q4 - b wx * a p1 - b wy * a p2 - b wz * a p3) / b ww)
00632 
00633 /* upper triangular matrix multiply operations */
00634 #define GAN_UPP44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00635  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00636   a p2 = GAN_REP3_OP_AB(b,* c,yy,zy,wy,q2,q3,q4,+),\
00637   a p3 = GAN_REP2_OP_AB(b,* c,zz,wz,q3,q4,+),\
00638   a p4 = GAN_REP1_OP_AB(b,* c,ww,q4,+))
00639 #define GAN_UPP44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00640  (a p4 =  c q4 / b ww,\
00641   a p3 = (c q3 - b wz * a p4) / b zz,\
00642   a p2 = (c q2 - b zy * a p3 - b wy * a p4) / b yy,\
00643   a p1 = (c q1 - b yx * a p2 - b zx * a p3 - b wx * a p4) / b xx)
00644 
00645 /* symmetric/lower triangular square matrix definitions */
00646 #define GAN_ST44_ZERO(A,t)\
00647            (GAN_TEST_OP1(A,Gan_SquMatrix44), gan_eval((A)->type=t),\
00648             GAN_REP44L_AS_C((A)->,=0.0))
00649 #define GAN_ST44_COPY(A,B,t)\
00650            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00651             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00652             GAN_REP44L_AA_C((B)->,=(A)->))
00653 #define GAN_ST44_SCALE(A,a,B,t)\
00654            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00655             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00656             GAN_REP44L_AAS_C((B)->,=(A)->,*(a)))
00657 #define GAN_ST44_DIVIDE(A,a,B,t)\
00658            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00659             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00660             GAN_REP44L_AAS_C((B)->,=(A)->,/(a)))
00661 #define GAN_ST44_NEGATE(A,B,t)\
00662            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00663             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00664             GAN_REP44L_AA_C((B)->,=-(A)->))
00665 #define GAN_ST44_ADD(A,B,C,t)\
00666          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00667           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00668           GAN_REP44L_AAA_C((C)->,=(A)->,+(B)->))
00669 #define GAN_ST44_SUB(A,B,C,t)\
00670          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00671           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00672           GAN_REP44L_AAA_C((C)->,=(A)->,-(B)->))
00673 
00674 /* declare functions specific to generic 4x4 matrices */
00688 /* This library is free software; you can redistribute it and/or
00689    modify it under the terms of the GNU Lesser General Public
00690    License as published by the Free Software Foundation; either
00691    version 2.1 of the License, or (at your option) any later version.
00692 
00693    This library is distributed in the hope that it will be useful,
00694    but WITHOUT ANY WARRANTY; without even the implied warranty of
00695    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00696    Lesser General Public License for more details.
00697 
00698    You should have received a copy of the GNU Lesser General Public
00699    License along with this library; if not, write to the Free Software
00700    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00701 */
00702 
00703 #ifndef _GAN_4X4MAT_H
00704 
00721 Gan_Matrix44 *gan_mat44_fill_q ( Gan_Matrix44 *A,
00722                                  double XX, double XY, double XZ, double XW,
00723                                  double YX, double YY, double YZ, double YW,
00724                                  double ZX, double ZY, double ZZ, double ZW,
00725                                  double WX, double WY, double WZ, double WW );
00726 
00748 void gan_mat44_get_rows_q ( Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00749                                              Gan_Vector4 *r, Gan_Vector4 *s );
00750 
00762 void gan_mat44_get_cols_q ( Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00763                                              Gan_Vector4 *r, Gan_Vector4 *s );
00764 
00772 Gan_Matrix33 *gan_mat44_get_m33tl_q ( Gan_Matrix44 *A, Gan_Matrix33 *B );
00773 
00781 Gan_Vector3 *gan_mat44_get_v3tr_q ( Gan_Matrix44 *A, Gan_Vector3 *p );
00782 
00796 void gan_mat44_get_parts_q ( Gan_Matrix44 *A, Gan_Matrix33 *B,
00797                              Gan_Vector3 *p, Gan_Vector3 *q, double *s );
00798 
00811 void gan_mat44_get_blocks_q ( Gan_Matrix44 *M,
00812                               Gan_Matrix22 *A, Gan_Matrix22 *B,
00813                               Gan_Matrix22 *C, Gan_Matrix22 *D );
00814 
00837 Gan_Matrix44 *gan_mat44_set_parts_q ( Gan_Matrix44 *A,
00838                                       Gan_Matrix33 *B, Gan_Vector3 *p,
00839                                       Gan_Vector3 *q, double s );
00840 
00854 Gan_Matrix44 *gan_mat44_set_blocks_q ( Gan_Matrix44 *M,
00855                                        Gan_Matrix22 *A, Gan_Matrix22 *B,
00856                                        Gan_Matrix22 *C, Gan_Matrix22 *D );
00857 
00863 #endif /* #ifndef _GAN_4X4MAT_H */
00864 
00865 #define GAN_MATTYPE Gan_Matrix44
00866 #define GAN_MATRIX_TYPE Gan_Matrix
00867 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
00868 #define GAN_VECTOR_TYPE Gan_Vector
00869 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
00870 #define GAN_REALTYPE double
00871 #define GAN_VECTYPE1 Gan_Vector4
00872 #define GAN_VECTYPE2 Gan_Vector4
00873 #define GAN_MATTYPEL Gan_Matrix44
00874 #define GAN_MATTYPER Gan_Matrix44
00875 #define GAN_SQUMATTYPEL Gan_SquMatrix44
00876 #define GAN_SQUMATTYPER Gan_SquMatrix44
00877 #define GAN_MAT_FPRINT                     gan_mat44_fprint
00878 #define GAN_MAT_PRINT                      gan_mat44_print
00879 #define GAN_MAT_FSCANF                     gan_mat44_fscanf
00880 #define GAN_MAT_FWRITE                     gan_mat44_fwrite
00881 #define GAN_MAT_FREAD                      gan_mat44_fread
00882 #define GAN_MAT_ZERO_Q                     gan_mat44_zero_q
00883 #define GAN_MAT_ZERO_S                     gan_mat44_zero_s
00884 #define GAN_MAT_COPY_Q                     gan_mat44_copy_q
00885 #define GAN_MAT_COPY_S                     gan_mat44_copy_s
00886 #define GAN_MAT_SCALE_Q                    gan_mat44_scale_q
00887 #define GAN_MAT_SCALE_I                    gan_mat44_scale_i
00888 #define GAN_MAT_SCALE_S                    gan_mat44_scale_s
00889 #define GAN_MAT_DIVIDE_Q                   gan_mat44_divide_q
00890 #define GAN_MAT_DIVIDE_I                   gan_mat44_divide_i
00891 #define GAN_MAT_DIVIDE_S                   gan_mat44_divide_s
00892 #define GAN_MAT_NEGATE_Q                   gan_mat44_negate_q
00893 #define GAN_MAT_NEGATE_I                   gan_mat44_negate_i
00894 #define GAN_MAT_NEGATE_S                   gan_mat44_negate_s
00895 #define GAN_MAT_UNIT_Q                     gan_mat44_unit_q
00896 #define GAN_MAT_UNIT_I                     gan_mat44_unit_i
00897 #define GAN_MAT_UNIT_S                     gan_mat44_unit_s
00898 #define GAN_MAT_ADD_Q                      gan_mat44_add_q
00899 #define GAN_MAT_ADD_I1                     gan_mat44_add_i1
00900 #define GAN_MAT_ADD_I2                     gan_mat44_add_i2
00901 #define GAN_MAT_INCREMENT                  gan_mat44_increment
00902 #define GAN_MAT_ADD_S                      gan_mat44_add_s
00903 #define GAN_MAT_SUB_Q                      gan_mat44_sub_q
00904 #define GAN_MAT_SUB_I1                     gan_mat44_sub_i1
00905 #define GAN_MAT_SUB_I2                     gan_mat44_sub_i2
00906 #define GAN_MAT_DECREMENT                  gan_mat44_decrement
00907 #define GAN_MAT_SUB_S                      gan_mat44_sub_s
00908 #define GAN_VEC_OUTER_Q                    gan_vec44_outer_q
00909 #define GAN_VEC_OUTER_S                    gan_vec44_outer_s
00910 #define GAN_MAT_MULTV_Q                    gan_mat44_multv4_q
00911 #define GAN_MAT_MULTV_S                    gan_mat44_multv4_s
00912 #define GAN_MATT_MULTV_Q                   gan_mat44T_multv4_q
00913 #define GAN_MATT_MULTV_S                   gan_mat44T_multv4_s
00914 #define GAN_MAT_LMULTMT_Q                  gan_mat44_lmultm44T_q
00915 #define GAN_MAT_LMULTMT_S                  gan_mat44_lmultm44T_s
00916 #define GAN_MAT_RMULTM_Q                   gan_mat44_rmultm44_q
00917 #define GAN_MAT_RMULTM_S                   gan_mat44_rmultm44_s
00918 #define GAN_MAT_RMULTMT_Q                  gan_mat44_rmultm44T_q
00919 #define GAN_MAT_RMULTMT_S                  gan_mat44_rmultm44T_s
00920 #define GAN_MAT_LMULTMT_SYM_Q              gan_mat44_lmultm44T_sym_q
00921 #define GAN_MAT_LMULTMT_SYM_S              gan_mat44_lmultm44T_sym_s
00922 #define GAN_MAT_RMULTMT_SYM_Q              gan_mat44_rmultm44T_sym_q
00923 #define GAN_MAT_RMULTMT_SYM_S              gan_mat44_rmultm44T_sym_s
00924 #define GAN_MAT_SLMULTT_Q                  gan_mat44_slmultT_q
00925 #define GAN_MAT_SLMULTT_S                  gan_mat44_slmultT_s
00926 #define GAN_MAT_SRMULTT_Q                  gan_mat44_srmultT_q
00927 #define GAN_MAT_SRMULTT_S                  gan_mat44_srmultT_s
00928 #define GAN_MAT_LMULTS_Q                   gan_mat44_lmults44_q
00929 #define GAN_MAT_LMULTS_S                   gan_mat44_lmults44_s
00930 #define GAN_MAT_RMULTS_Q                   gan_mat44_rmults44_q
00931 #define GAN_MAT_RMULTS_S                   gan_mat44_rmults44_s
00932 #define GAN_SYMMATL_LRMULT_Q               gan_symmat44_lrmultm44T_q
00933 #define GAN_SYMMATL_LRMULT_S               gan_symmat44_lrmultm44T_s
00934 #define GAN_SYMMATR_LRMULT_Q               gan_symmat44_lrmultm44_q
00935 #define GAN_SYMMATR_LRMULT_S               gan_symmat44_lrmultm44_s
00936 #define GAN_MAT_LMULTL_Q                   gan_mat44_lmultl44_q
00937 #define GAN_MAT_LMULTL_S                   gan_mat44_lmultl44_s
00938 #define GAN_MAT_LMULTL_I                   gan_mat44_lmultl44_i
00939 #define GAN_MAT_LMULTLI_Q                  gan_mat44_lmultl44I_q
00940 #define GAN_MAT_LMULTLI_S                  gan_mat44_lmultl44I_s
00941 #define GAN_MAT_LMULTLI_I                  gan_mat44_lmultl44I_i
00942 #define GAN_MAT_LMULTLT_Q                  gan_mat44_lmultl44T_q
00943 #define GAN_MAT_LMULTLT_S                  gan_mat44_lmultl44T_s
00944 #define GAN_MAT_LMULTLT_I                  gan_mat44_lmultl44T_i
00945 #define GAN_MAT_LMULTLIT_Q                 gan_mat44_lmultl44IT_q
00946 #define GAN_MAT_LMULTLIT_S                 gan_mat44_lmultl44IT_s
00947 #define GAN_MAT_LMULTLIT_I                 gan_mat44_lmultl44IT_i
00948 #define GAN_MAT_RMULTL_Q                   gan_mat44_rmultl44_q
00949 #define GAN_MAT_RMULTL_S                   gan_mat44_rmultl44_s
00950 #define GAN_MAT_RMULTL_I                   gan_mat44_rmultl44_i
00951 #define GAN_MAT_RMULTLI_Q                  gan_mat44_rmultl44I_q
00952 #define GAN_MAT_RMULTLI_S                  gan_mat44_rmultl44I_s
00953 #define GAN_MAT_RMULTLI_I                  gan_mat44_rmultl44I_i
00954 #define GAN_MAT_RMULTLT_Q                  gan_mat44_rmultl44T_q
00955 #define GAN_MAT_RMULTLT_S                  gan_mat44_rmultl44T_s
00956 #define GAN_MAT_RMULTLT_I                  gan_mat44_rmultl44T_i
00957 #define GAN_MAT_RMULTLIT_Q                 gan_mat44_rmultl44IT_q
00958 #define GAN_MAT_RMULTLIT_S                 gan_mat44_rmultl44IT_s
00959 #define GAN_MAT_RMULTLIT_I                 gan_mat44_rmultl44IT_i
00960 #define GAN_MAT_SUMSQR_Q                   gan_mat44_sumsqr_q
00961 #define GAN_MAT_SUMSQR_S                   gan_mat44_sumsqr_s
00962 #define GAN_MAT_FNORM_Q                    gan_mat44_Fnorm_q
00963 #define GAN_MAT_FNORM_S                    gan_mat44_Fnorm_s
00964 #define GAN_MAT_FROM_MAT_Q                 gan_mat44_from_mat_q
00965 #define GAN_MAT_FROM_MAT_S                 gan_mat44_from_mat_s
00966 #define GAN_MAT_FROM_SQUMAT_Q              gan_mat44_from_squmat_q
00967 #define GAN_MAT_FROM_SQUMAT_S              gan_mat44_from_squmat_s
00968 #define GAN_SQUMAT_FROM_SQUMAT_Q           gan_squmat44_from_squmat_q
00969 #define GAN_SQUMAT_FROM_SQUMAT_S           gan_squmat44_from_squmat_s
00970 
00971 #define GAN_SQUMAT_IDENT_Q    gan_mat44_ident_q
00972 #define GAN_SQUMAT_IDENT_S    gan_mat44_ident_s
00973 #define GAN_SQUMAT_TPOSE_Q    gan_mat44_tpose_q
00974 #define GAN_SQUMAT_TPOSE_S    gan_mat44_tpose_s
00975 #define GAN_SQUMAT_TPOSE_I    gan_mat44_tpose_i
00976 #define GAN_MAT_SADDT_Q       gan_mat44_saddT_q
00977 #define GAN_MAT_SADDT_S       gan_mat44_saddT_s
00978 #define GAN_SQUMAT_INVERT     gan_mat44_invert
00979 #define GAN_SQUMAT_INVERT_Q   gan_mat44_invert_q
00980 #define GAN_SQUMAT_INVERT_S   gan_mat44_invert_s
00981 #define GAN_SQUMAT_INVERT_I   gan_mat44_invert_i
00982 #define GAN_SQUMAT_ADJOINT_Q  gan_mat44_adjoint_q
00983 #define GAN_SQUMAT_ADJOINT_S  gan_mat44_adjoint_s
00984 #define GAN_SQUMAT_ADJOINTT_Q gan_mat44_adjointT_q
00985 #define GAN_SQUMAT_ADJOINTT_S gan_mat44_adjointT_s
00986 #define GAN_SQUMAT_DET_Q      gan_mat44_det_q
00987 #define GAN_SQUMAT_DET_S      gan_mat44_det_s
00988 #define GAN_SQUMAT_TRACE_Q    gan_mat44_trace_q
00989 #define GAN_SQUMAT_TRACE_S    gan_mat44_trace_s
00990 
00991 #ifndef _GAN_4X4MAT_H
00992 #define _GAN_4X4MAT_H
00993 
00994 
00995 #endif /* #ifndef _GAN_4X4MAT_H */
00996 
01009 /* This library is free software; you can redistribute it and/or
01010    modify it under the terms of the GNU Lesser General Public
01011    License as published by the Free Software Foundation; either
01012    version 2.1 of the License, or (at your option) any later version.
01013 
01014    This library is distributed in the hope that it will be useful,
01015    but WITHOUT ANY WARRANTY; without even the implied warranty of
01016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01017    Lesser General Public License for more details.
01018 
01019    You should have received a copy of the GNU Lesser General Public
01020    License along with this library; if not, write to the Free Software
01021    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01022 */
01023 
01024 /* function declarations for functions common to all small square matrix
01025  * types */
01026 
01027 
01028 
01029 /* documentation for macros defined in individual header files */
01030 
01043 Gan_Matrix44 *gan_mat44_ident_q ( Gan_Matrix44 *A );
01044 
01062 Gan_Matrix44 *gan_mat44_tpose_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01063 
01081 Gan_SquMatrix44 *gan_mat44_saddT_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01082 
01113 Gan_Matrix44 *gan_mat44_invert_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01114 
01123 Gan_Matrix44 *gan_mat44_invert_i ( Gan_Matrix44 *A );
01124 
01139 double gan_mat44_det_q ( Gan_Matrix44 *A );
01140 
01146 double gan_mat44_trace_q ( Gan_Matrix44 *A );
01147 
01153 #undef GAN_SQUMAT_IDENT_Q
01154 #undef GAN_SQUMAT_IDENT_S
01155 #undef GAN_SQUMAT_TPOSE_Q
01156 #undef GAN_SQUMAT_TPOSE_S
01157 #undef GAN_SQUMAT_TPOSE_I
01158 #undef GAN_MAT_SADDT_Q
01159 #undef GAN_MAT_SADDT_S
01160 #undef GAN_SQUMATI_MULTV_Q
01161 #undef GAN_SQUMATI_MULTV_S
01162 #undef GAN_SQUMATI_MULTV_I
01163 #undef GAN_SQUMATIT_MULTV_Q
01164 #undef GAN_SQUMATIT_MULTV_S
01165 #undef GAN_SQUMATIT_MULTV_I
01166 #undef GAN_SQUMAT_INVERT
01167 #undef GAN_SQUMAT_INVERT_Q
01168 #undef GAN_SQUMAT_INVERT_S
01169 #undef GAN_SQUMAT_INVERT_I
01170 #undef GAN_SQUMAT_ADJOINT_Q
01171 #undef GAN_SQUMAT_ADJOINT_S
01172 #undef GAN_SQUMAT_ADJOINTT_Q
01173 #undef GAN_SQUMAT_ADJOINTT_S
01174 #undef GAN_SQUMAT_DET_Q
01175 #undef GAN_SQUMAT_DET_S
01176 #undef GAN_SQUMAT_TRACE_Q
01177 #undef GAN_SQUMAT_TRACE_S
01178 
01191 /* This library is free software; you can redistribute it and/or
01192    modify it under the terms of the GNU Lesser General Public
01193    License as published by the Free Software Foundation; either
01194    version 2.1 of the License, or (at your option) any later version.
01195 
01196    This library is distributed in the hope that it will be useful,
01197    but WITHOUT ANY WARRANTY; without even the implied warranty of
01198    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01199    Lesser General Public License for more details.
01200 
01201    You should have received a copy of the GNU Lesser General Public
01202    License along with this library; if not, write to the Free Software
01203    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01204 */
01205 
01206 /* function declarations for functions common to all small vector types */
01207 
01208 
01209 
01210 /* documentation for macros defined in individual header files */
01211 
01222 Gan_Matrix44 *gan_mat44_zero_q ( Gan_Matrix44 *A );
01223 
01240 Gan_Matrix44 *gan_mat44_copy_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01241 
01259 Gan_Matrix44 *gan_mat44_scale_q ( Gan_Matrix44 *A, double a,
01260                                Gan_Matrix44 *B );
01261 
01269 Gan_Matrix44 *gan_mat44_scale_i ( Gan_Matrix44 *A, double a );
01270 
01279 Gan_Matrix44 *gan_mat44_divide_q ( Gan_Matrix44 *A, double a,
01280                                 Gan_Matrix44 *B );
01281 
01289 Gan_Matrix44 *gan_mat44_divide_i ( Gan_Matrix44 *A, double a );
01290 
01298 Gan_Matrix44 *gan_mat44_negate_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01299 
01307 Gan_Matrix44 *gan_mat44_negate_i ( Gan_Matrix44 *A );
01308 
01316 Gan_Matrix44 *gan_mat44_unit_i ( Gan_Matrix44 *A );
01317 
01335 Gan_Matrix44 *gan_mat44_add_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01336 
01345 Gan_Matrix44 *gan_mat44_add_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01346 
01355 Gan_Matrix44 *gan_mat44_add_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01356 
01365 Gan_Matrix44 *gan_mat44_increment ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01366 
01384 Gan_Matrix44 *gan_mat44_sub_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01385 
01394 Gan_Matrix44 *gan_mat44_sub_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01395 
01404 Gan_Matrix44 *gan_mat44_sub_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01405 
01414 Gan_Matrix44 *gan_mat44_decrement ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01415 
01433 Gan_Matrix44 *gan_vec44_outer_q ( Gan_Vector4 *p, Gan_Vector4 *q,
01434                                Gan_Matrix44 *A );
01435 
01444 Gan_Vector4 *gan_mat44_multv4_q ( Gan_Matrix44 *A, Gan_Vector4 *p,
01445                                 Gan_Vector4 *q );
01446 
01447 
01456 Gan_Vector4 *gan_mat44T_multv4_q ( Gan_Matrix44 *A, Gan_Vector4 *p,
01457                                  Gan_Vector4 *q );
01458 
01459 
01479 Gan_Matrix44 *gan_mat44_lmultm44T_q ( Gan_Matrix44 *A, Gan_Matrix44 *B,
01480                                  Gan_Matrix44 *C );
01481 
01491 Gan_Matrix44 *gan_mat44_rmultm44_q ( Gan_Matrix44 *A, Gan_Matrix44 *B,
01492                                 Gan_Matrix44 *C );
01493 
01503 Gan_Matrix44 *gan_mat44_rmultm44T_q ( Gan_Matrix44 *A, Gan_Matrix44 *B,
01504                                  Gan_Matrix44 *C );
01505 
01517 Gan_SquMatrix44 *gan_mat44_lmultm44T_sym_q ( Gan_Matrix44 *A, Gan_Matrix44 *B,
01518                                          Gan_SquMatrix44 *C );
01519 
01531 Gan_SquMatrix44 *gan_mat44_rmultm44T_sym_q ( Gan_Matrix44 *A, Gan_Matrix44 *B,
01532                                          Gan_SquMatrix44 *C );
01533 
01542 Gan_Matrix44 *gan_mat44_lmults44_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01543                                 Gan_Matrix44 *C );
01544 
01553 Gan_Matrix44 *gan_mat44_rmults44_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01554                                 Gan_Matrix44 *C );
01555 
01575 Gan_SquMatrix44 *gan_symmat44_lrmultm44T_q ( Gan_SquMatrix44 *A, Gan_Matrix44 *B,
01576                                         Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01577 
01588 Gan_SquMatrix44 *gan_symmat44_lrmultm44_q ( Gan_SquMatrix44 *A, Gan_Matrix44 *B,
01589                                         Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01590 
01609 Gan_Matrix44 *gan_mat44_lmultl44_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01610                                 Gan_Matrix44 *C );
01611 
01621 Gan_Matrix44 *gan_mat44_lmultl44I_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01622                                  Gan_Matrix44 *C );
01623 
01633 Gan_Matrix44 *gan_mat44_lmultl44T_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01634                                  Gan_Matrix44 *C );
01635 
01645 Gan_Matrix44 *gan_mat44_lmultl44IT_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01646                                   Gan_Matrix44 *C );
01647 
01657 Gan_Matrix44 *gan_mat44_rmultl44_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01658                                 Gan_Matrix44 *C );
01659 
01669 Gan_Matrix44 *gan_mat44_rmultl44I_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01670                                  Gan_Matrix44 *C );
01671 
01681 Gan_Matrix44 *gan_mat44_rmultl44T_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01682                                  Gan_Matrix44 *C );
01683 
01693 Gan_Matrix44 *gan_mat44_rmultl44IT_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B,
01694                                   Gan_Matrix44 *C );
01695 
01705 Gan_Matrix44 *gan_mat44_lmultl44_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01706 
01716 Gan_Matrix44 *gan_mat44_lmultl44I_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01717 
01727 Gan_Matrix44 *gan_mat44_lmultl44T_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01728 
01738 Gan_Matrix44 *gan_mat44_lmultl44IT_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01739 
01749 Gan_Matrix44 *gan_mat44_rmultl44_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01750 
01760 Gan_Matrix44 *gan_mat44_rmultl44I_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01761 
01771 Gan_Matrix44 *gan_mat44_rmultl44T_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01772 
01782 Gan_Matrix44 *gan_mat44_rmultl44IT_i ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01783 
01792 Gan_SquMatrix44 *gan_mat44_slmultT_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01793 
01794 
01803 Gan_SquMatrix44 *gan_mat44_srmultT_q ( Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01804 
01805 
01820 double gan_mat44_sumsqr_q ( Gan_Matrix44 *A );
01821 
01828 double gan_mat44_Fnorm_q ( Gan_Matrix44 *A );
01829 
01847 Gan_Matrix44 *gan_mat44_from_mat_q ( Gan_Matrix *A, Gan_Matrix44 *B );
01848 
01857 Gan_Matrix44 *gan_mat44_from_squmat_q ( Gan_SquMatrix *A, Gan_Matrix44 *B );
01858 
01867 Gan_SquMatrix44 *gan_squmat44_from_squmat_q ( Gan_SquMatrix *A,
01868                                             Gan_SquMatrix44 *B );
01869 
01888 /* This library is free software; you can redistribute it and/or
01889    modify it under the terms of the GNU Lesser General Public
01890    License as published by the Free Software Foundation; either
01891    version 2.1 of the License, or (at your option) any later version.
01892 
01893    This library is distributed in the hope that it will be useful,
01894    but WITHOUT ANY WARRANTY; without even the implied warranty of
01895    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01896    Lesser General Public License for more details.
01897 
01898    You should have received a copy of the GNU Lesser General Public
01899    License along with this library; if not, write to the Free Software
01900    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01901 */
01902 
01903 #undef GAN_MATTYPE
01904 #undef GAN_MATRIX_TYPE
01905 #undef GAN_SQUMATRIX_TYPE
01906 #undef GAN_VECTOR_TYPE
01907 #undef GAN_MAT_ELEMENT_TYPE
01908 #undef GAN_REALTYPE
01909 #undef GAN_VECTYPE1
01910 #undef GAN_VECTYPE2
01911 #undef GAN_MATTYPEL
01912 #undef GAN_MATTYPER
01913 #undef GAN_SQUMATTYPEL
01914 #undef GAN_SQUMATTYPER
01915 #undef GAN_FIXED_MATRIX_TYPE
01916 #undef GAN_MAT_FPRINT
01917 #undef GAN_MAT_PRINT
01918 #undef GAN_MAT_FSCANF
01919 #undef GAN_MAT_FWRITE
01920 #undef GAN_MAT_FREAD
01921 #undef GAN_MAT_ZERO_Q
01922 #undef GAN_MAT_ZERO_S
01923 #undef GAN_MAT_COPY_Q
01924 #undef GAN_MAT_COPY_S
01925 #undef GAN_MAT_SCALE_Q
01926 #undef GAN_MAT_SCALE_S
01927 #undef GAN_MAT_SCALE_I
01928 #undef GAN_MAT_DIVIDE_Q
01929 #undef GAN_MAT_DIVIDE_S
01930 #undef GAN_MAT_DIVIDE_I
01931 #undef GAN_MAT_NEGATE_Q
01932 #undef GAN_MAT_NEGATE_S
01933 #undef GAN_MAT_NEGATE_I
01934 #undef GAN_MAT_UNIT_Q
01935 #undef GAN_MAT_UNIT_S
01936 #undef GAN_MAT_UNIT_I
01937 #undef GAN_MAT_ADD_Q
01938 #undef GAN_MAT_ADD_I1
01939 #undef GAN_MAT_ADD_I2
01940 #undef GAN_MAT_INCREMENT
01941 #undef GAN_MAT_ADD_S
01942 #undef GAN_MAT_SUB_Q
01943 #undef GAN_MAT_SUB_I1
01944 #undef GAN_MAT_SUB_I2
01945 #undef GAN_MAT_DECREMENT
01946 #undef GAN_MAT_SUB_S
01947 #undef GAN_VEC_OUTER_Q
01948 #undef GAN_VEC_OUTER_S
01949 #undef GAN_MAT_MULTV_Q
01950 #undef GAN_MAT_MULTV_S
01951 #undef GAN_MAT_MULTV_I
01952 #undef GAN_MATT_MULTV_Q
01953 #undef GAN_MATT_MULTV_S
01954 #undef GAN_MATT_MULTV_I
01955 #undef GAN_MAT_LMULTM_Q
01956 #undef GAN_MAT_LMULTM_S
01957 #undef GAN_MAT_LMULTMT_Q
01958 #undef GAN_MAT_LMULTMT_S
01959 #undef GAN_MAT_RMULTM_Q
01960 #undef GAN_MAT_RMULTM_S
01961 #undef GAN_MAT_RMULTMT_Q
01962 #undef GAN_MAT_RMULTMT_S
01963 #undef GAN_MAT_LMULTMT_SYM_Q
01964 #undef GAN_MAT_LMULTMT_SYM_S
01965 #undef GAN_MAT_RMULTMT_SYM_Q
01966 #undef GAN_MAT_RMULTMT_SYM_S
01967 #undef GAN_MAT_LMULTS_Q
01968 #undef GAN_MAT_LMULTS_S
01969 #undef GAN_MAT_RMULTS_Q
01970 #undef GAN_MAT_RMULTS_S
01971 #undef GAN_SYMMATL_LRMULT_Q
01972 #undef GAN_SYMMATL_LRMULT_S
01973 #undef GAN_SYMMATR_LRMULT_Q
01974 #undef GAN_SYMMATR_LRMULT_S
01975 #undef GAN_MAT_LMULTL_Q
01976 #undef GAN_MAT_LMULTL_S
01977 #undef GAN_MAT_LMULTL_I
01978 #undef GAN_MAT_LMULTLI_Q
01979 #undef GAN_MAT_LMULTLI_S
01980 #undef GAN_MAT_LMULTLI_I
01981 #undef GAN_MAT_LMULTLT_Q
01982 #undef GAN_MAT_LMULTLT_S
01983 #undef GAN_MAT_LMULTLT_I
01984 #undef GAN_MAT_LMULTLIT_Q
01985 #undef GAN_MAT_LMULTLIT_S
01986 #undef GAN_MAT_LMULTLIT_I
01987 #undef GAN_MAT_RMULTL_Q
01988 #undef GAN_MAT_RMULTL_S
01989 #undef GAN_MAT_RMULTL_I
01990 #undef GAN_MAT_RMULTLI_Q
01991 #undef GAN_MAT_RMULTLI_S
01992 #undef GAN_MAT_RMULTLI_I
01993 #undef GAN_MAT_RMULTLT_Q
01994 #undef GAN_MAT_RMULTLT_S
01995 #undef GAN_MAT_RMULTLT_I
01996 #undef GAN_MAT_RMULTLIT_Q
01997 #undef GAN_MAT_RMULTLIT_S
01998 #undef GAN_MAT_RMULTLIT_I
01999 #undef GAN_MAT_SRMULTT_Q
02000 #undef GAN_MAT_SRMULTT_S
02001 #undef GAN_MAT_SRMULTT_I
02002 #undef GAN_MAT_SLMULTT_Q
02003 #undef GAN_MAT_SLMULTT_S
02004 #undef GAN_MAT_SLMULTT_I
02005 #undef GAN_MAT_RMULTLIT_S
02006 #undef GAN_MAT_SUMSQR_Q
02007 #undef GAN_MAT_SUMSQR_S
02008 #undef GAN_MAT_FNORM_Q
02009 #undef GAN_MAT_FNORM_S
02010 #undef GAN_MAT_FROM_MAT_Q
02011 #undef GAN_MAT_FROM_MAT_S
02012 #undef GAN_MAT_FROM_SQUMAT_Q
02013 #undef GAN_MAT_FROM_SQUMAT_S
02014 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02015 #undef GAN_SQUMAT_FROM_SQUMAT_S
02016 
02017 /* declare functions specific to symmetric 4x4 matrices */
02031 /* This library is free software; you can redistribute it and/or
02032    modify it under the terms of the GNU Lesser General Public
02033    License as published by the Free Software Foundation; either
02034    version 2.1 of the License, or (at your option) any later version.
02035 
02036    This library is distributed in the hope that it will be useful,
02037    but WITHOUT ANY WARRANTY; without even the implied warranty of
02038    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02039    Lesser General Public License for more details.
02040 
02041    You should have received a copy of the GNU Lesser General Public
02042    License along with this library; if not, write to the Free Software
02043    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02044 */
02045 
02046 #ifndef _GAN_4X4SYMMAT_H
02047 
02062 Gan_SquMatrix44 *
02063     gan_symmat44_fill_q ( Gan_SquMatrix44 *A,
02064                           double XX,
02065                           double YX, double YY,
02066                           double ZX, double ZY, double ZZ,
02067                           double WX, double WY, double WZ, double WW );
02068 
02090 void gan_symmat44_get_parts_q ( Gan_SquMatrix44 *A,
02091                                 Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s);
02092 
02106 void gan_symmat44_get_blocks_q ( Gan_SquMatrix44 *A,
02107                                  Gan_SquMatrix22 *B, Gan_Matrix22 *C,
02108                                  Gan_SquMatrix22 *D );
02109 
02132 Gan_SquMatrix44 *gan_symmat44_set_parts_q ( Gan_SquMatrix44 *A,
02133                                             Gan_SquMatrix33 *B,
02134                                             Gan_Vector3 *p, double s );
02135 
02149 Gan_SquMatrix44 *gan_symmat44_set_blocks_q ( Gan_SquMatrix44 *A,
02150                                              Gan_SquMatrix22 *B,
02151                                              Gan_Matrix22 *C,
02152                                              Gan_SquMatrix22 *D );
02153 
02159 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02160 
02161 #define GAN_MATTYPE Gan_SquMatrix44
02162 #define GAN_MATRIX_TYPE Gan_SquMatrix
02163 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
02164 #define GAN_VECTOR_TYPE Gan_Vector
02165 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
02166 #define GAN_REALTYPE double
02167 #define GAN_VECTYPE1 Gan_Vector4
02168 #define GAN_VECTYPE2 Gan_Vector4
02169 #define GAN_FIXED_MATRIX_TYPE GAN_SYMMETRIC_MATRIX44
02170 #define GAN_MAT_FPRINT      gan_symmat44_fprint
02171 #define GAN_MAT_PRINT       gan_symmat44_print
02172 #define GAN_MAT_FSCANF      gan_symmat44_fscanf
02173 #define GAN_MAT_FWRITE      gan_symmat44_fwrite
02174 #define GAN_MAT_FREAD       gan_symmat44_fread
02175 #define GAN_MAT_ZERO_Q      gan_symmat44_zero_q
02176 #define GAN_MAT_ZERO_S      gan_symmat44_zero_s
02177 #define GAN_MAT_COPY_Q      gan_symmat44_copy_q
02178 #define GAN_MAT_COPY_S      gan_symmat44_copy_s
02179 #define GAN_MAT_SCALE_Q     gan_symmat44_scale_q
02180 #define GAN_MAT_SCALE_S     gan_symmat44_scale_s
02181 #define GAN_MAT_SCALE_I     gan_symmat44_scale_i
02182 #define GAN_MAT_DIVIDE_Q    gan_symmat44_divide_q
02183 #define GAN_MAT_DIVIDE_S    gan_symmat44_divide_s
02184 #define GAN_MAT_DIVIDE_I    gan_symmat44_divide_i
02185 #define GAN_MAT_NEGATE_Q    gan_symmat44_negate_q
02186 #define GAN_MAT_NEGATE_S    gan_symmat44_negate_s
02187 #define GAN_MAT_NEGATE_I    gan_symmat44_negate_i
02188 #define GAN_MAT_UNIT_Q      gan_symmat44_unit_q
02189 #define GAN_MAT_UNIT_S      gan_symmat44_unit_s
02190 #define GAN_MAT_UNIT_I      gan_symmat44_unit_i
02191 #define GAN_MAT_ADD_Q       gan_symmat44_add_q
02192 #define GAN_MAT_ADD_I1      gan_symmat44_add_i1
02193 #define GAN_MAT_ADD_I2      gan_symmat44_add_i2
02194 #define GAN_MAT_INCREMENT   gan_symmat44_increment
02195 #define GAN_MAT_ADD_S       gan_symmat44_add_s
02196 #define GAN_MAT_SUB_Q       gan_symmat44_sub_q
02197 #define GAN_MAT_SUB_I1      gan_symmat44_sub_i1
02198 #define GAN_MAT_SUB_I2      gan_symmat44_sub_i2
02199 #define GAN_MAT_DECREMENT   gan_symmat44_decrement
02200 #define GAN_MAT_SUB_S       gan_symmat44_sub_s
02201 #define GAN_MAT_MULTV_Q     gan_symmat44_multv4_q
02202 #define GAN_MAT_MULTV_S     gan_symmat44_multv4_s
02203 #define GAN_MAT_SUMSQR_Q    gan_symmat44_sumsqr_q
02204 #define GAN_MAT_SUMSQR_S    gan_symmat44_sumsqr_s
02205 #define GAN_MAT_FNORM_Q     gan_symmat44_Fnorm_q
02206 #define GAN_MAT_FNORM_S     gan_symmat44_Fnorm_s
02207 
02208 #define GAN_SQUMAT_IDENT_Q    gan_symmat44_ident_q
02209 #define GAN_SQUMAT_IDENT_S    gan_symmat44_ident_s
02210 #define GAN_SQUMAT_INVERT     gan_symmat44_invert
02211 #define GAN_SQUMAT_INVERT_Q   gan_symmat44_invert_q
02212 #define GAN_SQUMAT_INVERT_S   gan_symmat44_invert_s
02213 #define GAN_SQUMAT_INVERT_I   gan_symmat44_invert_i
02214 #define GAN_SQUMAT_DET_Q      gan_symmat44_det_q
02215 #define GAN_SQUMAT_DET_S      gan_symmat44_det_s
02216 #define GAN_SQUMAT_TRACE_Q    gan_symmat44_trace_q
02217 #define GAN_SQUMAT_TRACE_S    gan_symmat44_trace_s
02218 
02219 #define GAN_VEC_OUTER_SYM_Q gan_vec44_outer_sym_q
02220 #define GAN_VEC_OUTER_SYM_S gan_vec44_outer_sym_s
02221 #define GAN_SYMMAT_CHOLESKY   gan_symmat44_cholesky
02222 #define GAN_SYMMAT_CHOLESKY_Q gan_symmat44_cholesky_q
02223 #define GAN_SYMMAT_CHOLESKY_S gan_symmat44_cholesky_s
02224 #define GAN_SYMMAT_CHOLESKY_I gan_symmat44_cholesky_i
02225 
02226 #ifndef _GAN_4X4SYMMAT_H
02227 #define _GAN_4X4SYMMAT_H
02228 
02229 
02230 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02231 
02244 /* This library is free software; you can redistribute it and/or
02245    modify it under the terms of the GNU Lesser General Public
02246    License as published by the Free Software Foundation; either
02247    version 2.1 of the License, or (at your option) any later version.
02248 
02249    This library is distributed in the hope that it will be useful,
02250    but WITHOUT ANY WARRANTY; without even the implied warranty of
02251    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02252    Lesser General Public License for more details.
02253 
02254    You should have received a copy of the GNU Lesser General Public
02255    License along with this library; if not, write to the Free Software
02256    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02257 */
02258 
02259 /* function declarations for functions common to all small symmetric matrix
02260  * types */
02261 
02262 
02263 
02264 /* documentation for macros defined in individual header files */
02265 
02276 Gan_SquMatrix44 *gan_vec44_outer_sym_q ( Gan_Vector4 *p, Gan_SquMatrix44 *A );
02277 
02299 Gan_SquMatrix44 *gan_symmat44_cholesky_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02300 
02309 Gan_SquMatrix44 *gan_symmat44_cholesky_i ( Gan_SquMatrix44 *A );
02310 
02316 #undef GAN_VEC_OUTER_SYM_Q
02317 #undef GAN_VEC_OUTER_SYM_S
02318 #undef GAN_SYMMAT_CHOLESKY
02319 #undef GAN_SYMMAT_CHOLESKY_Q
02320 #undef GAN_SYMMAT_CHOLESKY_S
02321 #undef GAN_SYMMAT_CHOLESKY_I
02322 
02335 /* This library is free software; you can redistribute it and/or
02336    modify it under the terms of the GNU Lesser General Public
02337    License as published by the Free Software Foundation; either
02338    version 2.1 of the License, or (at your option) any later version.
02339 
02340    This library is distributed in the hope that it will be useful,
02341    but WITHOUT ANY WARRANTY; without even the implied warranty of
02342    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02343    Lesser General Public License for more details.
02344 
02345    You should have received a copy of the GNU Lesser General Public
02346    License along with this library; if not, write to the Free Software
02347    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02348 */
02349 
02350 /* function declarations for functions common to all small square matrix
02351  * types */
02352 
02353 
02354 
02355 /* documentation for macros defined in individual header files */
02356 
02369 Gan_SquMatrix44 *gan_symmat44_ident_q ( Gan_SquMatrix44 *A );
02370 
02421 Gan_SquMatrix44 *gan_symmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02422 
02431 Gan_SquMatrix44 *gan_symmat44_invert_i ( Gan_SquMatrix44 *A );
02432 
02447 double gan_symmat44_det_q ( Gan_SquMatrix44 *A );
02448 
02454 double gan_symmat44_trace_q ( Gan_SquMatrix44 *A );
02455 
02461 #undef GAN_SQUMAT_IDENT_Q
02462 #undef GAN_SQUMAT_IDENT_S
02463 #undef GAN_SQUMAT_TPOSE_Q
02464 #undef GAN_SQUMAT_TPOSE_S
02465 #undef GAN_SQUMAT_TPOSE_I
02466 #undef GAN_MAT_SADDT_Q
02467 #undef GAN_MAT_SADDT_S
02468 #undef GAN_SQUMATI_MULTV_Q
02469 #undef GAN_SQUMATI_MULTV_S
02470 #undef GAN_SQUMATI_MULTV_I
02471 #undef GAN_SQUMATIT_MULTV_Q
02472 #undef GAN_SQUMATIT_MULTV_S
02473 #undef GAN_SQUMATIT_MULTV_I
02474 #undef GAN_SQUMAT_INVERT
02475 #undef GAN_SQUMAT_INVERT_Q
02476 #undef GAN_SQUMAT_INVERT_S
02477 #undef GAN_SQUMAT_INVERT_I
02478 #undef GAN_SQUMAT_ADJOINT_Q
02479 #undef GAN_SQUMAT_ADJOINT_S
02480 #undef GAN_SQUMAT_ADJOINTT_Q
02481 #undef GAN_SQUMAT_ADJOINTT_S
02482 #undef GAN_SQUMAT_DET_Q
02483 #undef GAN_SQUMAT_DET_S
02484 #undef GAN_SQUMAT_TRACE_Q
02485 #undef GAN_SQUMAT_TRACE_S
02486 
02499 /* This library is free software; you can redistribute it and/or
02500    modify it under the terms of the GNU Lesser General Public
02501    License as published by the Free Software Foundation; either
02502    version 2.1 of the License, or (at your option) any later version.
02503 
02504    This library is distributed in the hope that it will be useful,
02505    but WITHOUT ANY WARRANTY; without even the implied warranty of
02506    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02507    Lesser General Public License for more details.
02508 
02509    You should have received a copy of the GNU Lesser General Public
02510    License along with this library; if not, write to the Free Software
02511    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02512 */
02513 
02514 /* function declarations for functions common to all small vector types */
02515 
02516 
02517 
02518 /* documentation for macros defined in individual header files */
02519 
02530 Gan_SquMatrix44 *gan_symmat44_zero_q ( Gan_SquMatrix44 *A );
02531 
02548 Gan_SquMatrix44 *gan_symmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02549 
02567 Gan_SquMatrix44 *gan_symmat44_scale_q ( Gan_SquMatrix44 *A, double a,
02568                                Gan_SquMatrix44 *B );
02569 
02577 Gan_SquMatrix44 *gan_symmat44_scale_i ( Gan_SquMatrix44 *A, double a );
02578 
02587 Gan_SquMatrix44 *gan_symmat44_divide_q ( Gan_SquMatrix44 *A, double a,
02588                                 Gan_SquMatrix44 *B );
02589 
02597 Gan_SquMatrix44 *gan_symmat44_divide_i ( Gan_SquMatrix44 *A, double a );
02598 
02606 Gan_SquMatrix44 *gan_symmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02607 
02615 Gan_SquMatrix44 *gan_symmat44_negate_i ( Gan_SquMatrix44 *A );
02616 
02624 Gan_SquMatrix44 *gan_symmat44_unit_i ( Gan_SquMatrix44 *A );
02625 
02643 Gan_SquMatrix44 *gan_symmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02644 
02653 Gan_SquMatrix44 *gan_symmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02654 
02663 Gan_SquMatrix44 *gan_symmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02664 
02673 Gan_SquMatrix44 *gan_symmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02674 
02692 Gan_SquMatrix44 *gan_symmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02693 
02702 Gan_SquMatrix44 *gan_symmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02703 
02712 Gan_SquMatrix44 *gan_symmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02713 
02722 Gan_SquMatrix44 *gan_symmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02723 
02742 Gan_Vector4 *gan_symmat44_multv4_q ( Gan_SquMatrix44 *A, Gan_Vector4 *p,
02743                                 Gan_Vector4 *q );
02744 
02745 
02746 
02747 
02819 double gan_symmat44_sumsqr_q ( Gan_SquMatrix44 *A );
02820 
02827 double gan_symmat44_Fnorm_q ( Gan_SquMatrix44 *A );
02828 
02859 /* This library is free software; you can redistribute it and/or
02860    modify it under the terms of the GNU Lesser General Public
02861    License as published by the Free Software Foundation; either
02862    version 2.1 of the License, or (at your option) any later version.
02863 
02864    This library is distributed in the hope that it will be useful,
02865    but WITHOUT ANY WARRANTY; without even the implied warranty of
02866    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02867    Lesser General Public License for more details.
02868 
02869    You should have received a copy of the GNU Lesser General Public
02870    License along with this library; if not, write to the Free Software
02871    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02872 */
02873 
02874 #undef GAN_MATTYPE
02875 #undef GAN_MATRIX_TYPE
02876 #undef GAN_SQUMATRIX_TYPE
02877 #undef GAN_VECTOR_TYPE
02878 #undef GAN_MAT_ELEMENT_TYPE
02879 #undef GAN_REALTYPE
02880 #undef GAN_VECTYPE1
02881 #undef GAN_VECTYPE2
02882 #undef GAN_MATTYPEL
02883 #undef GAN_MATTYPER
02884 #undef GAN_SQUMATTYPEL
02885 #undef GAN_SQUMATTYPER
02886 #undef GAN_FIXED_MATRIX_TYPE
02887 #undef GAN_MAT_FPRINT
02888 #undef GAN_MAT_PRINT
02889 #undef GAN_MAT_FSCANF
02890 #undef GAN_MAT_FWRITE
02891 #undef GAN_MAT_FREAD
02892 #undef GAN_MAT_ZERO_Q
02893 #undef GAN_MAT_ZERO_S
02894 #undef GAN_MAT_COPY_Q
02895 #undef GAN_MAT_COPY_S
02896 #undef GAN_MAT_SCALE_Q
02897 #undef GAN_MAT_SCALE_S
02898 #undef GAN_MAT_SCALE_I
02899 #undef GAN_MAT_DIVIDE_Q
02900 #undef GAN_MAT_DIVIDE_S
02901 #undef GAN_MAT_DIVIDE_I
02902 #undef GAN_MAT_NEGATE_Q
02903 #undef GAN_MAT_NEGATE_S
02904 #undef GAN_MAT_NEGATE_I
02905 #undef GAN_MAT_UNIT_Q
02906 #undef GAN_MAT_UNIT_S
02907 #undef GAN_MAT_UNIT_I
02908 #undef GAN_MAT_ADD_Q
02909 #undef GAN_MAT_ADD_I1
02910 #undef GAN_MAT_ADD_I2
02911 #undef GAN_MAT_INCREMENT
02912 #undef GAN_MAT_ADD_S
02913 #undef GAN_MAT_SUB_Q
02914 #undef GAN_MAT_SUB_I1
02915 #undef GAN_MAT_SUB_I2
02916 #undef GAN_MAT_DECREMENT
02917 #undef GAN_MAT_SUB_S
02918 #undef GAN_VEC_OUTER_Q
02919 #undef GAN_VEC_OUTER_S
02920 #undef GAN_MAT_MULTV_Q
02921 #undef GAN_MAT_MULTV_S
02922 #undef GAN_MAT_MULTV_I
02923 #undef GAN_MATT_MULTV_Q
02924 #undef GAN_MATT_MULTV_S
02925 #undef GAN_MATT_MULTV_I
02926 #undef GAN_MAT_LMULTM_Q
02927 #undef GAN_MAT_LMULTM_S
02928 #undef GAN_MAT_LMULTMT_Q
02929 #undef GAN_MAT_LMULTMT_S
02930 #undef GAN_MAT_RMULTM_Q
02931 #undef GAN_MAT_RMULTM_S
02932 #undef GAN_MAT_RMULTMT_Q
02933 #undef GAN_MAT_RMULTMT_S
02934 #undef GAN_MAT_LMULTMT_SYM_Q
02935 #undef GAN_MAT_LMULTMT_SYM_S
02936 #undef GAN_MAT_RMULTMT_SYM_Q
02937 #undef GAN_MAT_RMULTMT_SYM_S
02938 #undef GAN_MAT_LMULTS_Q
02939 #undef GAN_MAT_LMULTS_S
02940 #undef GAN_MAT_RMULTS_Q
02941 #undef GAN_MAT_RMULTS_S
02942 #undef GAN_SYMMATL_LRMULT_Q
02943 #undef GAN_SYMMATL_LRMULT_S
02944 #undef GAN_SYMMATR_LRMULT_Q
02945 #undef GAN_SYMMATR_LRMULT_S
02946 #undef GAN_MAT_LMULTL_Q
02947 #undef GAN_MAT_LMULTL_S
02948 #undef GAN_MAT_LMULTL_I
02949 #undef GAN_MAT_LMULTLI_Q
02950 #undef GAN_MAT_LMULTLI_S
02951 #undef GAN_MAT_LMULTLI_I
02952 #undef GAN_MAT_LMULTLT_Q
02953 #undef GAN_MAT_LMULTLT_S
02954 #undef GAN_MAT_LMULTLT_I
02955 #undef GAN_MAT_LMULTLIT_Q
02956 #undef GAN_MAT_LMULTLIT_S
02957 #undef GAN_MAT_LMULTLIT_I
02958 #undef GAN_MAT_RMULTL_Q
02959 #undef GAN_MAT_RMULTL_S
02960 #undef GAN_MAT_RMULTL_I
02961 #undef GAN_MAT_RMULTLI_Q
02962 #undef GAN_MAT_RMULTLI_S
02963 #undef GAN_MAT_RMULTLI_I
02964 #undef GAN_MAT_RMULTLT_Q
02965 #undef GAN_MAT_RMULTLT_S
02966 #undef GAN_MAT_RMULTLT_I
02967 #undef GAN_MAT_RMULTLIT_Q
02968 #undef GAN_MAT_RMULTLIT_S
02969 #undef GAN_MAT_RMULTLIT_I
02970 #undef GAN_MAT_SRMULTT_Q
02971 #undef GAN_MAT_SRMULTT_S
02972 #undef GAN_MAT_SRMULTT_I
02973 #undef GAN_MAT_SLMULTT_Q
02974 #undef GAN_MAT_SLMULTT_S
02975 #undef GAN_MAT_SLMULTT_I
02976 #undef GAN_MAT_RMULTLIT_S
02977 #undef GAN_MAT_SUMSQR_Q
02978 #undef GAN_MAT_SUMSQR_S
02979 #undef GAN_MAT_FNORM_Q
02980 #undef GAN_MAT_FNORM_S
02981 #undef GAN_MAT_FROM_MAT_Q
02982 #undef GAN_MAT_FROM_MAT_S
02983 #undef GAN_MAT_FROM_SQUMAT_Q
02984 #undef GAN_MAT_FROM_SQUMAT_S
02985 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02986 #undef GAN_SQUMAT_FROM_SQUMAT_S
02987 
02988 /* declare functions specific to lower triangular 4x4 matrices */
03002 /* This library is free software; you can redistribute it and/or
03003    modify it under the terms of the GNU Lesser General Public
03004    License as published by the Free Software Foundation; either
03005    version 2.1 of the License, or (at your option) any later version.
03006 
03007    This library is distributed in the hope that it will be useful,
03008    but WITHOUT ANY WARRANTY; without even the implied warranty of
03009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03010    Lesser General Public License for more details.
03011 
03012    You should have received a copy of the GNU Lesser General Public
03013    License along with this library; if not, write to the Free Software
03014    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03015 */
03016 
03017 #ifndef _GAN_4X4LTMAT_H
03018 
03035 Gan_SquMatrix44 *gan_ltmat44_fill_q (
03036                           Gan_SquMatrix44 *A,
03037                           double XX,
03038                           double YX, double YY,
03039                           double ZX, double ZY, double ZZ,
03040                           double WX, double WY, double WZ, double WW );
03041 
03061 void gan_ltmat44_get_parts_q ( Gan_SquMatrix44 *A,
03062                                Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s );
03063 
03086 Gan_SquMatrix44 *gan_ltmat44_set_parts_q ( Gan_SquMatrix44 *A,
03087                                            Gan_SquMatrix33 *B,
03088                                            Gan_Vector3 *p, double s );
03089 
03095 #endif /* #ifndef _GAN_4X4LTMAT_H */
03096 
03097 #define GAN_MATTYPE Gan_SquMatrix44
03098 #define GAN_MATRIX_TYPE Gan_SquMatrix
03099 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03100 #define GAN_VECTOR_TYPE Gan_Vector
03101 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03102 #define GAN_REALTYPE double
03103 #define GAN_VECTYPE1 Gan_Vector4
03104 #define GAN_VECTYPE2 Gan_Vector4
03105 #define GAN_SQUMATTYPEL Gan_SquMatrix44
03106 #define GAN_SQUMATTYPER Gan_SquMatrix44
03107 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03108 #define GAN_MAT_FPRINT     gan_ltmat44_fprint
03109 #define GAN_MAT_PRINT      gan_ltmat44_print
03110 #define GAN_MAT_FSCANF     gan_ltmat44_fscanf
03111 #define GAN_MAT_FWRITE     gan_ltmat44_fwrite
03112 #define GAN_MAT_FREAD      gan_ltmat44_fread
03113 #define GAN_MAT_ZERO_Q     gan_ltmat44_zero_q
03114 #define GAN_MAT_ZERO_S     gan_ltmat44_zero_s
03115 #define GAN_MAT_COPY_Q     gan_ltmat44_copy_q
03116 #define GAN_MAT_COPY_S     gan_ltmat44_copy_s
03117 #define GAN_MAT_SCALE_Q    gan_ltmat44_scale_q
03118 #define GAN_MAT_SCALE_S    gan_ltmat44_scale_s
03119 #define GAN_MAT_SCALE_I    gan_ltmat44_scale_i
03120 #define GAN_MAT_DIVIDE_Q   gan_ltmat44_divide_q
03121 #define GAN_MAT_DIVIDE_S   gan_ltmat44_divide_s
03122 #define GAN_MAT_DIVIDE_I   gan_ltmat44_divide_i
03123 #define GAN_MAT_NEGATE_Q   gan_ltmat44_negate_q
03124 #define GAN_MAT_NEGATE_S   gan_ltmat44_negate_s
03125 #define GAN_MAT_NEGATE_I   gan_ltmat44_negate_i
03126 #define GAN_MAT_UNIT_Q     gan_ltmat44_unit_q
03127 #define GAN_MAT_UNIT_S     gan_ltmat44_unit_s
03128 #define GAN_MAT_UNIT_I     gan_ltmat44_unit_i
03129 #define GAN_MAT_ADD_Q      gan_ltmat44_add_q
03130 #define GAN_MAT_ADD_I1     gan_ltmat44_add_i1
03131 #define GAN_MAT_ADD_I2     gan_ltmat44_add_i2
03132 #define GAN_MAT_INCREMENT  gan_ltmat44_increment
03133 #define GAN_MAT_ADD_S      gan_ltmat44_add_s
03134 #define GAN_MAT_SUB_Q      gan_ltmat44_sub_q
03135 #define GAN_MAT_SUB_I1     gan_ltmat44_sub_i1
03136 #define GAN_MAT_SUB_I2     gan_ltmat44_sub_i2
03137 #define GAN_MAT_DECREMENT  gan_ltmat44_decrement
03138 #define GAN_MAT_SUB_S      gan_ltmat44_sub_s
03139 #define GAN_MAT_MULTV_Q    gan_ltmat44_multv4_q
03140 #define GAN_MAT_MULTV_S    gan_ltmat44_multv4_s
03141 #define GAN_MAT_MULTV_I    gan_ltmat44_multv4_i
03142 #define GAN_MATT_MULTV_Q   gan_ltmat44T_multv4_q
03143 #define GAN_MATT_MULTV_S   gan_ltmat44T_multv4_s
03144 #define GAN_MATT_MULTV_I   gan_ltmat44T_multv4_i
03145 #define GAN_MAT_SRMULTT_Q  gan_ltmat44_srmultT_q
03146 #define GAN_MAT_SRMULTT_S  gan_ltmat44_srmultT_s
03147 #define GAN_MAT_SRMULTT_I  gan_ltmat44_srmultT_i
03148 #define GAN_MAT_SLMULTT_Q  gan_ltmat44_slmultT_q
03149 #define GAN_MAT_SLMULTT_S  gan_ltmat44_slmultT_s
03150 #define GAN_MAT_SLMULTT_I  gan_ltmat44_slmultT_i
03151 #define GAN_MAT_SUMSQR_Q   gan_ltmat44_sumsqr_q
03152 #define GAN_MAT_SUMSQR_S   gan_ltmat44_sumsqr_s
03153 #define GAN_MAT_FNORM_Q    gan_ltmat44_Fnorm_q
03154 #define GAN_MAT_FNORM_S    gan_ltmat44_Fnorm_s
03155 
03156 #define GAN_SQUMAT_IDENT_Q    gan_ltmat44_ident_q
03157 #define GAN_SQUMAT_IDENT_S    gan_ltmat44_ident_s
03158 #define GAN_SQUMATI_MULTV_Q   gan_ltmat44I_multv4_q
03159 #define GAN_SQUMATI_MULTV_S   gan_ltmat44I_multv4_s
03160 #define GAN_SQUMATI_MULTV_I   gan_ltmat44I_multv4_i
03161 #define GAN_SQUMATIT_MULTV_Q  gan_ltmat44IT_multv4_q
03162 #define GAN_SQUMATIT_MULTV_S  gan_ltmat44IT_multv4_s
03163 #define GAN_SQUMATIT_MULTV_I  gan_ltmat44IT_multv4_i
03164 #define GAN_SQUMAT_INVERT     gan_ltmat44_invert
03165 #define GAN_SQUMAT_INVERT_Q   gan_ltmat44_invert_q
03166 #define GAN_SQUMAT_INVERT_S   gan_ltmat44_invert_s
03167 #define GAN_SQUMAT_INVERT_I   gan_ltmat44_invert_i
03168 #define GAN_SQUMAT_DET_Q      gan_ltmat44_det_q
03169 #define GAN_SQUMAT_DET_S      gan_ltmat44_det_s
03170 #define GAN_SQUMAT_TRACE_Q    gan_ltmat44_trace_q
03171 #define GAN_SQUMAT_TRACE_S    gan_ltmat44_trace_s
03172 
03173 #ifndef _GAN_4X4LTMAT_H
03174 #define _GAN_4X4LTMAT_H
03175 
03176 
03177 #endif /* #ifndef _GAN_4X4LTMAT_H */
03178 
03191 /* This library is free software; you can redistribute it and/or
03192    modify it under the terms of the GNU Lesser General Public
03193    License as published by the Free Software Foundation; either
03194    version 2.1 of the License, or (at your option) any later version.
03195 
03196    This library is distributed in the hope that it will be useful,
03197    but WITHOUT ANY WARRANTY; without even the implied warranty of
03198    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03199    Lesser General Public License for more details.
03200 
03201    You should have received a copy of the GNU Lesser General Public
03202    License along with this library; if not, write to the Free Software
03203    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03204 */
03205 
03206 /* function declarations for functions common to all small square matrix
03207  * types */
03208 
03209 
03210 
03211 /* documentation for macros defined in individual header files */
03212 
03225 Gan_SquMatrix44 *gan_ltmat44_ident_q ( Gan_SquMatrix44 *A );
03226 
03264 Gan_Vector4 *gan_ltmat44I_multv4_q ( Gan_SquMatrix44 *A, Gan_Vector4 *p,
03265                                     Gan_Vector4 *q );
03266 
03275 Gan_Vector4 *gan_ltmat44I_multv4_i ( Gan_SquMatrix44 *A, Gan_Vector4 *p );
03276 
03285 Gan_Vector4 *gan_ltmat44IT_multv4_q ( Gan_SquMatrix44 *A, Gan_Vector4 *p,
03286                                      Gan_Vector4 *q );
03287 
03296 Gan_Vector4 *gan_ltmat44IT_multv4_i ( Gan_SquMatrix44 *A, Gan_Vector4 *p );
03297 
03315 Gan_SquMatrix44 *gan_ltmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03316 
03325 Gan_SquMatrix44 *gan_ltmat44_invert_i ( Gan_SquMatrix44 *A );
03326 
03341 double gan_ltmat44_det_q ( Gan_SquMatrix44 *A );
03342 
03348 double gan_ltmat44_trace_q ( Gan_SquMatrix44 *A );
03349 
03355 #undef GAN_SQUMAT_IDENT_Q
03356 #undef GAN_SQUMAT_IDENT_S
03357 #undef GAN_SQUMAT_TPOSE_Q
03358 #undef GAN_SQUMAT_TPOSE_S
03359 #undef GAN_SQUMAT_TPOSE_I
03360 #undef GAN_MAT_SADDT_Q
03361 #undef GAN_MAT_SADDT_S
03362 #undef GAN_SQUMATI_MULTV_Q
03363 #undef GAN_SQUMATI_MULTV_S
03364 #undef GAN_SQUMATI_MULTV_I
03365 #undef GAN_SQUMATIT_MULTV_Q
03366 #undef GAN_SQUMATIT_MULTV_S
03367 #undef GAN_SQUMATIT_MULTV_I
03368 #undef GAN_SQUMAT_INVERT
03369 #undef GAN_SQUMAT_INVERT_Q
03370 #undef GAN_SQUMAT_INVERT_S
03371 #undef GAN_SQUMAT_INVERT_I
03372 #undef GAN_SQUMAT_ADJOINT_Q
03373 #undef GAN_SQUMAT_ADJOINT_S
03374 #undef GAN_SQUMAT_ADJOINTT_Q
03375 #undef GAN_SQUMAT_ADJOINTT_S
03376 #undef GAN_SQUMAT_DET_Q
03377 #undef GAN_SQUMAT_DET_S
03378 #undef GAN_SQUMAT_TRACE_Q
03379 #undef GAN_SQUMAT_TRACE_S
03380 
03393 /* This library is free software; you can redistribute it and/or
03394    modify it under the terms of the GNU Lesser General Public
03395    License as published by the Free Software Foundation; either
03396    version 2.1 of the License, or (at your option) any later version.
03397 
03398    This library is distributed in the hope that it will be useful,
03399    but WITHOUT ANY WARRANTY; without even the implied warranty of
03400    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03401    Lesser General Public License for more details.
03402 
03403    You should have received a copy of the GNU Lesser General Public
03404    License along with this library; if not, write to the Free Software
03405    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03406 */
03407 
03408 /* function declarations for functions common to all small vector types */
03409 
03410 
03411 
03412 /* documentation for macros defined in individual header files */
03413 
03424 Gan_SquMatrix44 *gan_ltmat44_zero_q ( Gan_SquMatrix44 *A );
03425 
03442 Gan_SquMatrix44 *gan_ltmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03443 
03461 Gan_SquMatrix44 *gan_ltmat44_scale_q ( Gan_SquMatrix44 *A, double a,
03462                                Gan_SquMatrix44 *B );
03463 
03471 Gan_SquMatrix44 *gan_ltmat44_scale_i ( Gan_SquMatrix44 *A, double a );
03472 
03481 Gan_SquMatrix44 *gan_ltmat44_divide_q ( Gan_SquMatrix44 *A, double a,
03482                                 Gan_SquMatrix44 *B );
03483 
03491 Gan_SquMatrix44 *gan_ltmat44_divide_i ( Gan_SquMatrix44 *A, double a );
03492 
03500 Gan_SquMatrix44 *gan_ltmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03501 
03509 Gan_SquMatrix44 *gan_ltmat44_negate_i ( Gan_SquMatrix44 *A );
03510 
03518 Gan_SquMatrix44 *gan_ltmat44_unit_i ( Gan_SquMatrix44 *A );
03519 
03537 Gan_SquMatrix44 *gan_ltmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03538 
03547 Gan_SquMatrix44 *gan_ltmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03548 
03557 Gan_SquMatrix44 *gan_ltmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03558 
03567 Gan_SquMatrix44 *gan_ltmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03568 
03586 Gan_SquMatrix44 *gan_ltmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03587 
03596 Gan_SquMatrix44 *gan_ltmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03597 
03606 Gan_SquMatrix44 *gan_ltmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03607 
03616 Gan_SquMatrix44 *gan_ltmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03617 
03636 Gan_Vector4 *gan_ltmat44_multv4_q ( Gan_SquMatrix44 *A, Gan_Vector4 *p,
03637                                 Gan_Vector4 *q );
03638 
03647 Gan_Vector4 *gan_ltmat44_multv4_i ( Gan_SquMatrix44 *A, Gan_Vector4 *p );
03648 
03657 Gan_Vector4 *gan_ltmat44T_multv4_q ( Gan_SquMatrix44 *A, Gan_Vector4 *p,
03658                                  Gan_Vector4 *q );
03659 
03668 Gan_Vector4 *gan_ltmat44T_multv4_i ( Gan_SquMatrix44 *A, Gan_Vector4 *p );
03669 
03731 Gan_SquMatrix44 *gan_ltmat44_slmultT_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03732 
03742 Gan_SquMatrix44 *gan_ltmat44_slmultT_i ( Gan_SquMatrix44 *A );
03743 
03752 Gan_SquMatrix44 *gan_ltmat44_srmultT_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03753 
03763 Gan_SquMatrix44 *gan_ltmat44_srmultT_i ( Gan_SquMatrix44 *A );
03764 
03779 double gan_ltmat44_sumsqr_q ( Gan_SquMatrix44 *A );
03780 
03787 double gan_ltmat44_Fnorm_q ( Gan_SquMatrix44 *A );
03788 
03819 /* This library is free software; you can redistribute it and/or
03820    modify it under the terms of the GNU Lesser General Public
03821    License as published by the Free Software Foundation; either
03822    version 2.1 of the License, or (at your option) any later version.
03823 
03824    This library is distributed in the hope that it will be useful,
03825    but WITHOUT ANY WARRANTY; without even the implied warranty of
03826    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03827    Lesser General Public License for more details.
03828 
03829    You should have received a copy of the GNU Lesser General Public
03830    License along with this library; if not, write to the Free Software
03831    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03832 */
03833 
03834 #undef GAN_MATTYPE
03835 #undef GAN_MATRIX_TYPE
03836 #undef GAN_SQUMATRIX_TYPE
03837 #undef GAN_VECTOR_TYPE
03838 #undef GAN_MAT_ELEMENT_TYPE
03839 #undef GAN_REALTYPE
03840 #undef GAN_VECTYPE1
03841 #undef GAN_VECTYPE2
03842 #undef GAN_MATTYPEL
03843 #undef GAN_MATTYPER
03844 #undef GAN_SQUMATTYPEL
03845 #undef GAN_SQUMATTYPER
03846 #undef GAN_FIXED_MATRIX_TYPE
03847 #undef GAN_MAT_FPRINT
03848 #undef GAN_MAT_PRINT
03849 #undef GAN_MAT_FSCANF
03850 #undef GAN_MAT_FWRITE
03851 #undef GAN_MAT_FREAD
03852 #undef GAN_MAT_ZERO_Q
03853 #undef GAN_MAT_ZERO_S
03854 #undef GAN_MAT_COPY_Q
03855 #undef GAN_MAT_COPY_S
03856 #undef GAN_MAT_SCALE_Q
03857 #undef GAN_MAT_SCALE_S
03858 #undef GAN_MAT_SCALE_I
03859 #undef GAN_MAT_DIVIDE_Q
03860 #undef GAN_MAT_DIVIDE_S
03861 #undef GAN_MAT_DIVIDE_I
03862 #undef GAN_MAT_NEGATE_Q
03863 #undef GAN_MAT_NEGATE_S
03864 #undef GAN_MAT_NEGATE_I
03865 #undef GAN_MAT_UNIT_Q
03866 #undef GAN_MAT_UNIT_S
03867 #undef GAN_MAT_UNIT_I
03868 #undef GAN_MAT_ADD_Q
03869 #undef GAN_MAT_ADD_I1
03870 #undef GAN_MAT_ADD_I2
03871 #undef GAN_MAT_INCREMENT
03872 #undef GAN_MAT_ADD_S
03873 #undef GAN_MAT_SUB_Q
03874 #undef GAN_MAT_SUB_I1
03875 #undef GAN_MAT_SUB_I2
03876 #undef GAN_MAT_DECREMENT
03877 #undef GAN_MAT_SUB_S
03878 #undef GAN_VEC_OUTER_Q
03879 #undef GAN_VEC_OUTER_S
03880 #undef GAN_MAT_MULTV_Q
03881 #undef GAN_MAT_MULTV_S
03882 #undef GAN_MAT_MULTV_I
03883 #undef GAN_MATT_MULTV_Q
03884 #undef GAN_MATT_MULTV_S
03885 #undef GAN_MATT_MULTV_I
03886 #undef GAN_MAT_LMULTM_Q
03887 #undef GAN_MAT_LMULTM_S
03888 #undef GAN_MAT_LMULTMT_Q
03889 #undef GAN_MAT_LMULTMT_S
03890 #undef GAN_MAT_RMULTM_Q
03891 #undef GAN_MAT_RMULTM_S
03892 #undef GAN_MAT_RMULTMT_Q
03893 #undef GAN_MAT_RMULTMT_S
03894 #undef GAN_MAT_LMULTMT_SYM_Q
03895 #undef GAN_MAT_LMULTMT_SYM_S
03896 #undef GAN_MAT_RMULTMT_SYM_Q
03897 #undef GAN_MAT_RMULTMT_SYM_S
03898 #undef GAN_MAT_LMULTS_Q
03899 #undef GAN_MAT_LMULTS_S
03900 #undef GAN_MAT_RMULTS_Q
03901 #undef GAN_MAT_RMULTS_S
03902 #undef GAN_SYMMATL_LRMULT_Q
03903 #undef GAN_SYMMATL_LRMULT_S
03904 #undef GAN_SYMMATR_LRMULT_Q
03905 #undef GAN_SYMMATR_LRMULT_S
03906 #undef GAN_MAT_LMULTL_Q
03907 #undef GAN_MAT_LMULTL_S
03908 #undef GAN_MAT_LMULTL_I
03909 #undef GAN_MAT_LMULTLI_Q
03910 #undef GAN_MAT_LMULTLI_S
03911 #undef GAN_MAT_LMULTLI_I
03912 #undef GAN_MAT_LMULTLT_Q
03913 #undef GAN_MAT_LMULTLT_S
03914 #undef GAN_MAT_LMULTLT_I
03915 #undef GAN_MAT_LMULTLIT_Q
03916 #undef GAN_MAT_LMULTLIT_S
03917 #undef GAN_MAT_LMULTLIT_I
03918 #undef GAN_MAT_RMULTL_Q
03919 #undef GAN_MAT_RMULTL_S
03920 #undef GAN_MAT_RMULTL_I
03921 #undef GAN_MAT_RMULTLI_Q
03922 #undef GAN_MAT_RMULTLI_S
03923 #undef GAN_MAT_RMULTLI_I
03924 #undef GAN_MAT_RMULTLT_Q
03925 #undef GAN_MAT_RMULTLT_S
03926 #undef GAN_MAT_RMULTLT_I
03927 #undef GAN_MAT_RMULTLIT_Q
03928 #undef GAN_MAT_RMULTLIT_S
03929 #undef GAN_MAT_RMULTLIT_I
03930 #undef GAN_MAT_SRMULTT_Q
03931 #undef GAN_MAT_SRMULTT_S
03932 #undef GAN_MAT_SRMULTT_I
03933 #undef GAN_MAT_SLMULTT_Q
03934 #undef GAN_MAT_SLMULTT_S
03935 #undef GAN_MAT_SLMULTT_I
03936 #undef GAN_MAT_RMULTLIT_S
03937 #undef GAN_MAT_SUMSQR_Q
03938 #undef GAN_MAT_SUMSQR_S
03939 #undef GAN_MAT_FNORM_Q
03940 #undef GAN_MAT_FNORM_S
03941 #undef GAN_MAT_FROM_MAT_Q
03942 #undef GAN_MAT_FROM_MAT_S
03943 #undef GAN_MAT_FROM_SQUMAT_Q
03944 #undef GAN_MAT_FROM_SQUMAT_S
03945 #undef GAN_SQUMAT_FROM_SQUMAT_Q
03946 #undef GAN_SQUMAT_FROM_SQUMAT_S
03947 
03948 /* declare functions specific to upper triangular 4x4 matrices */
03962 /* This library is free software; you can redistribute it and/or
03963    modify it under the terms of the GNU Lesser General Public
03964    License as published by the Free Software Foundation; either
03965    version 2.1 of the License, or (at your option) any later version.
03966 
03967    This library is distributed in the hope that it will be useful,
03968    but WITHOUT ANY WARRANTY; without even the implied warranty of
03969    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03970    Lesser General Public License for more details.
03971 
03972    You should have received a copy of the GNU Lesser General Public
03973    License along with this library; if not, write to the Free Software
03974    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03975 */
03976 
03977 #define GAN_MATTYPE Gan_SquMatrix44
03978 #define GAN_MATRIX_TYPE Gan_SquMatrix
03979 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03980 #define GAN_VECTOR_TYPE Gan_Vector
03981 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03982 #define GAN_REALTYPE double
03983 #define GAN_MAT_FPRINT   gan_ltmat44T_fprint
03984 #define GAN_MAT_PRINT    gan_ltmat44T_print
03985 #define GAN_MAT_FSCANF   gan_ltmat44T_fscanf
03986 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03987 
03988 #define gan_ltmat44T_fwrite gan_ltmat44_fwrite
03989 #define gan_ltmat44T_fread  gan_ltmat44_fread
03990 
04003 /* This library is free software; you can redistribute it and/or
04004    modify it under the terms of the GNU Lesser General Public
04005    License as published by the Free Software Foundation; either
04006    version 2.1 of the License, or (at your option) any later version.
04007 
04008    This library is distributed in the hope that it will be useful,
04009    but WITHOUT ANY WARRANTY; without even the implied warranty of
04010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04011    Lesser General Public License for more details.
04012 
04013    You should have received a copy of the GNU Lesser General Public
04014    License along with this library; if not, write to the Free Software
04015    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04016 */
04017 
04018 /* function declarations for functions common to all small square matrix
04019  * types */
04020 
04021 
04022 
04023 /* documentation for macros defined in individual header files */
04024 
04091 #undef GAN_SQUMAT_IDENT_Q
04092 #undef GAN_SQUMAT_IDENT_S
04093 #undef GAN_SQUMAT_TPOSE_Q
04094 #undef GAN_SQUMAT_TPOSE_S
04095 #undef GAN_SQUMAT_TPOSE_I
04096 #undef GAN_MAT_SADDT_Q
04097 #undef GAN_MAT_SADDT_S
04098 #undef GAN_SQUMATI_MULTV_Q
04099 #undef GAN_SQUMATI_MULTV_S
04100 #undef GAN_SQUMATI_MULTV_I
04101 #undef GAN_SQUMATIT_MULTV_Q
04102 #undef GAN_SQUMATIT_MULTV_S
04103 #undef GAN_SQUMATIT_MULTV_I
04104 #undef GAN_SQUMAT_INVERT
04105 #undef GAN_SQUMAT_INVERT_Q
04106 #undef GAN_SQUMAT_INVERT_S
04107 #undef GAN_SQUMAT_INVERT_I
04108 #undef GAN_SQUMAT_ADJOINT_Q
04109 #undef GAN_SQUMAT_ADJOINT_S
04110 #undef GAN_SQUMAT_ADJOINTT_Q
04111 #undef GAN_SQUMAT_ADJOINTT_S
04112 #undef GAN_SQUMAT_DET_Q
04113 #undef GAN_SQUMAT_DET_S
04114 #undef GAN_SQUMAT_TRACE_Q
04115 #undef GAN_SQUMAT_TRACE_S
04116 
04129 /* This library is free software; you can redistribute it and/or
04130    modify it under the terms of the GNU Lesser General Public
04131    License as published by the Free Software Foundation; either
04132    version 2.1 of the License, or (at your option) any later version.
04133 
04134    This library is distributed in the hope that it will be useful,
04135    but WITHOUT ANY WARRANTY; without even the implied warranty of
04136    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04137    Lesser General Public License for more details.
04138 
04139    You should have received a copy of the GNU Lesser General Public
04140    License along with this library; if not, write to the Free Software
04141    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04142 */
04143 
04144 /* function declarations for functions common to all small vector types */
04145 
04146 
04147 
04148 /* documentation for macros defined in individual header files */
04149 
04320 /* This library is free software; you can redistribute it and/or
04321    modify it under the terms of the GNU Lesser General Public
04322    License as published by the Free Software Foundation; either
04323    version 2.1 of the License, or (at your option) any later version.
04324 
04325    This library is distributed in the hope that it will be useful,
04326    but WITHOUT ANY WARRANTY; without even the implied warranty of
04327    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04328    Lesser General Public License for more details.
04329 
04330    You should have received a copy of the GNU Lesser General Public
04331    License along with this library; if not, write to the Free Software
04332    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04333 */
04334 
04335 #undef GAN_MATTYPE
04336 #undef GAN_MATRIX_TYPE
04337 #undef GAN_SQUMATRIX_TYPE
04338 #undef GAN_VECTOR_TYPE
04339 #undef GAN_MAT_ELEMENT_TYPE
04340 #undef GAN_REALTYPE
04341 #undef GAN_VECTYPE1
04342 #undef GAN_VECTYPE2
04343 #undef GAN_MATTYPEL
04344 #undef GAN_MATTYPER
04345 #undef GAN_SQUMATTYPEL
04346 #undef GAN_SQUMATTYPER
04347 #undef GAN_FIXED_MATRIX_TYPE
04348 #undef GAN_MAT_FPRINT
04349 #undef GAN_MAT_PRINT
04350 #undef GAN_MAT_FSCANF
04351 #undef GAN_MAT_FWRITE
04352 #undef GAN_MAT_FREAD
04353 #undef GAN_MAT_ZERO_Q
04354 #undef GAN_MAT_ZERO_S
04355 #undef GAN_MAT_COPY_Q
04356 #undef GAN_MAT_COPY_S
04357 #undef GAN_MAT_SCALE_Q
04358 #undef GAN_MAT_SCALE_S
04359 #undef GAN_MAT_SCALE_I
04360 #undef GAN_MAT_DIVIDE_Q
04361 #undef GAN_MAT_DIVIDE_S
04362 #undef GAN_MAT_DIVIDE_I
04363 #undef GAN_MAT_NEGATE_Q
04364 #undef GAN_MAT_NEGATE_S
04365 #undef GAN_MAT_NEGATE_I
04366 #undef GAN_MAT_UNIT_Q
04367 #undef GAN_MAT_UNIT_S
04368 #undef GAN_MAT_UNIT_I
04369 #undef GAN_MAT_ADD_Q
04370 #undef GAN_MAT_ADD_I1
04371 #undef GAN_MAT_ADD_I2
04372 #undef GAN_MAT_INCREMENT
04373 #undef GAN_MAT_ADD_S
04374 #undef GAN_MAT_SUB_Q
04375 #undef GAN_MAT_SUB_I1
04376 #undef GAN_MAT_SUB_I2
04377 #undef GAN_MAT_DECREMENT
04378 #undef GAN_MAT_SUB_S
04379 #undef GAN_VEC_OUTER_Q
04380 #undef GAN_VEC_OUTER_S
04381 #undef GAN_MAT_MULTV_Q
04382 #undef GAN_MAT_MULTV_S
04383 #undef GAN_MAT_MULTV_I
04384 #undef GAN_MATT_MULTV_Q
04385 #undef GAN_MATT_MULTV_S
04386 #undef GAN_MATT_MULTV_I
04387 #undef GAN_MAT_LMULTM_Q
04388 #undef GAN_MAT_LMULTM_S
04389 #undef GAN_MAT_LMULTMT_Q
04390 #undef GAN_MAT_LMULTMT_S
04391 #undef GAN_MAT_RMULTM_Q
04392 #undef GAN_MAT_RMULTM_S
04393 #undef GAN_MAT_RMULTMT_Q
04394 #undef GAN_MAT_RMULTMT_S
04395 #undef GAN_MAT_LMULTMT_SYM_Q
04396 #undef GAN_MAT_LMULTMT_SYM_S
04397 #undef GAN_MAT_RMULTMT_SYM_Q
04398 #undef GAN_MAT_RMULTMT_SYM_S
04399 #undef GAN_MAT_LMULTS_Q
04400 #undef GAN_MAT_LMULTS_S
04401 #undef GAN_MAT_RMULTS_Q
04402 #undef GAN_MAT_RMULTS_S
04403 #undef GAN_SYMMATL_LRMULT_Q
04404 #undef GAN_SYMMATL_LRMULT_S
04405 #undef GAN_SYMMATR_LRMULT_Q
04406 #undef GAN_SYMMATR_LRMULT_S
04407 #undef GAN_MAT_LMULTL_Q
04408 #undef GAN_MAT_LMULTL_S
04409 #undef GAN_MAT_LMULTL_I
04410 #undef GAN_MAT_LMULTLI_Q
04411 #undef GAN_MAT_LMULTLI_S
04412 #undef GAN_MAT_LMULTLI_I
04413 #undef GAN_MAT_LMULTLT_Q
04414 #undef GAN_MAT_LMULTLT_S
04415 #undef GAN_MAT_LMULTLT_I
04416 #undef GAN_MAT_LMULTLIT_Q
04417 #undef GAN_MAT_LMULTLIT_S
04418 #undef GAN_MAT_LMULTLIT_I
04419 #undef GAN_MAT_RMULTL_Q
04420 #undef GAN_MAT_RMULTL_S
04421 #undef GAN_MAT_RMULTL_I
04422 #undef GAN_MAT_RMULTLI_Q
04423 #undef GAN_MAT_RMULTLI_S
04424 #undef GAN_MAT_RMULTLI_I
04425 #undef GAN_MAT_RMULTLT_Q
04426 #undef GAN_MAT_RMULTLT_S
04427 #undef GAN_MAT_RMULTLT_I
04428 #undef GAN_MAT_RMULTLIT_Q
04429 #undef GAN_MAT_RMULTLIT_S
04430 #undef GAN_MAT_RMULTLIT_I
04431 #undef GAN_MAT_SRMULTT_Q
04432 #undef GAN_MAT_SRMULTT_S
04433 #undef GAN_MAT_SRMULTT_I
04434 #undef GAN_MAT_SLMULTT_Q
04435 #undef GAN_MAT_SLMULTT_S
04436 #undef GAN_MAT_SLMULTT_I
04437 #undef GAN_MAT_RMULTLIT_S
04438 #undef GAN_MAT_SUMSQR_Q
04439 #undef GAN_MAT_SUMSQR_S
04440 #undef GAN_MAT_FNORM_Q
04441 #undef GAN_MAT_FNORM_S
04442 #undef GAN_MAT_FROM_MAT_Q
04443 #undef GAN_MAT_FROM_MAT_S
04444 #undef GAN_MAT_FROM_SQUMAT_Q
04445 #undef GAN_MAT_FROM_SQUMAT_S
04446 #undef GAN_SQUMAT_FROM_SQUMAT_Q
04447 #undef GAN_SQUMAT_FROM_SQUMAT_S
04448 
04457 #ifdef __cplusplus
04458 }
04459 #endif
04460 
04461 #endif /* #ifndef _GAN_4X4MATRIX_H */

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