Main Page | Modules | Class List | File List | Class 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 
00569 
00570 typedef struct Gan_Matrix44
00571 {
00572    double xx, xy, xz, xw,
00573           yx, yy, yz, yw,
00574           zx, zy, zz, zw,
00575           wx, wy, wz, ww;
00576 } Gan_Matrix44;
00577 
00578 #ifndef NDEBUG
00579 
00580 typedef enum { GAN_SYMMETRIC_MATRIX44, GAN_LOWER_TRI_MATRIX44 }
00581  Gan_SquMatrix44Type;
00582 #endif /* #ifndef NDEBUG */
00583 
00585 typedef struct Gan_SquMatrix44
00586 {
00587 #ifndef NDEBUG
00588    /* square matrix type, for setting and checking in debug mode */
00589    Gan_SquMatrix44Type type;
00590 #endif /* #ifndef NDEBUG */
00591 
00592    /* matrix data */
00593    double xx,
00594           yx, yy,
00595           zx, zy, zz,
00596           wx, wy, wz, ww;
00597 } Gan_SquMatrix44;
00598 
00599 /* matrix definitions specific to 4x4 matrices */
00600 #define GAN_ST44_FILL(A,t,XX,YX,YY,ZX,ZY,ZZ,WX,WY,WZ,WW)\
00601     (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00602     GAN_FREP44L_A_C((A)->,=,(XX),(YX),(YY),(ZX),(ZY),(ZZ),(WX),(WY),(WZ),(WW)))
00603 #define GAN_ST44_IDENT(A,t)\
00604            (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00605             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))
00606 
00607 /* generic matrix multiply operations */
00608 #define GAN_MAT44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00609  (a p1 = GAN_REP4_OP_AB(b,* c,xx,xy,xz,xw,q1,q2,q3,q4,+),\
00610   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,yz,yw,q1,q2,q3,q4,+),\
00611   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,zw,q1,q2,q3,q4,+),\
00612   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00613 #define GAN_MAT44T_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00614  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00615   a p2 = GAN_REP4_OP_AB(b,* c,xy,yy,zy,wy,q1,q2,q3,q4,+),\
00616   a p3 = GAN_REP4_OP_AB(b,* c,xz,yz,zz,wz,q1,q2,q3,q4,+),\
00617   a p4 = GAN_REP4_OP_AB(b,* c,xw,yw,zw,ww,q1,q2,q3,q4,+))
00618 
00619 /* symmetric matrix multiply operation */
00620 #define GAN_SYM44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00621  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00622   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,zy,wy,q1,q2,q3,q4,+),\
00623   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,wz,q1,q2,q3,q4,+),\
00624   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00625 
00626 /* lower triangular matrix multiply operations */
00627 #define GAN_LOW44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00628  (a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+),\
00629   a p3 = GAN_REP3_OP_AB(b,* c,zx,zy,zz,q1,q2,q3,+),\
00630   a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+),\
00631   a p1 = GAN_REP1_OP_AB(b,* c,xx,q1,+))
00632 #define GAN_LOW44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00633  (a p1 =  c q1 / b xx,\
00634   a p2 = (c q2 - b yx * a p1) / b yy,\
00635   a p3 = (c q3 - b zx * a p1 - b zy * a p2) / b zz,\
00636   a p4 = (c q4 - b wx * a p1 - b wy * a p2 - b wz * a p3) / b ww)
00637 
00638 /* upper triangular matrix multiply operations */
00639 #define GAN_UPP44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00640  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00641   a p2 = GAN_REP3_OP_AB(b,* c,yy,zy,wy,q2,q3,q4,+),\
00642   a p3 = GAN_REP2_OP_AB(b,* c,zz,wz,q3,q4,+),\
00643   a p4 = GAN_REP1_OP_AB(b,* c,ww,q4,+))
00644 #define GAN_UPP44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00645  (a p4 =  c q4 / b ww,\
00646   a p3 = (c q3 - b wz * a p4) / b zz,\
00647   a p2 = (c q2 - b zy * a p3 - b wy * a p4) / b yy,\
00648   a p1 = (c q1 - b yx * a p2 - b zx * a p3 - b wx * a p4) / b xx)
00649 
00650 /* symmetric/lower triangular square matrix definitions */
00651 #define GAN_ST44_ZERO(A,t)\
00652            (GAN_TEST_OP1(A,Gan_SquMatrix44), gan_eval((A)->type=t),\
00653             GAN_REP44L_AS_C((A)->,=0.0))
00654 #define GAN_ST44_COPY(A,B,t)\
00655            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00656             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00657             GAN_REP44L_AA_C((B)->,=(A)->))
00658 #define GAN_ST44_SCALE(A,a,B,t)\
00659            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00660             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00661             GAN_REP44L_AAS_C((B)->,=(A)->,*(a)))
00662 #define GAN_ST44_DIVIDE(A,a,B,t)\
00663            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00664             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00665             GAN_REP44L_AAS_C((B)->,=(A)->,/(a)))
00666 #define GAN_ST44_NEGATE(A,B,t)\
00667            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00668             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00669             GAN_REP44L_AA_C((B)->,=-(A)->))
00670 #define GAN_ST44_ADD(A,B,C,t)\
00671          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00672           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00673           GAN_REP44L_AAA_C((C)->,=(A)->,+(B)->))
00674 #define GAN_ST44_SUB(A,B,C,t)\
00675          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00676           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00677           GAN_REP44L_AAA_C((C)->,=(A)->,-(B)->))
00678 
00679 /* declare functions specific to generic 4x4 matrices */
00693 /* This library is free software; you can redistribute it and/or
00694    modify it under the terms of the GNU Lesser General Public
00695    License as published by the Free Software Foundation; either
00696    version 2.1 of the License, or (at your option) any later version.
00697 
00698    This library is distributed in the hope that it will be useful,
00699    but WITHOUT ANY WARRANTY; without even the implied warranty of
00700    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00701    Lesser General Public License for more details.
00702 
00703    You should have received a copy of the GNU Lesser General Public
00704    License along with this library; if not, write to the Free Software
00705    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00706 */
00707 
00708 #ifndef _GAN_4X4MAT_H
00709 
00726  Gan_Matrix44 *gan_mat44_fill_q ( Gan_Matrix44 *A,
00727                                  double XX, double XY, double XZ, double XW,
00728                                  double YX, double YY, double YZ, double YW,
00729                                  double ZX, double ZY, double ZZ, double ZW,
00730                                  double WX, double WY, double WZ, double WW );
00731 
00753  void gan_mat44_get_rows_q ( const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00754                                                    Gan_Vector4 *r, Gan_Vector4 *s );
00755 
00767  void gan_mat44_get_cols_q ( const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00768                                                    Gan_Vector4 *r, Gan_Vector4 *s );
00769 
00777  Gan_Matrix33 *gan_mat44_get_m33tl_q ( const Gan_Matrix44 *A, Gan_Matrix33 *B );
00778 
00786  Gan_Vector3 *gan_mat44_get_v3tr_q ( const Gan_Matrix44 *A, Gan_Vector3 *p );
00787 
00801  void gan_mat44_get_parts_q ( const Gan_Matrix44 *A, Gan_Matrix33 *B,
00802                              Gan_Vector3 *p, Gan_Vector3 *q, double *s );
00803 
00816  void gan_mat44_get_blocks_q ( const Gan_Matrix44 *M,
00817                               Gan_Matrix22 *A, Gan_Matrix22 *B,
00818                               Gan_Matrix22 *C, Gan_Matrix22 *D );
00819 
00842  Gan_Matrix44 *gan_mat44_set_parts_q ( Gan_Matrix44 *A,
00843                                       const Gan_Matrix33 *B, const Gan_Vector3 *p,
00844                                       const Gan_Vector3 *q, double s );
00845 
00859  Gan_Matrix44 *gan_mat44_set_blocks_q ( Gan_Matrix44 *M,
00860                                        const Gan_Matrix22 *A, const Gan_Matrix22 *B,
00861                                        const Gan_Matrix22 *C, const Gan_Matrix22 *D );
00862 
00868 #endif /* #ifndef _GAN_4X4MAT_H */
00869 
00870 #define GAN_MATTYPE Gan_Matrix44
00871 #define GAN_MATRIX_TYPE Gan_Matrix
00872 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
00873 #define GAN_VECTOR_TYPE Gan_Vector
00874 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
00875 #define GAN_REALTYPE double
00876 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
00877 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
00878 #define GAN_VECTYPE1 Gan_Vector4
00879 #define GAN_VECTYPE2 Gan_Vector4
00880 #define GAN_MATTYPEL Gan_Matrix44
00881 #define GAN_MATTYPER Gan_Matrix44
00882 #define GAN_SQUMATTYPEL Gan_SquMatrix44
00883 #define GAN_SQUMATTYPER Gan_SquMatrix44
00884 #define GAN_MAT_FPRINT                     gan_mat44_fprint
00885 #define GAN_MAT_PRINT                      gan_mat44_print
00886 #define GAN_MAT_FSCANF                     gan_mat44_fscanf
00887 #define GAN_MAT_FWRITE                     gan_mat44_fwrite
00888 #define GAN_MAT_FREAD                      gan_mat44_fread
00889 #define GAN_MAT_ZERO_Q                     gan_mat44_zero_q
00890 #define GAN_MAT_ZERO_S                     gan_mat44_zero_s
00891 #define GAN_MAT_COPY_Q                     gan_mat44_copy_q
00892 #define GAN_MAT_COPY_S                     gan_mat44_copy_s
00893 #define GAN_MAT_SCALE_Q                    gan_mat44_scale_q
00894 #define GAN_MAT_SCALE_I                    gan_mat44_scale_i
00895 #define GAN_MAT_SCALE_S                    gan_mat44_scale_s
00896 #define GAN_MAT_DIVIDE_Q                   gan_mat44_divide_q
00897 #define GAN_MAT_DIVIDE_I                   gan_mat44_divide_i
00898 #define GAN_MAT_DIVIDE_S                   gan_mat44_divide_s
00899 #define GAN_MAT_NEGATE_Q                   gan_mat44_negate_q
00900 #define GAN_MAT_NEGATE_I                   gan_mat44_negate_i
00901 #define GAN_MAT_NEGATE_S                   gan_mat44_negate_s
00902 #define GAN_MAT_UNIT_Q                     gan_mat44_unit_q
00903 #define GAN_MAT_UNIT_I                     gan_mat44_unit_i
00904 #define GAN_MAT_UNIT_S                     gan_mat44_unit_s
00905 #define GAN_MAT_ADD_Q                      gan_mat44_add_q
00906 #define GAN_MAT_ADD_I1                     gan_mat44_add_i1
00907 #define GAN_MAT_ADD_I2                     gan_mat44_add_i2
00908 #define GAN_MAT_INCREMENT                  gan_mat44_increment
00909 #define GAN_MAT_ADD_S                      gan_mat44_add_s
00910 #define GAN_MAT_SUB_Q                      gan_mat44_sub_q
00911 #define GAN_MAT_SUB_I1                     gan_mat44_sub_i1
00912 #define GAN_MAT_SUB_I2                     gan_mat44_sub_i2
00913 #define GAN_MAT_DECREMENT                  gan_mat44_decrement
00914 #define GAN_MAT_SUB_S                      gan_mat44_sub_s
00915 #define GAN_VEC_OUTER_Q                    gan_vec44_outer_q
00916 #define GAN_VEC_OUTER_S                    gan_vec44_outer_s
00917 #define GAN_MAT_MULTV_Q                    gan_mat44_multv4_q
00918 #define GAN_MAT_MULTV_S                    gan_mat44_multv4_s
00919 #define GAN_MATT_MULTV_Q                   gan_mat44T_multv4_q
00920 #define GAN_MATT_MULTV_S                   gan_mat44T_multv4_s
00921 #define GAN_MAT_LMULTMT_Q                  gan_mat44_lmultm44T_q
00922 #define GAN_MAT_LMULTMT_S                  gan_mat44_lmultm44T_s
00923 #define GAN_MAT_RMULTM_Q                   gan_mat44_rmultm44_q
00924 #define GAN_MAT_RMULTM_S                   gan_mat44_rmultm44_s
00925 #define GAN_MAT_RMULTMT_Q                  gan_mat44_rmultm44T_q
00926 #define GAN_MAT_RMULTMT_S                  gan_mat44_rmultm44T_s
00927 #define GAN_MAT_LMULTMT_SYM_Q              gan_mat44_lmultm44T_sym_q
00928 #define GAN_MAT_LMULTMT_SYM_S              gan_mat44_lmultm44T_sym_s
00929 #define GAN_MAT_RMULTMT_SYM_Q              gan_mat44_rmultm44T_sym_q
00930 #define GAN_MAT_RMULTMT_SYM_S              gan_mat44_rmultm44T_sym_s
00931 #define GAN_MAT_SLMULTT_Q                  gan_mat44_slmultT_q
00932 #define GAN_MAT_SLMULTT_S                  gan_mat44_slmultT_s
00933 #define GAN_MAT_SRMULTT_Q                  gan_mat44_srmultT_q
00934 #define GAN_MAT_SRMULTT_S                  gan_mat44_srmultT_s
00935 #define GAN_MAT_LMULTS_Q                   gan_mat44_lmults44_q
00936 #define GAN_MAT_LMULTS_S                   gan_mat44_lmults44_s
00937 #define GAN_MAT_RMULTS_Q                   gan_mat44_rmults44_q
00938 #define GAN_MAT_RMULTS_S                   gan_mat44_rmults44_s
00939 #define GAN_SYMMATL_LRMULT_Q               gan_symmat44_lrmultm44T_q
00940 #define GAN_SYMMATL_LRMULT_S               gan_symmat44_lrmultm44T_s
00941 #define GAN_SYMMATR_LRMULT_Q               gan_symmat44_lrmultm44_q
00942 #define GAN_SYMMATR_LRMULT_S               gan_symmat44_lrmultm44_s
00943 #define GAN_MAT_LMULTL_Q                   gan_mat44_lmultl44_q
00944 #define GAN_MAT_LMULTL_S                   gan_mat44_lmultl44_s
00945 #define GAN_MAT_LMULTL_I                   gan_mat44_lmultl44_i
00946 #define GAN_MAT_LMULTLI_Q                  gan_mat44_lmultl44I_q
00947 #define GAN_MAT_LMULTLI_S                  gan_mat44_lmultl44I_s
00948 #define GAN_MAT_LMULTLI_I                  gan_mat44_lmultl44I_i
00949 #define GAN_MAT_LMULTLT_Q                  gan_mat44_lmultl44T_q
00950 #define GAN_MAT_LMULTLT_S                  gan_mat44_lmultl44T_s
00951 #define GAN_MAT_LMULTLT_I                  gan_mat44_lmultl44T_i
00952 #define GAN_MAT_LMULTLIT_Q                 gan_mat44_lmultl44IT_q
00953 #define GAN_MAT_LMULTLIT_S                 gan_mat44_lmultl44IT_s
00954 #define GAN_MAT_LMULTLIT_I                 gan_mat44_lmultl44IT_i
00955 #define GAN_MAT_RMULTL_Q                   gan_mat44_rmultl44_q
00956 #define GAN_MAT_RMULTL_S                   gan_mat44_rmultl44_s
00957 #define GAN_MAT_RMULTL_I                   gan_mat44_rmultl44_i
00958 #define GAN_MAT_RMULTLI_Q                  gan_mat44_rmultl44I_q
00959 #define GAN_MAT_RMULTLI_S                  gan_mat44_rmultl44I_s
00960 #define GAN_MAT_RMULTLI_I                  gan_mat44_rmultl44I_i
00961 #define GAN_MAT_RMULTLT_Q                  gan_mat44_rmultl44T_q
00962 #define GAN_MAT_RMULTLT_S                  gan_mat44_rmultl44T_s
00963 #define GAN_MAT_RMULTLT_I                  gan_mat44_rmultl44T_i
00964 #define GAN_MAT_RMULTLIT_Q                 gan_mat44_rmultl44IT_q
00965 #define GAN_MAT_RMULTLIT_S                 gan_mat44_rmultl44IT_s
00966 #define GAN_MAT_RMULTLIT_I                 gan_mat44_rmultl44IT_i
00967 #define GAN_MAT_SUMSQR_Q                   gan_mat44_sumsqr_q
00968 #define GAN_MAT_SUMSQR_S                   gan_mat44_sumsqr_s
00969 #define GAN_MAT_FNORM_Q                    gan_mat44_Fnorm_q
00970 #define GAN_MAT_FNORM_S                    gan_mat44_Fnorm_s
00971 #define GAN_MAT_FROM_MAT_Q                 gan_mat44_from_mat_q
00972 #define GAN_MAT_FROM_MAT_S                 gan_mat44_from_mat_s
00973 #define GAN_MAT_FROM_SQUMAT_Q              gan_mat44_from_squmat_q
00974 #define GAN_MAT_FROM_SQUMAT_S              gan_mat44_from_squmat_s
00975 #define GAN_SQUMAT_FROM_SQUMAT_Q           gan_squmat44_from_squmat_q
00976 #define GAN_SQUMAT_FROM_SQUMAT_S           gan_squmat44_from_squmat_s
00977 
00978 #define GAN_SQUMAT_IDENT_Q    gan_mat44_ident_q
00979 #define GAN_SQUMAT_IDENT_S    gan_mat44_ident_s
00980 #define GAN_SQUMAT_TPOSE_Q    gan_mat44_tpose_q
00981 #define GAN_SQUMAT_TPOSE_S    gan_mat44_tpose_s
00982 #define GAN_SQUMAT_TPOSE_I    gan_mat44_tpose_i
00983 #define GAN_MAT_SADDT_Q       gan_mat44_saddT_q
00984 #define GAN_MAT_SADDT_S       gan_mat44_saddT_s
00985 #define GAN_SQUMAT_INVERT     gan_mat44_invert
00986 #define GAN_SQUMAT_INVERT_Q   gan_mat44_invert_q
00987 #define GAN_SQUMAT_INVERT_S   gan_mat44_invert_s
00988 #define GAN_SQUMAT_INVERT_I   gan_mat44_invert_i
00989 #define GAN_SQUMAT_ADJOINT_Q  gan_mat44_adjoint_q
00990 #define GAN_SQUMAT_ADJOINT_S  gan_mat44_adjoint_s
00991 #define GAN_SQUMAT_ADJOINTT_Q gan_mat44_adjointT_q
00992 #define GAN_SQUMAT_ADJOINTT_S gan_mat44_adjointT_s
00993 #define GAN_SQUMAT_DET_Q      gan_mat44_det_q
00994 #define GAN_SQUMAT_DET_S      gan_mat44_det_s
00995 #define GAN_SQUMAT_TRACE_Q    gan_mat44_trace_q
00996 #define GAN_SQUMAT_TRACE_S    gan_mat44_trace_s
00997 
00998 #ifndef _GAN_4X4MAT_H
00999 #define _GAN_4X4MAT_H
01000 
01001 
01002 #endif /* #ifndef _GAN_4X4MAT_H */
01003 
01016 /* This library is free software; you can redistribute it and/or
01017    modify it under the terms of the GNU Lesser General Public
01018    License as published by the Free Software Foundation; either
01019    version 2.1 of the License, or (at your option) any later version.
01020 
01021    This library is distributed in the hope that it will be useful,
01022    but WITHOUT ANY WARRANTY; without even the implied warranty of
01023    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01024    Lesser General Public License for more details.
01025 
01026    You should have received a copy of the GNU Lesser General Public
01027    License along with this library; if not, write to the Free Software
01028    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01029 */
01030 
01031 /* function declarations for functions common to all small square matrix
01032  * types */
01033 
01034 
01035 
01036 /* documentation for macros defined in individual header files */
01037 
01050  Gan_Matrix44 *gan_mat44_ident_q ( Gan_Matrix44 *A );
01051 
01069  Gan_Matrix44 *gan_mat44_tpose_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01070 
01088  Gan_SquMatrix44 *gan_mat44_saddT_q ( const Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01089 
01120  Gan_Matrix44 *gan_mat44_invert_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01121 
01130  Gan_Matrix44 *gan_mat44_invert_i ( Gan_Matrix44 *A );
01131 
01146  double gan_mat44_det_q ( const Gan_Matrix44 *A );
01147 
01153  double gan_mat44_trace_q ( const Gan_Matrix44 *A );
01154 
01160 #undef GAN_SQUMAT_IDENT_Q
01161 #undef GAN_SQUMAT_IDENT_S
01162 #undef GAN_SQUMAT_TPOSE_Q
01163 #undef GAN_SQUMAT_TPOSE_S
01164 #undef GAN_SQUMAT_TPOSE_I
01165 #undef GAN_MAT_SADDT_Q
01166 #undef GAN_MAT_SADDT_S
01167 #undef GAN_SQUMATI_MULTV_Q
01168 #undef GAN_SQUMATI_MULTV_S
01169 #undef GAN_SQUMATI_MULTV_I
01170 #undef GAN_SQUMATIT_MULTV_Q
01171 #undef GAN_SQUMATIT_MULTV_S
01172 #undef GAN_SQUMATIT_MULTV_I
01173 #undef GAN_SQUMAT_INVERT
01174 #undef GAN_SQUMAT_INVERT_Q
01175 #undef GAN_SQUMAT_INVERT_S
01176 #undef GAN_SQUMAT_INVERT_I
01177 #undef GAN_SQUMAT_ADJOINT_Q
01178 #undef GAN_SQUMAT_ADJOINT_S
01179 #undef GAN_SQUMAT_ADJOINTT_Q
01180 #undef GAN_SQUMAT_ADJOINTT_S
01181 #undef GAN_SQUMAT_DET_Q
01182 #undef GAN_SQUMAT_DET_S
01183 #undef GAN_SQUMAT_TRACE_Q
01184 #undef GAN_SQUMAT_TRACE_S
01185 
01198 /* This library is free software; you can redistribute it and/or
01199    modify it under the terms of the GNU Lesser General Public
01200    License as published by the Free Software Foundation; either
01201    version 2.1 of the License, or (at your option) any later version.
01202 
01203    This library is distributed in the hope that it will be useful,
01204    but WITHOUT ANY WARRANTY; without even the implied warranty of
01205    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01206    Lesser General Public License for more details.
01207 
01208    You should have received a copy of the GNU Lesser General Public
01209    License along with this library; if not, write to the Free Software
01210    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01211 */
01212 
01213 /* function declarations for functions common to all small vector types */
01214 
01215 
01216 
01217 /* documentation for macros defined in individual header files */
01218 
01229  Gan_Matrix44 *gan_mat44_zero_q ( const Gan_Matrix44 *A );
01230 
01247  Gan_Matrix44 *gan_mat44_copy_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01248 
01266  Gan_Matrix44 *gan_mat44_scale_q ( Gan_Matrix44 *A, double a,
01267                                Gan_Matrix44 *B );
01268 
01276  Gan_Matrix44 *gan_mat44_scale_i ( Gan_Matrix44 *A, double a );
01277 
01286  Gan_Matrix44 *gan_mat44_divide_q ( Gan_Matrix44 *A, double a,
01287                                 Gan_Matrix44 *B );
01288 
01296  Gan_Matrix44 *gan_mat44_divide_i ( Gan_Matrix44 *A, double a );
01297 
01305  Gan_Matrix44 *gan_mat44_negate_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01306 
01314  Gan_Matrix44 *gan_mat44_negate_i ( Gan_Matrix44 *A );
01315 
01323  Gan_Matrix44 *gan_mat44_unit_i ( Gan_Matrix44 *A );
01324 
01342  Gan_Matrix44 *gan_mat44_add_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01343 
01352  Gan_Matrix44 *gan_mat44_add_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01353 
01362  Gan_Matrix44 *gan_mat44_add_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01363 
01372  Gan_Matrix44 *gan_mat44_increment ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01373 
01391  Gan_Matrix44 *gan_mat44_sub_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01392 
01401  Gan_Matrix44 *gan_mat44_sub_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01402 
01411  Gan_Matrix44 *gan_mat44_sub_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01412 
01421  Gan_Matrix44 *gan_mat44_decrement ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01422 
01440  Gan_Matrix44 *gan_vec44_outer_q ( const Gan_Vector4 *p, const Gan_Vector4 *q,
01441                                Gan_Matrix44 *A );
01442 
01451  Gan_Vector4 *gan_mat44_multv4_q ( const Gan_Matrix44 *A, Gan_Vector4 *p,
01452                                 Gan_Vector4 *q );
01453 
01454 
01463  Gan_Vector4 *gan_mat44T_multv4_q ( const Gan_Matrix44 *A, Gan_Vector4 *p,
01464                                  Gan_Vector4 *q );
01465 
01466 
01486  Gan_Matrix44 *gan_mat44_lmultm44T_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01487                                  Gan_Matrix44 *C );
01488 
01498  Gan_Matrix44 *gan_mat44_rmultm44_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01499                                 Gan_Matrix44 *C );
01500 
01510  Gan_Matrix44 *gan_mat44_rmultm44T_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01511                                  Gan_Matrix44 *C );
01512 
01524  Gan_SquMatrix44 *gan_mat44_lmultm44T_sym_q ( const Gan_Matrix44 *A, const Gan_Matrix44 *B,
01525                                          Gan_SquMatrix44 *C );
01526 
01538  Gan_SquMatrix44 *gan_mat44_rmultm44T_sym_q ( const Gan_Matrix44 *A, const Gan_Matrix44 *B,
01539                                          Gan_SquMatrix44 *C );
01540 
01549  Gan_Matrix44 *gan_mat44_lmults44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01550                                 Gan_Matrix44 *C );
01551 
01560  Gan_Matrix44 *gan_mat44_rmults44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01561                                 Gan_Matrix44 *C );
01562 
01582  Gan_SquMatrix44 *gan_symmat44_lrmultm44T_q ( const Gan_SquMatrix44 *A, const Gan_Matrix44 *B,
01583                                         const Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01584 
01595  Gan_SquMatrix44 *gan_symmat44_lrmultm44_q ( const Gan_SquMatrix44 *A, const Gan_Matrix44 *B,
01596                                         const Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01597 
01616  Gan_Matrix44 *gan_mat44_lmultl44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01617                                 Gan_Matrix44 *C );
01618 
01628  Gan_Matrix44 *gan_mat44_lmultl44I_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01629                                  Gan_Matrix44 *C );
01630 
01640  Gan_Matrix44 *gan_mat44_lmultl44T_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01641                                  Gan_Matrix44 *C );
01642 
01652  Gan_Matrix44 *gan_mat44_lmultl44IT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01653                                   Gan_Matrix44 *C );
01654 
01664  Gan_Matrix44 *gan_mat44_rmultl44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01665                                 Gan_Matrix44 *C );
01666 
01676  Gan_Matrix44 *gan_mat44_rmultl44I_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01677                                  Gan_Matrix44 *C );
01678 
01688  Gan_Matrix44 *gan_mat44_rmultl44T_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01689                                  Gan_Matrix44 *C );
01690 
01700  Gan_Matrix44 *gan_mat44_rmultl44IT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01701                                   Gan_Matrix44 *C );
01702 
01712  Gan_Matrix44 *gan_mat44_lmultl44_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01713 
01723  Gan_Matrix44 *gan_mat44_lmultl44I_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01724 
01734  Gan_Matrix44 *gan_mat44_lmultl44T_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01735 
01745  Gan_Matrix44 *gan_mat44_lmultl44IT_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01746 
01756  Gan_Matrix44 *gan_mat44_rmultl44_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01757 
01767  Gan_Matrix44 *gan_mat44_rmultl44I_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01768 
01778  Gan_Matrix44 *gan_mat44_rmultl44T_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01779 
01789  Gan_Matrix44 *gan_mat44_rmultl44IT_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01790 
01799  Gan_SquMatrix44 *gan_mat44_slmultT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01800 
01801 
01810  Gan_SquMatrix44 *gan_mat44_srmultT_q ( const Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01811 
01812 
01827  double gan_mat44_sumsqr_q ( const Gan_Matrix44 *A );
01828 
01835  double gan_mat44_Fnorm_q ( const Gan_Matrix44 *A );
01836 
01846  Gan_Matrix44 *gan_mat44_from_mat_q ( const Gan_Matrix *A, Gan_Matrix44 *B );
01847 
01848  Gan_Matrix44 *gan_mat44_from_squmat_q ( const Gan_SquMatrix *A, Gan_Matrix44 *B );
01849 
01850  Gan_SquMatrix44 *gan_squmat44_from_squmat_q ( const Gan_SquMatrix *A,
01851                                             Gan_SquMatrix44 *B );
01852 
01871 /* This library is free software; you can redistribute it and/or
01872    modify it under the terms of the GNU Lesser General Public
01873    License as published by the Free Software Foundation; either
01874    version 2.1 of the License, or (at your option) any later version.
01875 
01876    This library is distributed in the hope that it will be useful,
01877    but WITHOUT ANY WARRANTY; without even the implied warranty of
01878    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01879    Lesser General Public License for more details.
01880 
01881    You should have received a copy of the GNU Lesser General Public
01882    License along with this library; if not, write to the Free Software
01883    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01884 */
01885 
01886 #undef GAN_MATTYPE
01887 #undef GAN_MATRIX_TYPE
01888 #undef GAN_SQUMATRIX_TYPE
01889 #undef GAN_VECTOR_TYPE
01890 #undef GAN_MAT_ELEMENT_TYPE
01891 #undef GAN_REALTYPE
01892 #undef GAN_FWRITE_LENDIAN
01893 #undef GAN_FREAD_LENDIAN
01894 #undef GAN_VECTYPE1
01895 #undef GAN_VECTYPE2
01896 #undef GAN_MATTYPEL
01897 #undef GAN_MATTYPER
01898 #undef GAN_SQUMATTYPEL
01899 #undef GAN_SQUMATTYPER
01900 #undef GAN_FIXED_MATRIX_TYPE
01901 #undef GAN_MAT_FPRINT
01902 #undef GAN_MAT_PRINT
01903 #undef GAN_MAT_FSCANF
01904 #undef GAN_MAT_FWRITE
01905 #undef GAN_MAT_FREAD
01906 #undef GAN_MAT_ZERO_Q
01907 #undef GAN_MAT_ZERO_S
01908 #undef GAN_MAT_COPY_Q
01909 #undef GAN_MAT_COPY_S
01910 #undef GAN_MAT_SCALE_Q
01911 #undef GAN_MAT_SCALE_S
01912 #undef GAN_MAT_SCALE_I
01913 #undef GAN_MAT_DIVIDE_Q
01914 #undef GAN_MAT_DIVIDE_S
01915 #undef GAN_MAT_DIVIDE_I
01916 #undef GAN_MAT_NEGATE_Q
01917 #undef GAN_MAT_NEGATE_S
01918 #undef GAN_MAT_NEGATE_I
01919 #undef GAN_MAT_UNIT_Q
01920 #undef GAN_MAT_UNIT_S
01921 #undef GAN_MAT_UNIT_I
01922 #undef GAN_MAT_ADD_Q
01923 #undef GAN_MAT_ADD_I1
01924 #undef GAN_MAT_ADD_I2
01925 #undef GAN_MAT_INCREMENT
01926 #undef GAN_MAT_ADD_S
01927 #undef GAN_MAT_SUB_Q
01928 #undef GAN_MAT_SUB_I1
01929 #undef GAN_MAT_SUB_I2
01930 #undef GAN_MAT_DECREMENT
01931 #undef GAN_MAT_SUB_S
01932 #undef GAN_VEC_OUTER_Q
01933 #undef GAN_VEC_OUTER_S
01934 #undef GAN_MAT_MULTV_Q
01935 #undef GAN_MAT_MULTV_S
01936 #undef GAN_MAT_MULTV_I
01937 #undef GAN_MATT_MULTV_Q
01938 #undef GAN_MATT_MULTV_S
01939 #undef GAN_MATT_MULTV_I
01940 #undef GAN_MAT_LMULTM_Q
01941 #undef GAN_MAT_LMULTM_S
01942 #undef GAN_MAT_LMULTMT_Q
01943 #undef GAN_MAT_LMULTMT_S
01944 #undef GAN_MAT_RMULTM_Q
01945 #undef GAN_MAT_RMULTM_S
01946 #undef GAN_MAT_RMULTMT_Q
01947 #undef GAN_MAT_RMULTMT_S
01948 #undef GAN_MAT_LMULTMT_SYM_Q
01949 #undef GAN_MAT_LMULTMT_SYM_S
01950 #undef GAN_MAT_RMULTMT_SYM_Q
01951 #undef GAN_MAT_RMULTMT_SYM_S
01952 #undef GAN_MAT_LMULTS_Q
01953 #undef GAN_MAT_LMULTS_S
01954 #undef GAN_MAT_RMULTS_Q
01955 #undef GAN_MAT_RMULTS_S
01956 #undef GAN_SYMMATL_LRMULT_Q
01957 #undef GAN_SYMMATL_LRMULT_S
01958 #undef GAN_SYMMATR_LRMULT_Q
01959 #undef GAN_SYMMATR_LRMULT_S
01960 #undef GAN_MAT_LMULTL_Q
01961 #undef GAN_MAT_LMULTL_S
01962 #undef GAN_MAT_LMULTL_I
01963 #undef GAN_MAT_LMULTLI_Q
01964 #undef GAN_MAT_LMULTLI_S
01965 #undef GAN_MAT_LMULTLI_I
01966 #undef GAN_MAT_LMULTLT_Q
01967 #undef GAN_MAT_LMULTLT_S
01968 #undef GAN_MAT_LMULTLT_I
01969 #undef GAN_MAT_LMULTLIT_Q
01970 #undef GAN_MAT_LMULTLIT_S
01971 #undef GAN_MAT_LMULTLIT_I
01972 #undef GAN_MAT_RMULTL_Q
01973 #undef GAN_MAT_RMULTL_S
01974 #undef GAN_MAT_RMULTL_I
01975 #undef GAN_MAT_RMULTLI_Q
01976 #undef GAN_MAT_RMULTLI_S
01977 #undef GAN_MAT_RMULTLI_I
01978 #undef GAN_MAT_RMULTLT_Q
01979 #undef GAN_MAT_RMULTLT_S
01980 #undef GAN_MAT_RMULTLT_I
01981 #undef GAN_MAT_RMULTLIT_Q
01982 #undef GAN_MAT_RMULTLIT_S
01983 #undef GAN_MAT_RMULTLIT_I
01984 #undef GAN_MAT_SRMULTT_Q
01985 #undef GAN_MAT_SRMULTT_S
01986 #undef GAN_MAT_SRMULTT_I
01987 #undef GAN_MAT_SLMULTT_Q
01988 #undef GAN_MAT_SLMULTT_S
01989 #undef GAN_MAT_SLMULTT_I
01990 #undef GAN_MAT_RMULTLIT_S
01991 #undef GAN_MAT_SUMSQR_Q
01992 #undef GAN_MAT_SUMSQR_S
01993 #undef GAN_MAT_FNORM_Q
01994 #undef GAN_MAT_FNORM_S
01995 #undef GAN_MAT_FROM_MAT_Q
01996 #undef GAN_MAT_FROM_MAT_S
01997 #undef GAN_MAT_FROM_SQUMAT_Q
01998 #undef GAN_MAT_FROM_SQUMAT_S
01999 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02000 #undef GAN_SQUMAT_FROM_SQUMAT_S
02001 
02002 /* declare functions specific to symmetric 4x4 matrices */
02016 /* This library is free software; you can redistribute it and/or
02017    modify it under the terms of the GNU Lesser General Public
02018    License as published by the Free Software Foundation; either
02019    version 2.1 of the License, or (at your option) any later version.
02020 
02021    This library is distributed in the hope that it will be useful,
02022    but WITHOUT ANY WARRANTY; without even the implied warranty of
02023    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02024    Lesser General Public License for more details.
02025 
02026    You should have received a copy of the GNU Lesser General Public
02027    License along with this library; if not, write to the Free Software
02028    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02029 */
02030 
02031 #ifndef _GAN_4X4SYMMAT_H
02032 
02047  Gan_SquMatrix44 *
02048     gan_symmat44_fill_q ( Gan_SquMatrix44 *A,
02049                           double XX,
02050                           double YX, double YY,
02051                           double ZX, double ZY, double ZZ,
02052                           double WX, double WY, double WZ, double WW );
02053 
02075  void gan_symmat44_get_parts_q ( const Gan_SquMatrix44 *A,
02076                                 Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s);
02077 
02091  void gan_symmat44_get_blocks_q ( const Gan_SquMatrix44 *A,
02092                                  Gan_SquMatrix22 *B, Gan_Matrix22 *C,
02093                                  Gan_SquMatrix22 *D );
02094 
02117  Gan_SquMatrix44 *gan_symmat44_set_parts_q ( Gan_SquMatrix44 *A,
02118                                             const Gan_SquMatrix33 *B,
02119                                             const Gan_Vector3 *p, double s );
02120 
02134  Gan_SquMatrix44 *gan_symmat44_set_blocks_q ( Gan_SquMatrix44 *A,
02135                                              const Gan_SquMatrix22 *B,
02136                                              const Gan_Matrix22 *C,
02137                                              const Gan_SquMatrix22 *D );
02138 
02144 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02145 
02146 #define GAN_MATTYPE Gan_SquMatrix44
02147 #define GAN_MATRIX_TYPE Gan_SquMatrix
02148 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
02149 #define GAN_VECTOR_TYPE Gan_Vector
02150 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
02151 #define GAN_REALTYPE double
02152 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
02153 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
02154 #define GAN_VECTYPE1 Gan_Vector4
02155 #define GAN_VECTYPE2 Gan_Vector4
02156 #define GAN_FIXED_MATRIX_TYPE GAN_SYMMETRIC_MATRIX44
02157 #define GAN_MAT_FPRINT      gan_symmat44_fprint
02158 #define GAN_MAT_PRINT       gan_symmat44_print
02159 #define GAN_MAT_FSCANF      gan_symmat44_fscanf
02160 #define GAN_MAT_FWRITE      gan_symmat44_fwrite
02161 #define GAN_MAT_FREAD       gan_symmat44_fread
02162 #define GAN_MAT_ZERO_Q      gan_symmat44_zero_q
02163 #define GAN_MAT_ZERO_S      gan_symmat44_zero_s
02164 #define GAN_MAT_COPY_Q      gan_symmat44_copy_q
02165 #define GAN_MAT_COPY_S      gan_symmat44_copy_s
02166 #define GAN_MAT_SCALE_Q     gan_symmat44_scale_q
02167 #define GAN_MAT_SCALE_S     gan_symmat44_scale_s
02168 #define GAN_MAT_SCALE_I     gan_symmat44_scale_i
02169 #define GAN_MAT_DIVIDE_Q    gan_symmat44_divide_q
02170 #define GAN_MAT_DIVIDE_S    gan_symmat44_divide_s
02171 #define GAN_MAT_DIVIDE_I    gan_symmat44_divide_i
02172 #define GAN_MAT_NEGATE_Q    gan_symmat44_negate_q
02173 #define GAN_MAT_NEGATE_S    gan_symmat44_negate_s
02174 #define GAN_MAT_NEGATE_I    gan_symmat44_negate_i
02175 #define GAN_MAT_UNIT_Q      gan_symmat44_unit_q
02176 #define GAN_MAT_UNIT_S      gan_symmat44_unit_s
02177 #define GAN_MAT_UNIT_I      gan_symmat44_unit_i
02178 #define GAN_MAT_ADD_Q       gan_symmat44_add_q
02179 #define GAN_MAT_ADD_I1      gan_symmat44_add_i1
02180 #define GAN_MAT_ADD_I2      gan_symmat44_add_i2
02181 #define GAN_MAT_INCREMENT   gan_symmat44_increment
02182 #define GAN_MAT_ADD_S       gan_symmat44_add_s
02183 #define GAN_MAT_SUB_Q       gan_symmat44_sub_q
02184 #define GAN_MAT_SUB_I1      gan_symmat44_sub_i1
02185 #define GAN_MAT_SUB_I2      gan_symmat44_sub_i2
02186 #define GAN_MAT_DECREMENT   gan_symmat44_decrement
02187 #define GAN_MAT_SUB_S       gan_symmat44_sub_s
02188 #define GAN_MAT_MULTV_Q     gan_symmat44_multv4_q
02189 #define GAN_MAT_MULTV_S     gan_symmat44_multv4_s
02190 #define GAN_MAT_SUMSQR_Q    gan_symmat44_sumsqr_q
02191 #define GAN_MAT_SUMSQR_S    gan_symmat44_sumsqr_s
02192 #define GAN_MAT_FNORM_Q     gan_symmat44_Fnorm_q
02193 #define GAN_MAT_FNORM_S     gan_symmat44_Fnorm_s
02194 
02195 #define GAN_SQUMAT_IDENT_Q    gan_symmat44_ident_q
02196 #define GAN_SQUMAT_IDENT_S    gan_symmat44_ident_s
02197 #define GAN_SQUMAT_INVERT     gan_symmat44_invert
02198 #define GAN_SQUMAT_INVERT_Q   gan_symmat44_invert_q
02199 #define GAN_SQUMAT_INVERT_S   gan_symmat44_invert_s
02200 #define GAN_SQUMAT_INVERT_I   gan_symmat44_invert_i
02201 #define GAN_SQUMAT_DET_Q      gan_symmat44_det_q
02202 #define GAN_SQUMAT_DET_S      gan_symmat44_det_s
02203 #define GAN_SQUMAT_TRACE_Q    gan_symmat44_trace_q
02204 #define GAN_SQUMAT_TRACE_S    gan_symmat44_trace_s
02205 
02206 #define GAN_VEC_OUTER_SYM_Q gan_vec44_outer_sym_q
02207 #define GAN_VEC_OUTER_SYM_S gan_vec44_outer_sym_s
02208 #define GAN_SYMMAT_CHOLESKY   gan_symmat44_cholesky
02209 #define GAN_SYMMAT_CHOLESKY_Q gan_symmat44_cholesky_q
02210 #define GAN_SYMMAT_CHOLESKY_S gan_symmat44_cholesky_s
02211 #define GAN_SYMMAT_CHOLESKY_I gan_symmat44_cholesky_i
02212 
02213 #ifndef _GAN_4X4SYMMAT_H
02214 #define _GAN_4X4SYMMAT_H
02215 
02216 
02217 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02218 
02231 /* This library is free software; you can redistribute it and/or
02232    modify it under the terms of the GNU Lesser General Public
02233    License as published by the Free Software Foundation; either
02234    version 2.1 of the License, or (at your option) any later version.
02235 
02236    This library is distributed in the hope that it will be useful,
02237    but WITHOUT ANY WARRANTY; without even the implied warranty of
02238    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02239    Lesser General Public License for more details.
02240 
02241    You should have received a copy of the GNU Lesser General Public
02242    License along with this library; if not, write to the Free Software
02243    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02244 */
02245 
02246 /* function declarations for functions common to all small symmetric matrix
02247  * types */
02248 
02249 
02250 
02251 /* documentation for macros defined in individual header files */
02252 
02263  Gan_SquMatrix44 *gan_vec44_outer_sym_q ( const Gan_Vector4 *p, Gan_SquMatrix44 *A );
02264 
02286  Gan_SquMatrix44 *gan_symmat44_cholesky_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02287 
02296  Gan_SquMatrix44 *gan_symmat44_cholesky_i ( Gan_SquMatrix44 *A );
02297 
02303 #undef GAN_VEC_OUTER_SYM_Q
02304 #undef GAN_VEC_OUTER_SYM_S
02305 #undef GAN_SYMMAT_CHOLESKY
02306 #undef GAN_SYMMAT_CHOLESKY_Q
02307 #undef GAN_SYMMAT_CHOLESKY_S
02308 #undef GAN_SYMMAT_CHOLESKY_I
02309 
02322 /* This library is free software; you can redistribute it and/or
02323    modify it under the terms of the GNU Lesser General Public
02324    License as published by the Free Software Foundation; either
02325    version 2.1 of the License, or (at your option) any later version.
02326 
02327    This library is distributed in the hope that it will be useful,
02328    but WITHOUT ANY WARRANTY; without even the implied warranty of
02329    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02330    Lesser General Public License for more details.
02331 
02332    You should have received a copy of the GNU Lesser General Public
02333    License along with this library; if not, write to the Free Software
02334    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02335 */
02336 
02337 /* function declarations for functions common to all small square matrix
02338  * types */
02339 
02340 
02341 
02342 /* documentation for macros defined in individual header files */
02343 
02356  Gan_SquMatrix44 *gan_symmat44_ident_q ( Gan_SquMatrix44 *A );
02357 
02408  Gan_SquMatrix44 *gan_symmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02409 
02418  Gan_SquMatrix44 *gan_symmat44_invert_i ( Gan_SquMatrix44 *A );
02419 
02434  double gan_symmat44_det_q ( const Gan_SquMatrix44 *A );
02435 
02441  double gan_symmat44_trace_q ( const Gan_SquMatrix44 *A );
02442 
02448 #undef GAN_SQUMAT_IDENT_Q
02449 #undef GAN_SQUMAT_IDENT_S
02450 #undef GAN_SQUMAT_TPOSE_Q
02451 #undef GAN_SQUMAT_TPOSE_S
02452 #undef GAN_SQUMAT_TPOSE_I
02453 #undef GAN_MAT_SADDT_Q
02454 #undef GAN_MAT_SADDT_S
02455 #undef GAN_SQUMATI_MULTV_Q
02456 #undef GAN_SQUMATI_MULTV_S
02457 #undef GAN_SQUMATI_MULTV_I
02458 #undef GAN_SQUMATIT_MULTV_Q
02459 #undef GAN_SQUMATIT_MULTV_S
02460 #undef GAN_SQUMATIT_MULTV_I
02461 #undef GAN_SQUMAT_INVERT
02462 #undef GAN_SQUMAT_INVERT_Q
02463 #undef GAN_SQUMAT_INVERT_S
02464 #undef GAN_SQUMAT_INVERT_I
02465 #undef GAN_SQUMAT_ADJOINT_Q
02466 #undef GAN_SQUMAT_ADJOINT_S
02467 #undef GAN_SQUMAT_ADJOINTT_Q
02468 #undef GAN_SQUMAT_ADJOINTT_S
02469 #undef GAN_SQUMAT_DET_Q
02470 #undef GAN_SQUMAT_DET_S
02471 #undef GAN_SQUMAT_TRACE_Q
02472 #undef GAN_SQUMAT_TRACE_S
02473 
02486 /* This library is free software; you can redistribute it and/or
02487    modify it under the terms of the GNU Lesser General Public
02488    License as published by the Free Software Foundation; either
02489    version 2.1 of the License, or (at your option) any later version.
02490 
02491    This library is distributed in the hope that it will be useful,
02492    but WITHOUT ANY WARRANTY; without even the implied warranty of
02493    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02494    Lesser General Public License for more details.
02495 
02496    You should have received a copy of the GNU Lesser General Public
02497    License along with this library; if not, write to the Free Software
02498    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02499 */
02500 
02501 /* function declarations for functions common to all small vector types */
02502 
02503 
02504 
02505 /* documentation for macros defined in individual header files */
02506 
02517  Gan_SquMatrix44 *gan_symmat44_zero_q ( const Gan_SquMatrix44 *A );
02518 
02535  Gan_SquMatrix44 *gan_symmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02536 
02554  Gan_SquMatrix44 *gan_symmat44_scale_q ( Gan_SquMatrix44 *A, double a,
02555                                Gan_SquMatrix44 *B );
02556 
02564  Gan_SquMatrix44 *gan_symmat44_scale_i ( Gan_SquMatrix44 *A, double a );
02565 
02574  Gan_SquMatrix44 *gan_symmat44_divide_q ( Gan_SquMatrix44 *A, double a,
02575                                 Gan_SquMatrix44 *B );
02576 
02584  Gan_SquMatrix44 *gan_symmat44_divide_i ( Gan_SquMatrix44 *A, double a );
02585 
02593  Gan_SquMatrix44 *gan_symmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02594 
02602  Gan_SquMatrix44 *gan_symmat44_negate_i ( Gan_SquMatrix44 *A );
02603 
02611  Gan_SquMatrix44 *gan_symmat44_unit_i ( Gan_SquMatrix44 *A );
02612 
02630  Gan_SquMatrix44 *gan_symmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02631 
02640  Gan_SquMatrix44 *gan_symmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02641 
02650  Gan_SquMatrix44 *gan_symmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02651 
02660  Gan_SquMatrix44 *gan_symmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02661 
02679  Gan_SquMatrix44 *gan_symmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02680 
02689  Gan_SquMatrix44 *gan_symmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02690 
02699  Gan_SquMatrix44 *gan_symmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02700 
02709  Gan_SquMatrix44 *gan_symmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02710 
02729  Gan_Vector4 *gan_symmat44_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
02730                                 Gan_Vector4 *q );
02731 
02732 
02733 
02734 
02806  double gan_symmat44_sumsqr_q ( const Gan_SquMatrix44 *A );
02807 
02814  double gan_symmat44_Fnorm_q ( const Gan_SquMatrix44 *A );
02815 
02846 /* This library is free software; you can redistribute it and/or
02847    modify it under the terms of the GNU Lesser General Public
02848    License as published by the Free Software Foundation; either
02849    version 2.1 of the License, or (at your option) any later version.
02850 
02851    This library is distributed in the hope that it will be useful,
02852    but WITHOUT ANY WARRANTY; without even the implied warranty of
02853    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02854    Lesser General Public License for more details.
02855 
02856    You should have received a copy of the GNU Lesser General Public
02857    License along with this library; if not, write to the Free Software
02858    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02859 */
02860 
02861 #undef GAN_MATTYPE
02862 #undef GAN_MATRIX_TYPE
02863 #undef GAN_SQUMATRIX_TYPE
02864 #undef GAN_VECTOR_TYPE
02865 #undef GAN_MAT_ELEMENT_TYPE
02866 #undef GAN_REALTYPE
02867 #undef GAN_FWRITE_LENDIAN
02868 #undef GAN_FREAD_LENDIAN
02869 #undef GAN_VECTYPE1
02870 #undef GAN_VECTYPE2
02871 #undef GAN_MATTYPEL
02872 #undef GAN_MATTYPER
02873 #undef GAN_SQUMATTYPEL
02874 #undef GAN_SQUMATTYPER
02875 #undef GAN_FIXED_MATRIX_TYPE
02876 #undef GAN_MAT_FPRINT
02877 #undef GAN_MAT_PRINT
02878 #undef GAN_MAT_FSCANF
02879 #undef GAN_MAT_FWRITE
02880 #undef GAN_MAT_FREAD
02881 #undef GAN_MAT_ZERO_Q
02882 #undef GAN_MAT_ZERO_S
02883 #undef GAN_MAT_COPY_Q
02884 #undef GAN_MAT_COPY_S
02885 #undef GAN_MAT_SCALE_Q
02886 #undef GAN_MAT_SCALE_S
02887 #undef GAN_MAT_SCALE_I
02888 #undef GAN_MAT_DIVIDE_Q
02889 #undef GAN_MAT_DIVIDE_S
02890 #undef GAN_MAT_DIVIDE_I
02891 #undef GAN_MAT_NEGATE_Q
02892 #undef GAN_MAT_NEGATE_S
02893 #undef GAN_MAT_NEGATE_I
02894 #undef GAN_MAT_UNIT_Q
02895 #undef GAN_MAT_UNIT_S
02896 #undef GAN_MAT_UNIT_I
02897 #undef GAN_MAT_ADD_Q
02898 #undef GAN_MAT_ADD_I1
02899 #undef GAN_MAT_ADD_I2
02900 #undef GAN_MAT_INCREMENT
02901 #undef GAN_MAT_ADD_S
02902 #undef GAN_MAT_SUB_Q
02903 #undef GAN_MAT_SUB_I1
02904 #undef GAN_MAT_SUB_I2
02905 #undef GAN_MAT_DECREMENT
02906 #undef GAN_MAT_SUB_S
02907 #undef GAN_VEC_OUTER_Q
02908 #undef GAN_VEC_OUTER_S
02909 #undef GAN_MAT_MULTV_Q
02910 #undef GAN_MAT_MULTV_S
02911 #undef GAN_MAT_MULTV_I
02912 #undef GAN_MATT_MULTV_Q
02913 #undef GAN_MATT_MULTV_S
02914 #undef GAN_MATT_MULTV_I
02915 #undef GAN_MAT_LMULTM_Q
02916 #undef GAN_MAT_LMULTM_S
02917 #undef GAN_MAT_LMULTMT_Q
02918 #undef GAN_MAT_LMULTMT_S
02919 #undef GAN_MAT_RMULTM_Q
02920 #undef GAN_MAT_RMULTM_S
02921 #undef GAN_MAT_RMULTMT_Q
02922 #undef GAN_MAT_RMULTMT_S
02923 #undef GAN_MAT_LMULTMT_SYM_Q
02924 #undef GAN_MAT_LMULTMT_SYM_S
02925 #undef GAN_MAT_RMULTMT_SYM_Q
02926 #undef GAN_MAT_RMULTMT_SYM_S
02927 #undef GAN_MAT_LMULTS_Q
02928 #undef GAN_MAT_LMULTS_S
02929 #undef GAN_MAT_RMULTS_Q
02930 #undef GAN_MAT_RMULTS_S
02931 #undef GAN_SYMMATL_LRMULT_Q
02932 #undef GAN_SYMMATL_LRMULT_S
02933 #undef GAN_SYMMATR_LRMULT_Q
02934 #undef GAN_SYMMATR_LRMULT_S
02935 #undef GAN_MAT_LMULTL_Q
02936 #undef GAN_MAT_LMULTL_S
02937 #undef GAN_MAT_LMULTL_I
02938 #undef GAN_MAT_LMULTLI_Q
02939 #undef GAN_MAT_LMULTLI_S
02940 #undef GAN_MAT_LMULTLI_I
02941 #undef GAN_MAT_LMULTLT_Q
02942 #undef GAN_MAT_LMULTLT_S
02943 #undef GAN_MAT_LMULTLT_I
02944 #undef GAN_MAT_LMULTLIT_Q
02945 #undef GAN_MAT_LMULTLIT_S
02946 #undef GAN_MAT_LMULTLIT_I
02947 #undef GAN_MAT_RMULTL_Q
02948 #undef GAN_MAT_RMULTL_S
02949 #undef GAN_MAT_RMULTL_I
02950 #undef GAN_MAT_RMULTLI_Q
02951 #undef GAN_MAT_RMULTLI_S
02952 #undef GAN_MAT_RMULTLI_I
02953 #undef GAN_MAT_RMULTLT_Q
02954 #undef GAN_MAT_RMULTLT_S
02955 #undef GAN_MAT_RMULTLT_I
02956 #undef GAN_MAT_RMULTLIT_Q
02957 #undef GAN_MAT_RMULTLIT_S
02958 #undef GAN_MAT_RMULTLIT_I
02959 #undef GAN_MAT_SRMULTT_Q
02960 #undef GAN_MAT_SRMULTT_S
02961 #undef GAN_MAT_SRMULTT_I
02962 #undef GAN_MAT_SLMULTT_Q
02963 #undef GAN_MAT_SLMULTT_S
02964 #undef GAN_MAT_SLMULTT_I
02965 #undef GAN_MAT_RMULTLIT_S
02966 #undef GAN_MAT_SUMSQR_Q
02967 #undef GAN_MAT_SUMSQR_S
02968 #undef GAN_MAT_FNORM_Q
02969 #undef GAN_MAT_FNORM_S
02970 #undef GAN_MAT_FROM_MAT_Q
02971 #undef GAN_MAT_FROM_MAT_S
02972 #undef GAN_MAT_FROM_SQUMAT_Q
02973 #undef GAN_MAT_FROM_SQUMAT_S
02974 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02975 #undef GAN_SQUMAT_FROM_SQUMAT_S
02976 
02977 /* declare functions specific to lower triangular 4x4 matrices */
02991 /* This library is free software; you can redistribute it and/or
02992    modify it under the terms of the GNU Lesser General Public
02993    License as published by the Free Software Foundation; either
02994    version 2.1 of the License, or (at your option) any later version.
02995 
02996    This library is distributed in the hope that it will be useful,
02997    but WITHOUT ANY WARRANTY; without even the implied warranty of
02998    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02999    Lesser General Public License for more details.
03000 
03001    You should have received a copy of the GNU Lesser General Public
03002    License along with this library; if not, write to the Free Software
03003    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03004 */
03005 
03006 #ifndef _GAN_4X4LTMAT_H
03007 
03024  Gan_SquMatrix44 *gan_ltmat44_fill_q (
03025                           Gan_SquMatrix44 *A,
03026                           double XX,
03027                           double YX, double YY,
03028                           double ZX, double ZY, double ZZ,
03029                           double WX, double WY, double WZ, double WW );
03030 
03050  void gan_ltmat44_get_parts_q ( const Gan_SquMatrix44 *A,
03051                                Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s );
03052 
03075  Gan_SquMatrix44 *gan_ltmat44_set_parts_q ( Gan_SquMatrix44 *A,
03076                                            const Gan_SquMatrix33 *B,
03077                                            const Gan_Vector3 *p, double s );
03078 
03084 #endif /* #ifndef _GAN_4X4LTMAT_H */
03085 
03086 #define GAN_MATTYPE Gan_SquMatrix44
03087 #define GAN_MATRIX_TYPE Gan_SquMatrix
03088 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03089 #define GAN_VECTOR_TYPE Gan_Vector
03090 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03091 #define GAN_REALTYPE double
03092 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
03093 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
03094 #define GAN_VECTYPE1 Gan_Vector4
03095 #define GAN_VECTYPE2 Gan_Vector4
03096 #define GAN_SQUMATTYPEL Gan_SquMatrix44
03097 #define GAN_SQUMATTYPER Gan_SquMatrix44
03098 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03099 #define GAN_MAT_FPRINT     gan_ltmat44_fprint
03100 #define GAN_MAT_PRINT      gan_ltmat44_print
03101 #define GAN_MAT_FSCANF     gan_ltmat44_fscanf
03102 #define GAN_MAT_FWRITE     gan_ltmat44_fwrite
03103 #define GAN_MAT_FREAD      gan_ltmat44_fread
03104 #define GAN_MAT_ZERO_Q     gan_ltmat44_zero_q
03105 #define GAN_MAT_ZERO_S     gan_ltmat44_zero_s
03106 #define GAN_MAT_COPY_Q     gan_ltmat44_copy_q
03107 #define GAN_MAT_COPY_S     gan_ltmat44_copy_s
03108 #define GAN_MAT_SCALE_Q    gan_ltmat44_scale_q
03109 #define GAN_MAT_SCALE_S    gan_ltmat44_scale_s
03110 #define GAN_MAT_SCALE_I    gan_ltmat44_scale_i
03111 #define GAN_MAT_DIVIDE_Q   gan_ltmat44_divide_q
03112 #define GAN_MAT_DIVIDE_S   gan_ltmat44_divide_s
03113 #define GAN_MAT_DIVIDE_I   gan_ltmat44_divide_i
03114 #define GAN_MAT_NEGATE_Q   gan_ltmat44_negate_q
03115 #define GAN_MAT_NEGATE_S   gan_ltmat44_negate_s
03116 #define GAN_MAT_NEGATE_I   gan_ltmat44_negate_i
03117 #define GAN_MAT_UNIT_Q     gan_ltmat44_unit_q
03118 #define GAN_MAT_UNIT_S     gan_ltmat44_unit_s
03119 #define GAN_MAT_UNIT_I     gan_ltmat44_unit_i
03120 #define GAN_MAT_ADD_Q      gan_ltmat44_add_q
03121 #define GAN_MAT_ADD_I1     gan_ltmat44_add_i1
03122 #define GAN_MAT_ADD_I2     gan_ltmat44_add_i2
03123 #define GAN_MAT_INCREMENT  gan_ltmat44_increment
03124 #define GAN_MAT_ADD_S      gan_ltmat44_add_s
03125 #define GAN_MAT_SUB_Q      gan_ltmat44_sub_q
03126 #define GAN_MAT_SUB_I1     gan_ltmat44_sub_i1
03127 #define GAN_MAT_SUB_I2     gan_ltmat44_sub_i2
03128 #define GAN_MAT_DECREMENT  gan_ltmat44_decrement
03129 #define GAN_MAT_SUB_S      gan_ltmat44_sub_s
03130 #define GAN_MAT_MULTV_Q    gan_ltmat44_multv4_q
03131 #define GAN_MAT_MULTV_S    gan_ltmat44_multv4_s
03132 #define GAN_MAT_MULTV_I    gan_ltmat44_multv4_i
03133 #define GAN_MATT_MULTV_Q   gan_ltmat44T_multv4_q
03134 #define GAN_MATT_MULTV_S   gan_ltmat44T_multv4_s
03135 #define GAN_MATT_MULTV_I   gan_ltmat44T_multv4_i
03136 #define GAN_MAT_SRMULTT_Q  gan_ltmat44_srmultT_q
03137 #define GAN_MAT_SRMULTT_S  gan_ltmat44_srmultT_s
03138 #define GAN_MAT_SRMULTT_I  gan_ltmat44_srmultT_i
03139 #define GAN_MAT_SLMULTT_Q  gan_ltmat44_slmultT_q
03140 #define GAN_MAT_SLMULTT_S  gan_ltmat44_slmultT_s
03141 #define GAN_MAT_SLMULTT_I  gan_ltmat44_slmultT_i
03142 #define GAN_MAT_SUMSQR_Q   gan_ltmat44_sumsqr_q
03143 #define GAN_MAT_SUMSQR_S   gan_ltmat44_sumsqr_s
03144 #define GAN_MAT_FNORM_Q    gan_ltmat44_Fnorm_q
03145 #define GAN_MAT_FNORM_S    gan_ltmat44_Fnorm_s
03146 
03147 #define GAN_SQUMAT_IDENT_Q    gan_ltmat44_ident_q
03148 #define GAN_SQUMAT_IDENT_S    gan_ltmat44_ident_s
03149 #define GAN_SQUMATI_MULTV_Q   gan_ltmat44I_multv4_q
03150 #define GAN_SQUMATI_MULTV_S   gan_ltmat44I_multv4_s
03151 #define GAN_SQUMATI_MULTV_I   gan_ltmat44I_multv4_i
03152 #define GAN_SQUMATIT_MULTV_Q  gan_ltmat44IT_multv4_q
03153 #define GAN_SQUMATIT_MULTV_S  gan_ltmat44IT_multv4_s
03154 #define GAN_SQUMATIT_MULTV_I  gan_ltmat44IT_multv4_i
03155 #define GAN_SQUMAT_INVERT     gan_ltmat44_invert
03156 #define GAN_SQUMAT_INVERT_Q   gan_ltmat44_invert_q
03157 #define GAN_SQUMAT_INVERT_S   gan_ltmat44_invert_s
03158 #define GAN_SQUMAT_INVERT_I   gan_ltmat44_invert_i
03159 #define GAN_SQUMAT_DET_Q      gan_ltmat44_det_q
03160 #define GAN_SQUMAT_DET_S      gan_ltmat44_det_s
03161 #define GAN_SQUMAT_TRACE_Q    gan_ltmat44_trace_q
03162 #define GAN_SQUMAT_TRACE_S    gan_ltmat44_trace_s
03163 
03164 #ifndef _GAN_4X4LTMAT_H
03165 #define _GAN_4X4LTMAT_H
03166 
03167 
03168 #endif /* #ifndef _GAN_4X4LTMAT_H */
03169 
03182 /* This library is free software; you can redistribute it and/or
03183    modify it under the terms of the GNU Lesser General Public
03184    License as published by the Free Software Foundation; either
03185    version 2.1 of the License, or (at your option) any later version.
03186 
03187    This library is distributed in the hope that it will be useful,
03188    but WITHOUT ANY WARRANTY; without even the implied warranty of
03189    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03190    Lesser General Public License for more details.
03191 
03192    You should have received a copy of the GNU Lesser General Public
03193    License along with this library; if not, write to the Free Software
03194    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03195 */
03196 
03197 /* function declarations for functions common to all small square matrix
03198  * types */
03199 
03200 
03201 
03202 /* documentation for macros defined in individual header files */
03203 
03216  Gan_SquMatrix44 *gan_ltmat44_ident_q ( Gan_SquMatrix44 *A );
03217 
03255  Gan_Vector4 *gan_ltmat44I_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03256                                     Gan_Vector4 *q );
03257 
03266  Gan_Vector4 *gan_ltmat44I_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03267 
03276  Gan_Vector4 *gan_ltmat44IT_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03277                                      Gan_Vector4 *q );
03278 
03287  Gan_Vector4 *gan_ltmat44IT_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03288 
03306  Gan_SquMatrix44 *gan_ltmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03307 
03316  Gan_SquMatrix44 *gan_ltmat44_invert_i ( Gan_SquMatrix44 *A );
03317 
03332  double gan_ltmat44_det_q ( const Gan_SquMatrix44 *A );
03333 
03339  double gan_ltmat44_trace_q ( const Gan_SquMatrix44 *A );
03340 
03346 #undef GAN_SQUMAT_IDENT_Q
03347 #undef GAN_SQUMAT_IDENT_S
03348 #undef GAN_SQUMAT_TPOSE_Q
03349 #undef GAN_SQUMAT_TPOSE_S
03350 #undef GAN_SQUMAT_TPOSE_I
03351 #undef GAN_MAT_SADDT_Q
03352 #undef GAN_MAT_SADDT_S
03353 #undef GAN_SQUMATI_MULTV_Q
03354 #undef GAN_SQUMATI_MULTV_S
03355 #undef GAN_SQUMATI_MULTV_I
03356 #undef GAN_SQUMATIT_MULTV_Q
03357 #undef GAN_SQUMATIT_MULTV_S
03358 #undef GAN_SQUMATIT_MULTV_I
03359 #undef GAN_SQUMAT_INVERT
03360 #undef GAN_SQUMAT_INVERT_Q
03361 #undef GAN_SQUMAT_INVERT_S
03362 #undef GAN_SQUMAT_INVERT_I
03363 #undef GAN_SQUMAT_ADJOINT_Q
03364 #undef GAN_SQUMAT_ADJOINT_S
03365 #undef GAN_SQUMAT_ADJOINTT_Q
03366 #undef GAN_SQUMAT_ADJOINTT_S
03367 #undef GAN_SQUMAT_DET_Q
03368 #undef GAN_SQUMAT_DET_S
03369 #undef GAN_SQUMAT_TRACE_Q
03370 #undef GAN_SQUMAT_TRACE_S
03371 
03384 /* This library is free software; you can redistribute it and/or
03385    modify it under the terms of the GNU Lesser General Public
03386    License as published by the Free Software Foundation; either
03387    version 2.1 of the License, or (at your option) any later version.
03388 
03389    This library is distributed in the hope that it will be useful,
03390    but WITHOUT ANY WARRANTY; without even the implied warranty of
03391    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03392    Lesser General Public License for more details.
03393 
03394    You should have received a copy of the GNU Lesser General Public
03395    License along with this library; if not, write to the Free Software
03396    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03397 */
03398 
03399 /* function declarations for functions common to all small vector types */
03400 
03401 
03402 
03403 /* documentation for macros defined in individual header files */
03404 
03415  Gan_SquMatrix44 *gan_ltmat44_zero_q ( const Gan_SquMatrix44 *A );
03416 
03433  Gan_SquMatrix44 *gan_ltmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03434 
03452  Gan_SquMatrix44 *gan_ltmat44_scale_q ( Gan_SquMatrix44 *A, double a,
03453                                Gan_SquMatrix44 *B );
03454 
03462  Gan_SquMatrix44 *gan_ltmat44_scale_i ( Gan_SquMatrix44 *A, double a );
03463 
03472  Gan_SquMatrix44 *gan_ltmat44_divide_q ( Gan_SquMatrix44 *A, double a,
03473                                 Gan_SquMatrix44 *B );
03474 
03482  Gan_SquMatrix44 *gan_ltmat44_divide_i ( Gan_SquMatrix44 *A, double a );
03483 
03491  Gan_SquMatrix44 *gan_ltmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03492 
03500  Gan_SquMatrix44 *gan_ltmat44_negate_i ( Gan_SquMatrix44 *A );
03501 
03509  Gan_SquMatrix44 *gan_ltmat44_unit_i ( Gan_SquMatrix44 *A );
03510 
03528  Gan_SquMatrix44 *gan_ltmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03529 
03538  Gan_SquMatrix44 *gan_ltmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03539 
03548  Gan_SquMatrix44 *gan_ltmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03549 
03558  Gan_SquMatrix44 *gan_ltmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03559 
03577  Gan_SquMatrix44 *gan_ltmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03578 
03587  Gan_SquMatrix44 *gan_ltmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03588 
03597  Gan_SquMatrix44 *gan_ltmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03598 
03607  Gan_SquMatrix44 *gan_ltmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03608 
03627  Gan_Vector4 *gan_ltmat44_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03628                                 Gan_Vector4 *q );
03629 
03638  Gan_Vector4 *gan_ltmat44_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03639 
03648  Gan_Vector4 *gan_ltmat44T_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03649                                  Gan_Vector4 *q );
03650 
03659  Gan_Vector4 *gan_ltmat44T_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03660 
03722  Gan_SquMatrix44 *gan_ltmat44_slmultT_q ( Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B );
03723 
03733  Gan_SquMatrix44 *gan_ltmat44_slmultT_i ( Gan_SquMatrix44 *A );
03734 
03743  Gan_SquMatrix44 *gan_ltmat44_srmultT_q ( const Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03744 
03754  Gan_SquMatrix44 *gan_ltmat44_srmultT_i ( Gan_SquMatrix44 *A );
03755 
03770  double gan_ltmat44_sumsqr_q ( const Gan_SquMatrix44 *A );
03771 
03778  double gan_ltmat44_Fnorm_q ( const Gan_SquMatrix44 *A );
03779 
03810 /* This library is free software; you can redistribute it and/or
03811    modify it under the terms of the GNU Lesser General Public
03812    License as published by the Free Software Foundation; either
03813    version 2.1 of the License, or (at your option) any later version.
03814 
03815    This library is distributed in the hope that it will be useful,
03816    but WITHOUT ANY WARRANTY; without even the implied warranty of
03817    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03818    Lesser General Public License for more details.
03819 
03820    You should have received a copy of the GNU Lesser General Public
03821    License along with this library; if not, write to the Free Software
03822    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03823 */
03824 
03825 #undef GAN_MATTYPE
03826 #undef GAN_MATRIX_TYPE
03827 #undef GAN_SQUMATRIX_TYPE
03828 #undef GAN_VECTOR_TYPE
03829 #undef GAN_MAT_ELEMENT_TYPE
03830 #undef GAN_REALTYPE
03831 #undef GAN_FWRITE_LENDIAN
03832 #undef GAN_FREAD_LENDIAN
03833 #undef GAN_VECTYPE1
03834 #undef GAN_VECTYPE2
03835 #undef GAN_MATTYPEL
03836 #undef GAN_MATTYPER
03837 #undef GAN_SQUMATTYPEL
03838 #undef GAN_SQUMATTYPER
03839 #undef GAN_FIXED_MATRIX_TYPE
03840 #undef GAN_MAT_FPRINT
03841 #undef GAN_MAT_PRINT
03842 #undef GAN_MAT_FSCANF
03843 #undef GAN_MAT_FWRITE
03844 #undef GAN_MAT_FREAD
03845 #undef GAN_MAT_ZERO_Q
03846 #undef GAN_MAT_ZERO_S
03847 #undef GAN_MAT_COPY_Q
03848 #undef GAN_MAT_COPY_S
03849 #undef GAN_MAT_SCALE_Q
03850 #undef GAN_MAT_SCALE_S
03851 #undef GAN_MAT_SCALE_I
03852 #undef GAN_MAT_DIVIDE_Q
03853 #undef GAN_MAT_DIVIDE_S
03854 #undef GAN_MAT_DIVIDE_I
03855 #undef GAN_MAT_NEGATE_Q
03856 #undef GAN_MAT_NEGATE_S
03857 #undef GAN_MAT_NEGATE_I
03858 #undef GAN_MAT_UNIT_Q
03859 #undef GAN_MAT_UNIT_S
03860 #undef GAN_MAT_UNIT_I
03861 #undef GAN_MAT_ADD_Q
03862 #undef GAN_MAT_ADD_I1
03863 #undef GAN_MAT_ADD_I2
03864 #undef GAN_MAT_INCREMENT
03865 #undef GAN_MAT_ADD_S
03866 #undef GAN_MAT_SUB_Q
03867 #undef GAN_MAT_SUB_I1
03868 #undef GAN_MAT_SUB_I2
03869 #undef GAN_MAT_DECREMENT
03870 #undef GAN_MAT_SUB_S
03871 #undef GAN_VEC_OUTER_Q
03872 #undef GAN_VEC_OUTER_S
03873 #undef GAN_MAT_MULTV_Q
03874 #undef GAN_MAT_MULTV_S
03875 #undef GAN_MAT_MULTV_I
03876 #undef GAN_MATT_MULTV_Q
03877 #undef GAN_MATT_MULTV_S
03878 #undef GAN_MATT_MULTV_I
03879 #undef GAN_MAT_LMULTM_Q
03880 #undef GAN_MAT_LMULTM_S
03881 #undef GAN_MAT_LMULTMT_Q
03882 #undef GAN_MAT_LMULTMT_S
03883 #undef GAN_MAT_RMULTM_Q
03884 #undef GAN_MAT_RMULTM_S
03885 #undef GAN_MAT_RMULTMT_Q
03886 #undef GAN_MAT_RMULTMT_S
03887 #undef GAN_MAT_LMULTMT_SYM_Q
03888 #undef GAN_MAT_LMULTMT_SYM_S
03889 #undef GAN_MAT_RMULTMT_SYM_Q
03890 #undef GAN_MAT_RMULTMT_SYM_S
03891 #undef GAN_MAT_LMULTS_Q
03892 #undef GAN_MAT_LMULTS_S
03893 #undef GAN_MAT_RMULTS_Q
03894 #undef GAN_MAT_RMULTS_S
03895 #undef GAN_SYMMATL_LRMULT_Q
03896 #undef GAN_SYMMATL_LRMULT_S
03897 #undef GAN_SYMMATR_LRMULT_Q
03898 #undef GAN_SYMMATR_LRMULT_S
03899 #undef GAN_MAT_LMULTL_Q
03900 #undef GAN_MAT_LMULTL_S
03901 #undef GAN_MAT_LMULTL_I
03902 #undef GAN_MAT_LMULTLI_Q
03903 #undef GAN_MAT_LMULTLI_S
03904 #undef GAN_MAT_LMULTLI_I
03905 #undef GAN_MAT_LMULTLT_Q
03906 #undef GAN_MAT_LMULTLT_S
03907 #undef GAN_MAT_LMULTLT_I
03908 #undef GAN_MAT_LMULTLIT_Q
03909 #undef GAN_MAT_LMULTLIT_S
03910 #undef GAN_MAT_LMULTLIT_I
03911 #undef GAN_MAT_RMULTL_Q
03912 #undef GAN_MAT_RMULTL_S
03913 #undef GAN_MAT_RMULTL_I
03914 #undef GAN_MAT_RMULTLI_Q
03915 #undef GAN_MAT_RMULTLI_S
03916 #undef GAN_MAT_RMULTLI_I
03917 #undef GAN_MAT_RMULTLT_Q
03918 #undef GAN_MAT_RMULTLT_S
03919 #undef GAN_MAT_RMULTLT_I
03920 #undef GAN_MAT_RMULTLIT_Q
03921 #undef GAN_MAT_RMULTLIT_S
03922 #undef GAN_MAT_RMULTLIT_I
03923 #undef GAN_MAT_SRMULTT_Q
03924 #undef GAN_MAT_SRMULTT_S
03925 #undef GAN_MAT_SRMULTT_I
03926 #undef GAN_MAT_SLMULTT_Q
03927 #undef GAN_MAT_SLMULTT_S
03928 #undef GAN_MAT_SLMULTT_I
03929 #undef GAN_MAT_RMULTLIT_S
03930 #undef GAN_MAT_SUMSQR_Q
03931 #undef GAN_MAT_SUMSQR_S
03932 #undef GAN_MAT_FNORM_Q
03933 #undef GAN_MAT_FNORM_S
03934 #undef GAN_MAT_FROM_MAT_Q
03935 #undef GAN_MAT_FROM_MAT_S
03936 #undef GAN_MAT_FROM_SQUMAT_Q
03937 #undef GAN_MAT_FROM_SQUMAT_S
03938 #undef GAN_SQUMAT_FROM_SQUMAT_Q
03939 #undef GAN_SQUMAT_FROM_SQUMAT_S
03940 
03941 /* declare functions specific to upper triangular 4x4 matrices */
03955 /* This library is free software; you can redistribute it and/or
03956    modify it under the terms of the GNU Lesser General Public
03957    License as published by the Free Software Foundation; either
03958    version 2.1 of the License, or (at your option) any later version.
03959 
03960    This library is distributed in the hope that it will be useful,
03961    but WITHOUT ANY WARRANTY; without even the implied warranty of
03962    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03963    Lesser General Public License for more details.
03964 
03965    You should have received a copy of the GNU Lesser General Public
03966    License along with this library; if not, write to the Free Software
03967    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03968 */
03969 
03970 #define GAN_MATTYPE Gan_SquMatrix44
03971 #define GAN_MATRIX_TYPE Gan_SquMatrix
03972 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03973 #define GAN_VECTOR_TYPE Gan_Vector
03974 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03975 #define GAN_REALTYPE double
03976 #define GAN_MAT_FPRINT   gan_ltmat44T_fprint
03977 #define GAN_MAT_PRINT    gan_ltmat44T_print
03978 #define GAN_MAT_FSCANF   gan_ltmat44T_fscanf
03979 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03980 
03981 #define gan_ltmat44T_fwrite gan_ltmat44_fwrite
03982 #define gan_ltmat44T_fread  gan_ltmat44_fread
03983 
03996 /* This library is free software; you can redistribute it and/or
03997    modify it under the terms of the GNU Lesser General Public
03998    License as published by the Free Software Foundation; either
03999    version 2.1 of the License, or (at your option) any later version.
04000 
04001    This library is distributed in the hope that it will be useful,
04002    but WITHOUT ANY WARRANTY; without even the implied warranty of
04003    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04004    Lesser General Public License for more details.
04005 
04006    You should have received a copy of the GNU Lesser General Public
04007    License along with this library; if not, write to the Free Software
04008    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04009 */
04010 
04011 /* function declarations for functions common to all small square matrix
04012  * types */
04013 
04014 
04015 
04016 /* documentation for macros defined in individual header files */
04017 
04084 #undef GAN_SQUMAT_IDENT_Q
04085 #undef GAN_SQUMAT_IDENT_S
04086 #undef GAN_SQUMAT_TPOSE_Q
04087 #undef GAN_SQUMAT_TPOSE_S
04088 #undef GAN_SQUMAT_TPOSE_I
04089 #undef GAN_MAT_SADDT_Q
04090 #undef GAN_MAT_SADDT_S
04091 #undef GAN_SQUMATI_MULTV_Q
04092 #undef GAN_SQUMATI_MULTV_S
04093 #undef GAN_SQUMATI_MULTV_I
04094 #undef GAN_SQUMATIT_MULTV_Q
04095 #undef GAN_SQUMATIT_MULTV_S
04096 #undef GAN_SQUMATIT_MULTV_I
04097 #undef GAN_SQUMAT_INVERT
04098 #undef GAN_SQUMAT_INVERT_Q
04099 #undef GAN_SQUMAT_INVERT_S
04100 #undef GAN_SQUMAT_INVERT_I
04101 #undef GAN_SQUMAT_ADJOINT_Q
04102 #undef GAN_SQUMAT_ADJOINT_S
04103 #undef GAN_SQUMAT_ADJOINTT_Q
04104 #undef GAN_SQUMAT_ADJOINTT_S
04105 #undef GAN_SQUMAT_DET_Q
04106 #undef GAN_SQUMAT_DET_S
04107 #undef GAN_SQUMAT_TRACE_Q
04108 #undef GAN_SQUMAT_TRACE_S
04109 
04122 /* This library is free software; you can redistribute it and/or
04123    modify it under the terms of the GNU Lesser General Public
04124    License as published by the Free Software Foundation; either
04125    version 2.1 of the License, or (at your option) any later version.
04126 
04127    This library is distributed in the hope that it will be useful,
04128    but WITHOUT ANY WARRANTY; without even the implied warranty of
04129    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04130    Lesser General Public License for more details.
04131 
04132    You should have received a copy of the GNU Lesser General Public
04133    License along with this library; if not, write to the Free Software
04134    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04135 */
04136 
04137 /* function declarations for functions common to all small vector types */
04138 
04139 
04140 
04141 /* documentation for macros defined in individual header files */
04142 
04313 /* This library is free software; you can redistribute it and/or
04314    modify it under the terms of the GNU Lesser General Public
04315    License as published by the Free Software Foundation; either
04316    version 2.1 of the License, or (at your option) any later version.
04317 
04318    This library is distributed in the hope that it will be useful,
04319    but WITHOUT ANY WARRANTY; without even the implied warranty of
04320    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04321    Lesser General Public License for more details.
04322 
04323    You should have received a copy of the GNU Lesser General Public
04324    License along with this library; if not, write to the Free Software
04325    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04326 */
04327 
04328 #undef GAN_MATTYPE
04329 #undef GAN_MATRIX_TYPE
04330 #undef GAN_SQUMATRIX_TYPE
04331 #undef GAN_VECTOR_TYPE
04332 #undef GAN_MAT_ELEMENT_TYPE
04333 #undef GAN_REALTYPE
04334 #undef GAN_FWRITE_LENDIAN
04335 #undef GAN_FREAD_LENDIAN
04336 #undef GAN_VECTYPE1
04337 #undef GAN_VECTYPE2
04338 #undef GAN_MATTYPEL
04339 #undef GAN_MATTYPER
04340 #undef GAN_SQUMATTYPEL
04341 #undef GAN_SQUMATTYPER
04342 #undef GAN_FIXED_MATRIX_TYPE
04343 #undef GAN_MAT_FPRINT
04344 #undef GAN_MAT_PRINT
04345 #undef GAN_MAT_FSCANF
04346 #undef GAN_MAT_FWRITE
04347 #undef GAN_MAT_FREAD
04348 #undef GAN_MAT_ZERO_Q
04349 #undef GAN_MAT_ZERO_S
04350 #undef GAN_MAT_COPY_Q
04351 #undef GAN_MAT_COPY_S
04352 #undef GAN_MAT_SCALE_Q
04353 #undef GAN_MAT_SCALE_S
04354 #undef GAN_MAT_SCALE_I
04355 #undef GAN_MAT_DIVIDE_Q
04356 #undef GAN_MAT_DIVIDE_S
04357 #undef GAN_MAT_DIVIDE_I
04358 #undef GAN_MAT_NEGATE_Q
04359 #undef GAN_MAT_NEGATE_S
04360 #undef GAN_MAT_NEGATE_I
04361 #undef GAN_MAT_UNIT_Q
04362 #undef GAN_MAT_UNIT_S
04363 #undef GAN_MAT_UNIT_I
04364 #undef GAN_MAT_ADD_Q
04365 #undef GAN_MAT_ADD_I1
04366 #undef GAN_MAT_ADD_I2
04367 #undef GAN_MAT_INCREMENT
04368 #undef GAN_MAT_ADD_S
04369 #undef GAN_MAT_SUB_Q
04370 #undef GAN_MAT_SUB_I1
04371 #undef GAN_MAT_SUB_I2
04372 #undef GAN_MAT_DECREMENT
04373 #undef GAN_MAT_SUB_S
04374 #undef GAN_VEC_OUTER_Q
04375 #undef GAN_VEC_OUTER_S
04376 #undef GAN_MAT_MULTV_Q
04377 #undef GAN_MAT_MULTV_S
04378 #undef GAN_MAT_MULTV_I
04379 #undef GAN_MATT_MULTV_Q
04380 #undef GAN_MATT_MULTV_S
04381 #undef GAN_MATT_MULTV_I
04382 #undef GAN_MAT_LMULTM_Q
04383 #undef GAN_MAT_LMULTM_S
04384 #undef GAN_MAT_LMULTMT_Q
04385 #undef GAN_MAT_LMULTMT_S
04386 #undef GAN_MAT_RMULTM_Q
04387 #undef GAN_MAT_RMULTM_S
04388 #undef GAN_MAT_RMULTMT_Q
04389 #undef GAN_MAT_RMULTMT_S
04390 #undef GAN_MAT_LMULTMT_SYM_Q
04391 #undef GAN_MAT_LMULTMT_SYM_S
04392 #undef GAN_MAT_RMULTMT_SYM_Q
04393 #undef GAN_MAT_RMULTMT_SYM_S
04394 #undef GAN_MAT_LMULTS_Q
04395 #undef GAN_MAT_LMULTS_S
04396 #undef GAN_MAT_RMULTS_Q
04397 #undef GAN_MAT_RMULTS_S
04398 #undef GAN_SYMMATL_LRMULT_Q
04399 #undef GAN_SYMMATL_LRMULT_S
04400 #undef GAN_SYMMATR_LRMULT_Q
04401 #undef GAN_SYMMATR_LRMULT_S
04402 #undef GAN_MAT_LMULTL_Q
04403 #undef GAN_MAT_LMULTL_S
04404 #undef GAN_MAT_LMULTL_I
04405 #undef GAN_MAT_LMULTLI_Q
04406 #undef GAN_MAT_LMULTLI_S
04407 #undef GAN_MAT_LMULTLI_I
04408 #undef GAN_MAT_LMULTLT_Q
04409 #undef GAN_MAT_LMULTLT_S
04410 #undef GAN_MAT_LMULTLT_I
04411 #undef GAN_MAT_LMULTLIT_Q
04412 #undef GAN_MAT_LMULTLIT_S
04413 #undef GAN_MAT_LMULTLIT_I
04414 #undef GAN_MAT_RMULTL_Q
04415 #undef GAN_MAT_RMULTL_S
04416 #undef GAN_MAT_RMULTL_I
04417 #undef GAN_MAT_RMULTLI_Q
04418 #undef GAN_MAT_RMULTLI_S
04419 #undef GAN_MAT_RMULTLI_I
04420 #undef GAN_MAT_RMULTLT_Q
04421 #undef GAN_MAT_RMULTLT_S
04422 #undef GAN_MAT_RMULTLT_I
04423 #undef GAN_MAT_RMULTLIT_Q
04424 #undef GAN_MAT_RMULTLIT_S
04425 #undef GAN_MAT_RMULTLIT_I
04426 #undef GAN_MAT_SRMULTT_Q
04427 #undef GAN_MAT_SRMULTT_S
04428 #undef GAN_MAT_SRMULTT_I
04429 #undef GAN_MAT_SLMULTT_Q
04430 #undef GAN_MAT_SLMULTT_S
04431 #undef GAN_MAT_SLMULTT_I
04432 #undef GAN_MAT_RMULTLIT_S
04433 #undef GAN_MAT_SUMSQR_Q
04434 #undef GAN_MAT_SUMSQR_S
04435 #undef GAN_MAT_FNORM_Q
04436 #undef GAN_MAT_FNORM_S
04437 #undef GAN_MAT_FROM_MAT_Q
04438 #undef GAN_MAT_FROM_MAT_S
04439 #undef GAN_MAT_FROM_SQUMAT_Q
04440 #undef GAN_MAT_FROM_SQUMAT_S
04441 #undef GAN_SQUMAT_FROM_SQUMAT_Q
04442 #undef GAN_SQUMAT_FROM_SQUMAT_S
04443 
04456 #ifdef __cplusplus
04457 }
04458 #endif
04459 
04460 #endif /* #ifndef _GAN_4X4MATRIX_H */

Generated on Fri Mar 17 12:44:47 2006 by  doxygen 1.3.9.1