Main Page | Modules | Class List | Directories | 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 
00564 
00565 typedef struct Gan_Matrix44
00566 {
00567    double xx, xy, xz, xw,
00568           yx, yy, yz, yw,
00569           zx, zy, zz, zw,
00570           wx, wy, wz, ww;
00571 } Gan_Matrix44;
00572 
00573 #ifndef NDEBUG
00574 
00575 typedef enum { GAN_SYMMETRIC_MATRIX44, GAN_LOWER_TRI_MATRIX44 }
00576  Gan_SquMatrix44Type;
00577 #endif /* #ifndef NDEBUG */
00578 
00580 typedef struct Gan_SquMatrix44
00581 {
00582 #ifndef NDEBUG
00583    /* square matrix type, for setting and checking in debug mode */
00584    Gan_SquMatrix44Type type;
00585 #endif /* #ifndef NDEBUG */
00586 
00587    /* matrix data */
00588    double xx,
00589           yx, yy,
00590           zx, zy, zz,
00591           wx, wy, wz, ww;
00592 } Gan_SquMatrix44;
00593 
00594 /* matrix definitions specific to 4x4 matrices */
00595 #define GAN_ST44_FILL(A,t,XX,YX,YY,ZX,ZY,ZZ,WX,WY,WZ,WW)\
00596     (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00597     GAN_FREP44L_A_C((A)->,=,(XX),(YX),(YY),(ZX),(ZY),(ZZ),(WX),(WY),(WZ),(WW)))
00598 #define GAN_ST44_IDENT(A,t)\
00599            (GAN_TEST_OP1(A,Gan_SquMatrix44),gan_eval((A)->type=t),\
00600             GAN_FREP44L_A_C((A)->,=,1.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0))
00601 
00602 /* generic matrix multiply operations */
00603 #define GAN_MAT44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00604  (a p1 = GAN_REP4_OP_AB(b,* c,xx,xy,xz,xw,q1,q2,q3,q4,+),\
00605   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,yz,yw,q1,q2,q3,q4,+),\
00606   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,zw,q1,q2,q3,q4,+),\
00607   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00608 #define GAN_MAT44T_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00609  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00610   a p2 = GAN_REP4_OP_AB(b,* c,xy,yy,zy,wy,q1,q2,q3,q4,+),\
00611   a p3 = GAN_REP4_OP_AB(b,* c,xz,yz,zz,wz,q1,q2,q3,q4,+),\
00612   a p4 = GAN_REP4_OP_AB(b,* c,xw,yw,zw,ww,q1,q2,q3,q4,+))
00613 
00614 /* symmetric matrix multiply operation */
00615 #define GAN_SYM44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00616  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00617   a p2 = GAN_REP4_OP_AB(b,* c,yx,yy,zy,wy,q1,q2,q3,q4,+),\
00618   a p3 = GAN_REP4_OP_AB(b,* c,zx,zy,zz,wz,q1,q2,q3,q4,+),\
00619   a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+))
00620 
00621 /* lower triangular matrix multiply operations */
00622 #define GAN_LOW44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00623  (a p4 = GAN_REP4_OP_AB(b,* c,wx,wy,wz,ww,q1,q2,q3,q4,+),\
00624   a p3 = GAN_REP3_OP_AB(b,* c,zx,zy,zz,q1,q2,q3,+),\
00625   a p2 = GAN_REP2_OP_AB(b,* c,yx,yy,q1,q2,+),\
00626   a p1 = GAN_REP1_OP_AB(b,* c,xx,q1,+))
00627 #define GAN_LOW44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00628  (a p1 =  c q1 / b xx,\
00629   a p2 = (c q2 - b yx * a p1) / b yy,\
00630   a p3 = (c q3 - b zx * a p1 - b zy * a p2) / b zz,\
00631   a p4 = (c q4 - b wx * a p1 - b wy * a p2 - b wz * a p3) / b ww)
00632 
00633 /* upper triangular matrix multiply operations */
00634 #define GAN_UPP44_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00635  (a p1 = GAN_REP4_OP_AB(b,* c,xx,yx,zx,wx,q1,q2,q3,q4,+),\
00636   a p2 = GAN_REP3_OP_AB(b,* c,yy,zy,wy,q2,q3,q4,+),\
00637   a p3 = GAN_REP2_OP_AB(b,* c,zz,wz,q3,q4,+),\
00638   a p4 = GAN_REP1_OP_AB(b,* c,ww,q4,+))
00639 #define GAN_UPP44I_MULT1D(a,b,c,p1,p2,p3,p4,q1,q2,q3,q4)\
00640  (a p4 =  c q4 / b ww,\
00641   a p3 = (c q3 - b wz * a p4) / b zz,\
00642   a p2 = (c q2 - b zy * a p3 - b wy * a p4) / b yy,\
00643   a p1 = (c q1 - b yx * a p2 - b zx * a p3 - b wx * a p4) / b xx)
00644 
00645 /* symmetric/lower triangular square matrix definitions */
00646 #define GAN_ST44_ZERO(A,t)\
00647            (GAN_TEST_OP1(A,Gan_SquMatrix44), gan_eval((A)->type=t),\
00648             GAN_REP44L_AS_C((A)->,=0.0))
00649 #define GAN_ST44_COPY(A,B,t)\
00650            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00651             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00652             GAN_REP44L_AA_C((B)->,=(A)->))
00653 #define GAN_ST44_SCALE(A,a,B,t)\
00654            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00655             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00656             GAN_REP44L_AAS_C((B)->,=(A)->,*(a)))
00657 #define GAN_ST44_DIVIDE(A,a,B,t)\
00658            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00659             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00660             GAN_REP44L_AAS_C((B)->,=(A)->,/(a)))
00661 #define GAN_ST44_NEGATE(A,B,t)\
00662            (GAN_TEST_OP2(A,B,Gan_SquMatrix44,Gan_SquMatrix44),\
00663             assert((A)->type==t), gan_eval((B)->type=(A)->type),\
00664             GAN_REP44L_AA_C((B)->,=-(A)->))
00665 #define GAN_ST44_ADD(A,B,C,t)\
00666          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00667           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00668           GAN_REP44L_AAA_C((C)->,=(A)->,+(B)->))
00669 #define GAN_ST44_SUB(A,B,C,t)\
00670          (GAN_TEST_OP3(A,B,C,Gan_SquMatrix44,Gan_SquMatrix44,Gan_SquMatrix44),\
00671           assert((A)->type==t && (B)->type==t), gan_eval((C)->type=(A)->type),\
00672           GAN_REP44L_AAA_C((C)->,=(A)->,-(B)->))
00673 
00674 /* declare functions specific to generic 4x4 matrices */
00688 /* This library is free software; you can redistribute it and/or
00689    modify it under the terms of the GNU Lesser General Public
00690    License as published by the Free Software Foundation; either
00691    version 2.1 of the License, or (at your option) any later version.
00692 
00693    This library is distributed in the hope that it will be useful,
00694    but WITHOUT ANY WARRANTY; without even the implied warranty of
00695    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00696    Lesser General Public License for more details.
00697 
00698    You should have received a copy of the GNU Lesser General Public
00699    License along with this library; if not, write to the Free Software
00700    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00701 */
00702 
00703 #ifndef _GAN_4X4MAT_H
00704 
00721 Gan_Matrix44 *gan_mat44_fill_q ( Gan_Matrix44 *A,
00722                                  double XX, double XY, double XZ, double XW,
00723                                  double YX, double YY, double YZ, double YW,
00724                                  double ZX, double ZY, double ZZ, double ZW,
00725                                  double WX, double WY, double WZ, double WW );
00726 
00748 void gan_mat44_get_rows_q ( const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00749                                                    Gan_Vector4 *r, Gan_Vector4 *s );
00750 
00762 void gan_mat44_get_cols_q ( const Gan_Matrix44 *A, Gan_Vector4 *p, Gan_Vector4 *q,
00763                                                    Gan_Vector4 *r, Gan_Vector4 *s );
00764 
00772 Gan_Matrix33 *gan_mat44_get_m33tl_q ( const Gan_Matrix44 *A, Gan_Matrix33 *B );
00773 
00781 Gan_Vector3 *gan_mat44_get_v3tr_q ( const Gan_Matrix44 *A, Gan_Vector3 *p );
00782 
00796 void gan_mat44_get_parts_q ( const Gan_Matrix44 *A, Gan_Matrix33 *B,
00797                              Gan_Vector3 *p, Gan_Vector3 *q, double *s );
00798 
00811 void gan_mat44_get_blocks_q ( const Gan_Matrix44 *M,
00812                               Gan_Matrix22 *A, Gan_Matrix22 *B,
00813                               Gan_Matrix22 *C, Gan_Matrix22 *D );
00814 
00837 Gan_Matrix44 *gan_mat44_set_parts_q ( Gan_Matrix44 *A,
00838                                       const Gan_Matrix33 *B, const Gan_Vector3 *p,
00839                                       const Gan_Vector3 *q, double s );
00840 
00854 Gan_Matrix44 *gan_mat44_set_blocks_q ( Gan_Matrix44 *M,
00855                                        const Gan_Matrix22 *A, const Gan_Matrix22 *B,
00856                                        const Gan_Matrix22 *C, const Gan_Matrix22 *D );
00857 
00863 #endif /* #ifndef _GAN_4X4MAT_H */
00864 
00865 #define GAN_MATTYPE Gan_Matrix44
00866 #define GAN_MATRIX_TYPE Gan_Matrix
00867 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
00868 #define GAN_VECTOR_TYPE Gan_Vector
00869 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
00870 #define GAN_REALTYPE double
00871 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
00872 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
00873 #define GAN_VECTYPE1 Gan_Vector4
00874 #define GAN_VECTYPE2 Gan_Vector4
00875 #define GAN_MATTYPEL Gan_Matrix44
00876 #define GAN_MATTYPER Gan_Matrix44
00877 #define GAN_SQUMATTYPEL Gan_SquMatrix44
00878 #define GAN_SQUMATTYPER Gan_SquMatrix44
00879 #define GAN_MAT_FPRINT                     gan_mat44_fprint
00880 #define GAN_MAT_PRINT                      gan_mat44_print
00881 #define GAN_MAT_FSCANF                     gan_mat44_fscanf
00882 #define GAN_MAT_FWRITE                     gan_mat44_fwrite
00883 #define GAN_MAT_FREAD                      gan_mat44_fread
00884 #define GAN_MAT_ZERO_Q                     gan_mat44_zero_q
00885 #define GAN_MAT_ZERO_S                     gan_mat44_zero_s
00886 #define GAN_MAT_COPY_Q                     gan_mat44_copy_q
00887 #define GAN_MAT_COPY_S                     gan_mat44_copy_s
00888 #define GAN_MAT_SCALE_Q                    gan_mat44_scale_q
00889 #define GAN_MAT_SCALE_I                    gan_mat44_scale_i
00890 #define GAN_MAT_SCALE_S                    gan_mat44_scale_s
00891 #define GAN_MAT_DIVIDE_Q                   gan_mat44_divide_q
00892 #define GAN_MAT_DIVIDE_I                   gan_mat44_divide_i
00893 #define GAN_MAT_DIVIDE_S                   gan_mat44_divide_s
00894 #define GAN_MAT_NEGATE_Q                   gan_mat44_negate_q
00895 #define GAN_MAT_NEGATE_I                   gan_mat44_negate_i
00896 #define GAN_MAT_NEGATE_S                   gan_mat44_negate_s
00897 #define GAN_MAT_UNIT_Q                     gan_mat44_unit_q
00898 #define GAN_MAT_UNIT_I                     gan_mat44_unit_i
00899 #define GAN_MAT_UNIT_S                     gan_mat44_unit_s
00900 #define GAN_MAT_ADD_Q                      gan_mat44_add_q
00901 #define GAN_MAT_ADD_I1                     gan_mat44_add_i1
00902 #define GAN_MAT_ADD_I2                     gan_mat44_add_i2
00903 #define GAN_MAT_INCREMENT                  gan_mat44_increment
00904 #define GAN_MAT_ADD_S                      gan_mat44_add_s
00905 #define GAN_MAT_SUB_Q                      gan_mat44_sub_q
00906 #define GAN_MAT_SUB_I1                     gan_mat44_sub_i1
00907 #define GAN_MAT_SUB_I2                     gan_mat44_sub_i2
00908 #define GAN_MAT_DECREMENT                  gan_mat44_decrement
00909 #define GAN_MAT_SUB_S                      gan_mat44_sub_s
00910 #define GAN_VEC_OUTER_Q                    gan_vec44_outer_q
00911 #define GAN_VEC_OUTER_S                    gan_vec44_outer_s
00912 #define GAN_MAT_MULTV_Q                    gan_mat44_multv4_q
00913 #define GAN_MAT_MULTV_S                    gan_mat44_multv4_s
00914 #define GAN_MATT_MULTV_Q                   gan_mat44T_multv4_q
00915 #define GAN_MATT_MULTV_S                   gan_mat44T_multv4_s
00916 #define GAN_MAT_LMULTMT_Q                  gan_mat44_lmultm44T_q
00917 #define GAN_MAT_LMULTMT_S                  gan_mat44_lmultm44T_s
00918 #define GAN_MAT_RMULTM_Q                   gan_mat44_rmultm44_q
00919 #define GAN_MAT_RMULTM_S                   gan_mat44_rmultm44_s
00920 #define GAN_MAT_RMULTMT_Q                  gan_mat44_rmultm44T_q
00921 #define GAN_MAT_RMULTMT_S                  gan_mat44_rmultm44T_s
00922 #define GAN_MAT_LMULTMT_SYM_Q              gan_mat44_lmultm44T_sym_q
00923 #define GAN_MAT_LMULTMT_SYM_S              gan_mat44_lmultm44T_sym_s
00924 #define GAN_MAT_RMULTMT_SYM_Q              gan_mat44_rmultm44T_sym_q
00925 #define GAN_MAT_RMULTMT_SYM_S              gan_mat44_rmultm44T_sym_s
00926 #define GAN_MAT_SLMULTT_Q                  gan_mat44_slmultT_q
00927 #define GAN_MAT_SLMULTT_S                  gan_mat44_slmultT_s
00928 #define GAN_MAT_SRMULTT_Q                  gan_mat44_srmultT_q
00929 #define GAN_MAT_SRMULTT_S                  gan_mat44_srmultT_s
00930 #define GAN_MAT_LMULTS_Q                   gan_mat44_lmults44_q
00931 #define GAN_MAT_LMULTS_S                   gan_mat44_lmults44_s
00932 #define GAN_MAT_RMULTS_Q                   gan_mat44_rmults44_q
00933 #define GAN_MAT_RMULTS_S                   gan_mat44_rmults44_s
00934 #define GAN_SYMMATL_LRMULT_Q               gan_symmat44_lrmultm44T_q
00935 #define GAN_SYMMATL_LRMULT_S               gan_symmat44_lrmultm44T_s
00936 #define GAN_SYMMATR_LRMULT_Q               gan_symmat44_lrmultm44_q
00937 #define GAN_SYMMATR_LRMULT_S               gan_symmat44_lrmultm44_s
00938 #define GAN_MAT_LMULTL_Q                   gan_mat44_lmultl44_q
00939 #define GAN_MAT_LMULTL_S                   gan_mat44_lmultl44_s
00940 #define GAN_MAT_LMULTL_I                   gan_mat44_lmultl44_i
00941 #define GAN_MAT_LMULTLI_Q                  gan_mat44_lmultl44I_q
00942 #define GAN_MAT_LMULTLI_S                  gan_mat44_lmultl44I_s
00943 #define GAN_MAT_LMULTLI_I                  gan_mat44_lmultl44I_i
00944 #define GAN_MAT_LMULTLT_Q                  gan_mat44_lmultl44T_q
00945 #define GAN_MAT_LMULTLT_S                  gan_mat44_lmultl44T_s
00946 #define GAN_MAT_LMULTLT_I                  gan_mat44_lmultl44T_i
00947 #define GAN_MAT_LMULTLIT_Q                 gan_mat44_lmultl44IT_q
00948 #define GAN_MAT_LMULTLIT_S                 gan_mat44_lmultl44IT_s
00949 #define GAN_MAT_LMULTLIT_I                 gan_mat44_lmultl44IT_i
00950 #define GAN_MAT_RMULTL_Q                   gan_mat44_rmultl44_q
00951 #define GAN_MAT_RMULTL_S                   gan_mat44_rmultl44_s
00952 #define GAN_MAT_RMULTL_I                   gan_mat44_rmultl44_i
00953 #define GAN_MAT_RMULTLI_Q                  gan_mat44_rmultl44I_q
00954 #define GAN_MAT_RMULTLI_S                  gan_mat44_rmultl44I_s
00955 #define GAN_MAT_RMULTLI_I                  gan_mat44_rmultl44I_i
00956 #define GAN_MAT_RMULTLT_Q                  gan_mat44_rmultl44T_q
00957 #define GAN_MAT_RMULTLT_S                  gan_mat44_rmultl44T_s
00958 #define GAN_MAT_RMULTLT_I                  gan_mat44_rmultl44T_i
00959 #define GAN_MAT_RMULTLIT_Q                 gan_mat44_rmultl44IT_q
00960 #define GAN_MAT_RMULTLIT_S                 gan_mat44_rmultl44IT_s
00961 #define GAN_MAT_RMULTLIT_I                 gan_mat44_rmultl44IT_i
00962 #define GAN_MAT_SUMSQR_Q                   gan_mat44_sumsqr_q
00963 #define GAN_MAT_SUMSQR_S                   gan_mat44_sumsqr_s
00964 #define GAN_MAT_FNORM_Q                    gan_mat44_Fnorm_q
00965 #define GAN_MAT_FNORM_S                    gan_mat44_Fnorm_s
00966 #define GAN_MAT_FROM_MAT_Q                 gan_mat44_from_mat_q
00967 #define GAN_MAT_FROM_MAT_S                 gan_mat44_from_mat_s
00968 #define GAN_MAT_FROM_SQUMAT_Q              gan_mat44_from_squmat_q
00969 #define GAN_MAT_FROM_SQUMAT_S              gan_mat44_from_squmat_s
00970 #define GAN_SQUMAT_FROM_SQUMAT_Q           gan_squmat44_from_squmat_q
00971 #define GAN_SQUMAT_FROM_SQUMAT_S           gan_squmat44_from_squmat_s
00972 
00973 #define GAN_SQUMAT_IDENT_Q    gan_mat44_ident_q
00974 #define GAN_SQUMAT_IDENT_S    gan_mat44_ident_s
00975 #define GAN_SQUMAT_TPOSE_Q    gan_mat44_tpose_q
00976 #define GAN_SQUMAT_TPOSE_S    gan_mat44_tpose_s
00977 #define GAN_SQUMAT_TPOSE_I    gan_mat44_tpose_i
00978 #define GAN_MAT_SADDT_Q       gan_mat44_saddT_q
00979 #define GAN_MAT_SADDT_S       gan_mat44_saddT_s
00980 #define GAN_SQUMAT_INVERT     gan_mat44_invert
00981 #define GAN_SQUMAT_INVERT_Q   gan_mat44_invert_q
00982 #define GAN_SQUMAT_INVERT_S   gan_mat44_invert_s
00983 #define GAN_SQUMAT_INVERT_I   gan_mat44_invert_i
00984 #define GAN_SQUMAT_ADJOINT_Q  gan_mat44_adjoint_q
00985 #define GAN_SQUMAT_ADJOINT_S  gan_mat44_adjoint_s
00986 #define GAN_SQUMAT_ADJOINTT_Q gan_mat44_adjointT_q
00987 #define GAN_SQUMAT_ADJOINTT_S gan_mat44_adjointT_s
00988 #define GAN_SQUMAT_DET_Q      gan_mat44_det_q
00989 #define GAN_SQUMAT_DET_S      gan_mat44_det_s
00990 #define GAN_SQUMAT_TRACE_Q    gan_mat44_trace_q
00991 #define GAN_SQUMAT_TRACE_S    gan_mat44_trace_s
00992 
00993 #ifndef _GAN_4X4MAT_H
00994 #define _GAN_4X4MAT_H
00995 
00996 
00997 #endif /* #ifndef _GAN_4X4MAT_H */
00998 
01011 /* This library is free software; you can redistribute it and/or
01012    modify it under the terms of the GNU Lesser General Public
01013    License as published by the Free Software Foundation; either
01014    version 2.1 of the License, or (at your option) any later version.
01015 
01016    This library is distributed in the hope that it will be useful,
01017    but WITHOUT ANY WARRANTY; without even the implied warranty of
01018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01019    Lesser General Public License for more details.
01020 
01021    You should have received a copy of the GNU Lesser General Public
01022    License along with this library; if not, write to the Free Software
01023    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01024 */
01025 
01026 /* function declarations for functions common to all small square matrix
01027  * types */
01028 
01029 
01030 
01031 /* documentation for macros defined in individual header files */
01032 
01045 Gan_Matrix44 *gan_mat44_ident_q ( Gan_Matrix44 *A );
01046 
01064 Gan_Matrix44 *gan_mat44_tpose_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01065 
01083 Gan_SquMatrix44 *gan_mat44_saddT_q ( const Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01084 
01115 Gan_Matrix44 *gan_mat44_invert_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01116 
01125 Gan_Matrix44 *gan_mat44_invert_i ( Gan_Matrix44 *A );
01126 
01141 double gan_mat44_det_q ( const Gan_Matrix44 *A );
01142 
01148 double gan_mat44_trace_q ( const Gan_Matrix44 *A );
01149 
01155 #undef GAN_SQUMAT_IDENT_Q
01156 #undef GAN_SQUMAT_IDENT_S
01157 #undef GAN_SQUMAT_TPOSE_Q
01158 #undef GAN_SQUMAT_TPOSE_S
01159 #undef GAN_SQUMAT_TPOSE_I
01160 #undef GAN_MAT_SADDT_Q
01161 #undef GAN_MAT_SADDT_S
01162 #undef GAN_SQUMATI_MULTV_Q
01163 #undef GAN_SQUMATI_MULTV_S
01164 #undef GAN_SQUMATI_MULTV_I
01165 #undef GAN_SQUMATIT_MULTV_Q
01166 #undef GAN_SQUMATIT_MULTV_S
01167 #undef GAN_SQUMATIT_MULTV_I
01168 #undef GAN_SQUMAT_INVERT
01169 #undef GAN_SQUMAT_INVERT_Q
01170 #undef GAN_SQUMAT_INVERT_S
01171 #undef GAN_SQUMAT_INVERT_I
01172 #undef GAN_SQUMAT_ADJOINT_Q
01173 #undef GAN_SQUMAT_ADJOINT_S
01174 #undef GAN_SQUMAT_ADJOINTT_Q
01175 #undef GAN_SQUMAT_ADJOINTT_S
01176 #undef GAN_SQUMAT_DET_Q
01177 #undef GAN_SQUMAT_DET_S
01178 #undef GAN_SQUMAT_TRACE_Q
01179 #undef GAN_SQUMAT_TRACE_S
01180 
01193 /* This library is free software; you can redistribute it and/or
01194    modify it under the terms of the GNU Lesser General Public
01195    License as published by the Free Software Foundation; either
01196    version 2.1 of the License, or (at your option) any later version.
01197 
01198    This library is distributed in the hope that it will be useful,
01199    but WITHOUT ANY WARRANTY; without even the implied warranty of
01200    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01201    Lesser General Public License for more details.
01202 
01203    You should have received a copy of the GNU Lesser General Public
01204    License along with this library; if not, write to the Free Software
01205    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01206 */
01207 
01208 /* function declarations for functions common to all small vector types */
01209 
01210 
01211 
01212 /* documentation for macros defined in individual header files */
01213 
01224 Gan_Matrix44 *gan_mat44_zero_q ( const Gan_Matrix44 *A );
01225 
01242 Gan_Matrix44 *gan_mat44_copy_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01243 
01261 Gan_Matrix44 *gan_mat44_scale_q ( Gan_Matrix44 *A, double a,
01262                                Gan_Matrix44 *B );
01263 
01271 Gan_Matrix44 *gan_mat44_scale_i ( Gan_Matrix44 *A, double a );
01272 
01281 Gan_Matrix44 *gan_mat44_divide_q ( Gan_Matrix44 *A, double a,
01282                                 Gan_Matrix44 *B );
01283 
01291 Gan_Matrix44 *gan_mat44_divide_i ( Gan_Matrix44 *A, double a );
01292 
01300 Gan_Matrix44 *gan_mat44_negate_q ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01301 
01309 Gan_Matrix44 *gan_mat44_negate_i ( Gan_Matrix44 *A );
01310 
01318 Gan_Matrix44 *gan_mat44_unit_i ( Gan_Matrix44 *A );
01319 
01337 Gan_Matrix44 *gan_mat44_add_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01338 
01347 Gan_Matrix44 *gan_mat44_add_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01348 
01357 Gan_Matrix44 *gan_mat44_add_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01358 
01367 Gan_Matrix44 *gan_mat44_increment ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01368 
01386 Gan_Matrix44 *gan_mat44_sub_q ( Gan_Matrix44 *A, Gan_Matrix44 *B, Gan_Matrix44 *C );
01387 
01396 Gan_Matrix44 *gan_mat44_sub_i1 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01397 
01406 Gan_Matrix44 *gan_mat44_sub_i2 ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01407 
01416 Gan_Matrix44 *gan_mat44_decrement ( Gan_Matrix44 *A, Gan_Matrix44 *B );
01417 
01435 Gan_Matrix44 *gan_vec44_outer_q ( const Gan_Vector4 *p, const Gan_Vector4 *q,
01436                                Gan_Matrix44 *A );
01437 
01446 Gan_Vector4 *gan_mat44_multv4_q ( const Gan_Matrix44 *A, Gan_Vector4 *p,
01447                                 Gan_Vector4 *q );
01448 
01449 
01458 Gan_Vector4 *gan_mat44T_multv4_q ( const Gan_Matrix44 *A, Gan_Vector4 *p,
01459                                  Gan_Vector4 *q );
01460 
01461 
01481 Gan_Matrix44 *gan_mat44_lmultm44T_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01482                                  Gan_Matrix44 *C );
01483 
01493 Gan_Matrix44 *gan_mat44_rmultm44_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01494                                 Gan_Matrix44 *C );
01495 
01505 Gan_Matrix44 *gan_mat44_rmultm44T_q ( Gan_Matrix44 *A, const Gan_Matrix44 *B,
01506                                  Gan_Matrix44 *C );
01507 
01519 Gan_SquMatrix44 *gan_mat44_lmultm44T_sym_q ( const Gan_Matrix44 *A, const Gan_Matrix44 *B,
01520                                          Gan_SquMatrix44 *C );
01521 
01533 Gan_SquMatrix44 *gan_mat44_rmultm44T_sym_q ( const Gan_Matrix44 *A, const Gan_Matrix44 *B,
01534                                          Gan_SquMatrix44 *C );
01535 
01544 Gan_Matrix44 *gan_mat44_lmults44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01545                                 Gan_Matrix44 *C );
01546 
01555 Gan_Matrix44 *gan_mat44_rmults44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01556                                 Gan_Matrix44 *C );
01557 
01577 Gan_SquMatrix44 *gan_symmat44_lrmultm44T_q ( const Gan_SquMatrix44 *A, const Gan_Matrix44 *B,
01578                                         const Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01579 
01590 Gan_SquMatrix44 *gan_symmat44_lrmultm44_q ( const Gan_SquMatrix44 *A, const Gan_Matrix44 *B,
01591                                         const Gan_Matrix44 *C, Gan_SquMatrix44 *D );
01592 
01611 Gan_Matrix44 *gan_mat44_lmultl44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01612                                 Gan_Matrix44 *C );
01613 
01623 Gan_Matrix44 *gan_mat44_lmultl44I_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01624                                  Gan_Matrix44 *C );
01625 
01635 Gan_Matrix44 *gan_mat44_lmultl44T_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01636                                  Gan_Matrix44 *C );
01637 
01647 Gan_Matrix44 *gan_mat44_lmultl44IT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01648                                   Gan_Matrix44 *C );
01649 
01659 Gan_Matrix44 *gan_mat44_rmultl44_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01660                                 Gan_Matrix44 *C );
01661 
01671 Gan_Matrix44 *gan_mat44_rmultl44I_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01672                                  Gan_Matrix44 *C );
01673 
01683 Gan_Matrix44 *gan_mat44_rmultl44T_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01684                                  Gan_Matrix44 *C );
01685 
01695 Gan_Matrix44 *gan_mat44_rmultl44IT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B,
01696                                   Gan_Matrix44 *C );
01697 
01707 Gan_Matrix44 *gan_mat44_lmultl44_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01708 
01718 Gan_Matrix44 *gan_mat44_lmultl44I_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01719 
01729 Gan_Matrix44 *gan_mat44_lmultl44T_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01730 
01740 Gan_Matrix44 *gan_mat44_lmultl44IT_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01741 
01751 Gan_Matrix44 *gan_mat44_rmultl44_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01752 
01762 Gan_Matrix44 *gan_mat44_rmultl44I_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01763 
01773 Gan_Matrix44 *gan_mat44_rmultl44T_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01774 
01784 Gan_Matrix44 *gan_mat44_rmultl44IT_i ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01785 
01794 Gan_SquMatrix44 *gan_mat44_slmultT_q ( Gan_Matrix44 *A, const Gan_SquMatrix44 *B );
01795 
01796 
01805 Gan_SquMatrix44 *gan_mat44_srmultT_q ( const Gan_Matrix44 *A, Gan_SquMatrix44 *B );
01806 
01807 
01822 double gan_mat44_sumsqr_q ( const Gan_Matrix44 *A );
01823 
01830 double gan_mat44_Fnorm_q ( const Gan_Matrix44 *A );
01831 
01841 Gan_Matrix44 *gan_mat44_from_mat_q ( const Gan_Matrix *A, Gan_Matrix44 *B );
01842 
01843 Gan_Matrix44 *gan_mat44_from_squmat_q ( const Gan_SquMatrix *A, Gan_Matrix44 *B );
01844 
01845 Gan_SquMatrix44 *gan_squmat44_from_squmat_q ( const Gan_SquMatrix *A,
01846                                             Gan_SquMatrix44 *B );
01847 
01866 /* This library is free software; you can redistribute it and/or
01867    modify it under the terms of the GNU Lesser General Public
01868    License as published by the Free Software Foundation; either
01869    version 2.1 of the License, or (at your option) any later version.
01870 
01871    This library is distributed in the hope that it will be useful,
01872    but WITHOUT ANY WARRANTY; without even the implied warranty of
01873    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
01874    Lesser General Public License for more details.
01875 
01876    You should have received a copy of the GNU Lesser General Public
01877    License along with this library; if not, write to the Free Software
01878    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
01879 */
01880 
01881 #undef GAN_MATTYPE
01882 #undef GAN_MATRIX_TYPE
01883 #undef GAN_SQUMATRIX_TYPE
01884 #undef GAN_VECTOR_TYPE
01885 #undef GAN_MAT_ELEMENT_TYPE
01886 #undef GAN_REALTYPE
01887 #undef GAN_FWRITE_LENDIAN
01888 #undef GAN_FREAD_LENDIAN
01889 #undef GAN_VECTYPE1
01890 #undef GAN_VECTYPE2
01891 #undef GAN_MATTYPEL
01892 #undef GAN_MATTYPER
01893 #undef GAN_SQUMATTYPEL
01894 #undef GAN_SQUMATTYPER
01895 #undef GAN_FIXED_MATRIX_TYPE
01896 #undef GAN_MAT_FPRINT
01897 #undef GAN_MAT_PRINT
01898 #undef GAN_MAT_FSCANF
01899 #undef GAN_MAT_FWRITE
01900 #undef GAN_MAT_FREAD
01901 #undef GAN_MAT_ZERO_Q
01902 #undef GAN_MAT_ZERO_S
01903 #undef GAN_MAT_COPY_Q
01904 #undef GAN_MAT_COPY_S
01905 #undef GAN_MAT_SCALE_Q
01906 #undef GAN_MAT_SCALE_S
01907 #undef GAN_MAT_SCALE_I
01908 #undef GAN_MAT_DIVIDE_Q
01909 #undef GAN_MAT_DIVIDE_S
01910 #undef GAN_MAT_DIVIDE_I
01911 #undef GAN_MAT_NEGATE_Q
01912 #undef GAN_MAT_NEGATE_S
01913 #undef GAN_MAT_NEGATE_I
01914 #undef GAN_MAT_UNIT_Q
01915 #undef GAN_MAT_UNIT_S
01916 #undef GAN_MAT_UNIT_I
01917 #undef GAN_MAT_ADD_Q
01918 #undef GAN_MAT_ADD_I1
01919 #undef GAN_MAT_ADD_I2
01920 #undef GAN_MAT_INCREMENT
01921 #undef GAN_MAT_ADD_S
01922 #undef GAN_MAT_SUB_Q
01923 #undef GAN_MAT_SUB_I1
01924 #undef GAN_MAT_SUB_I2
01925 #undef GAN_MAT_DECREMENT
01926 #undef GAN_MAT_SUB_S
01927 #undef GAN_VEC_OUTER_Q
01928 #undef GAN_VEC_OUTER_S
01929 #undef GAN_MAT_MULTV_Q
01930 #undef GAN_MAT_MULTV_S
01931 #undef GAN_MAT_MULTV_I
01932 #undef GAN_MATT_MULTV_Q
01933 #undef GAN_MATT_MULTV_S
01934 #undef GAN_MATT_MULTV_I
01935 #undef GAN_MAT_LMULTM_Q
01936 #undef GAN_MAT_LMULTM_S
01937 #undef GAN_MAT_LMULTMT_Q
01938 #undef GAN_MAT_LMULTMT_S
01939 #undef GAN_MAT_RMULTM_Q
01940 #undef GAN_MAT_RMULTM_S
01941 #undef GAN_MAT_RMULTMT_Q
01942 #undef GAN_MAT_RMULTMT_S
01943 #undef GAN_MAT_LMULTMT_SYM_Q
01944 #undef GAN_MAT_LMULTMT_SYM_S
01945 #undef GAN_MAT_RMULTMT_SYM_Q
01946 #undef GAN_MAT_RMULTMT_SYM_S
01947 #undef GAN_MAT_LMULTS_Q
01948 #undef GAN_MAT_LMULTS_S
01949 #undef GAN_MAT_RMULTS_Q
01950 #undef GAN_MAT_RMULTS_S
01951 #undef GAN_SYMMATL_LRMULT_Q
01952 #undef GAN_SYMMATL_LRMULT_S
01953 #undef GAN_SYMMATR_LRMULT_Q
01954 #undef GAN_SYMMATR_LRMULT_S
01955 #undef GAN_MAT_LMULTL_Q
01956 #undef GAN_MAT_LMULTL_S
01957 #undef GAN_MAT_LMULTL_I
01958 #undef GAN_MAT_LMULTLI_Q
01959 #undef GAN_MAT_LMULTLI_S
01960 #undef GAN_MAT_LMULTLI_I
01961 #undef GAN_MAT_LMULTLT_Q
01962 #undef GAN_MAT_LMULTLT_S
01963 #undef GAN_MAT_LMULTLT_I
01964 #undef GAN_MAT_LMULTLIT_Q
01965 #undef GAN_MAT_LMULTLIT_S
01966 #undef GAN_MAT_LMULTLIT_I
01967 #undef GAN_MAT_RMULTL_Q
01968 #undef GAN_MAT_RMULTL_S
01969 #undef GAN_MAT_RMULTL_I
01970 #undef GAN_MAT_RMULTLI_Q
01971 #undef GAN_MAT_RMULTLI_S
01972 #undef GAN_MAT_RMULTLI_I
01973 #undef GAN_MAT_RMULTLT_Q
01974 #undef GAN_MAT_RMULTLT_S
01975 #undef GAN_MAT_RMULTLT_I
01976 #undef GAN_MAT_RMULTLIT_Q
01977 #undef GAN_MAT_RMULTLIT_S
01978 #undef GAN_MAT_RMULTLIT_I
01979 #undef GAN_MAT_SRMULTT_Q
01980 #undef GAN_MAT_SRMULTT_S
01981 #undef GAN_MAT_SRMULTT_I
01982 #undef GAN_MAT_SLMULTT_Q
01983 #undef GAN_MAT_SLMULTT_S
01984 #undef GAN_MAT_SLMULTT_I
01985 #undef GAN_MAT_RMULTLIT_S
01986 #undef GAN_MAT_SUMSQR_Q
01987 #undef GAN_MAT_SUMSQR_S
01988 #undef GAN_MAT_FNORM_Q
01989 #undef GAN_MAT_FNORM_S
01990 #undef GAN_MAT_FROM_MAT_Q
01991 #undef GAN_MAT_FROM_MAT_S
01992 #undef GAN_MAT_FROM_SQUMAT_Q
01993 #undef GAN_MAT_FROM_SQUMAT_S
01994 #undef GAN_SQUMAT_FROM_SQUMAT_Q
01995 #undef GAN_SQUMAT_FROM_SQUMAT_S
01996 
01997 /* declare functions specific to symmetric 4x4 matrices */
02011 /* This library is free software; you can redistribute it and/or
02012    modify it under the terms of the GNU Lesser General Public
02013    License as published by the Free Software Foundation; either
02014    version 2.1 of the License, or (at your option) any later version.
02015 
02016    This library is distributed in the hope that it will be useful,
02017    but WITHOUT ANY WARRANTY; without even the implied warranty of
02018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02019    Lesser General Public License for more details.
02020 
02021    You should have received a copy of the GNU Lesser General Public
02022    License along with this library; if not, write to the Free Software
02023    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02024 */
02025 
02026 #ifndef _GAN_4X4SYMMAT_H
02027 
02042 Gan_SquMatrix44 *
02043     gan_symmat44_fill_q ( Gan_SquMatrix44 *A,
02044                           double XX,
02045                           double YX, double YY,
02046                           double ZX, double ZY, double ZZ,
02047                           double WX, double WY, double WZ, double WW );
02048 
02070 void gan_symmat44_get_parts_q ( const Gan_SquMatrix44 *A,
02071                                 Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s);
02072 
02086 void gan_symmat44_get_blocks_q ( const Gan_SquMatrix44 *A,
02087                                  Gan_SquMatrix22 *B, Gan_Matrix22 *C,
02088                                  Gan_SquMatrix22 *D );
02089 
02112 Gan_SquMatrix44 *gan_symmat44_set_parts_q ( Gan_SquMatrix44 *A,
02113                                             const Gan_SquMatrix33 *B,
02114                                             const Gan_Vector3 *p, double s );
02115 
02129 Gan_SquMatrix44 *gan_symmat44_set_blocks_q ( Gan_SquMatrix44 *A,
02130                                              const Gan_SquMatrix22 *B,
02131                                              const Gan_Matrix22 *C,
02132                                              const Gan_SquMatrix22 *D );
02133 
02139 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02140 
02141 #define GAN_MATTYPE Gan_SquMatrix44
02142 #define GAN_MATRIX_TYPE Gan_SquMatrix
02143 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
02144 #define GAN_VECTOR_TYPE Gan_Vector
02145 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
02146 #define GAN_REALTYPE double
02147 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
02148 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
02149 #define GAN_VECTYPE1 Gan_Vector4
02150 #define GAN_VECTYPE2 Gan_Vector4
02151 #define GAN_FIXED_MATRIX_TYPE GAN_SYMMETRIC_MATRIX44
02152 #define GAN_MAT_FPRINT      gan_symmat44_fprint
02153 #define GAN_MAT_PRINT       gan_symmat44_print
02154 #define GAN_MAT_FSCANF      gan_symmat44_fscanf
02155 #define GAN_MAT_FWRITE      gan_symmat44_fwrite
02156 #define GAN_MAT_FREAD       gan_symmat44_fread
02157 #define GAN_MAT_ZERO_Q      gan_symmat44_zero_q
02158 #define GAN_MAT_ZERO_S      gan_symmat44_zero_s
02159 #define GAN_MAT_COPY_Q      gan_symmat44_copy_q
02160 #define GAN_MAT_COPY_S      gan_symmat44_copy_s
02161 #define GAN_MAT_SCALE_Q     gan_symmat44_scale_q
02162 #define GAN_MAT_SCALE_S     gan_symmat44_scale_s
02163 #define GAN_MAT_SCALE_I     gan_symmat44_scale_i
02164 #define GAN_MAT_DIVIDE_Q    gan_symmat44_divide_q
02165 #define GAN_MAT_DIVIDE_S    gan_symmat44_divide_s
02166 #define GAN_MAT_DIVIDE_I    gan_symmat44_divide_i
02167 #define GAN_MAT_NEGATE_Q    gan_symmat44_negate_q
02168 #define GAN_MAT_NEGATE_S    gan_symmat44_negate_s
02169 #define GAN_MAT_NEGATE_I    gan_symmat44_negate_i
02170 #define GAN_MAT_UNIT_Q      gan_symmat44_unit_q
02171 #define GAN_MAT_UNIT_S      gan_symmat44_unit_s
02172 #define GAN_MAT_UNIT_I      gan_symmat44_unit_i
02173 #define GAN_MAT_ADD_Q       gan_symmat44_add_q
02174 #define GAN_MAT_ADD_I1      gan_symmat44_add_i1
02175 #define GAN_MAT_ADD_I2      gan_symmat44_add_i2
02176 #define GAN_MAT_INCREMENT   gan_symmat44_increment
02177 #define GAN_MAT_ADD_S       gan_symmat44_add_s
02178 #define GAN_MAT_SUB_Q       gan_symmat44_sub_q
02179 #define GAN_MAT_SUB_I1      gan_symmat44_sub_i1
02180 #define GAN_MAT_SUB_I2      gan_symmat44_sub_i2
02181 #define GAN_MAT_DECREMENT   gan_symmat44_decrement
02182 #define GAN_MAT_SUB_S       gan_symmat44_sub_s
02183 #define GAN_MAT_MULTV_Q     gan_symmat44_multv4_q
02184 #define GAN_MAT_MULTV_S     gan_symmat44_multv4_s
02185 #define GAN_MAT_SUMSQR_Q    gan_symmat44_sumsqr_q
02186 #define GAN_MAT_SUMSQR_S    gan_symmat44_sumsqr_s
02187 #define GAN_MAT_FNORM_Q     gan_symmat44_Fnorm_q
02188 #define GAN_MAT_FNORM_S     gan_symmat44_Fnorm_s
02189 
02190 #define GAN_SQUMAT_IDENT_Q    gan_symmat44_ident_q
02191 #define GAN_SQUMAT_IDENT_S    gan_symmat44_ident_s
02192 #define GAN_SQUMAT_INVERT     gan_symmat44_invert
02193 #define GAN_SQUMAT_INVERT_Q   gan_symmat44_invert_q
02194 #define GAN_SQUMAT_INVERT_S   gan_symmat44_invert_s
02195 #define GAN_SQUMAT_INVERT_I   gan_symmat44_invert_i
02196 #define GAN_SQUMAT_DET_Q      gan_symmat44_det_q
02197 #define GAN_SQUMAT_DET_S      gan_symmat44_det_s
02198 #define GAN_SQUMAT_TRACE_Q    gan_symmat44_trace_q
02199 #define GAN_SQUMAT_TRACE_S    gan_symmat44_trace_s
02200 
02201 #define GAN_VEC_OUTER_SYM_Q gan_vec44_outer_sym_q
02202 #define GAN_VEC_OUTER_SYM_S gan_vec44_outer_sym_s
02203 #define GAN_SYMMAT_CHOLESKY   gan_symmat44_cholesky
02204 #define GAN_SYMMAT_CHOLESKY_Q gan_symmat44_cholesky_q
02205 #define GAN_SYMMAT_CHOLESKY_S gan_symmat44_cholesky_s
02206 #define GAN_SYMMAT_CHOLESKY_I gan_symmat44_cholesky_i
02207 
02208 #ifndef _GAN_4X4SYMMAT_H
02209 #define _GAN_4X4SYMMAT_H
02210 
02211 
02212 #endif /* #ifndef _GAN_4X4SYMMAT_H */
02213 
02226 /* This library is free software; you can redistribute it and/or
02227    modify it under the terms of the GNU Lesser General Public
02228    License as published by the Free Software Foundation; either
02229    version 2.1 of the License, or (at your option) any later version.
02230 
02231    This library is distributed in the hope that it will be useful,
02232    but WITHOUT ANY WARRANTY; without even the implied warranty of
02233    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02234    Lesser General Public License for more details.
02235 
02236    You should have received a copy of the GNU Lesser General Public
02237    License along with this library; if not, write to the Free Software
02238    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02239 */
02240 
02241 /* function declarations for functions common to all small symmetric matrix
02242  * types */
02243 
02244 
02245 
02246 /* documentation for macros defined in individual header files */
02247 
02258 Gan_SquMatrix44 *gan_vec44_outer_sym_q ( const Gan_Vector4 *p, Gan_SquMatrix44 *A );
02259 
02281 Gan_SquMatrix44 *gan_symmat44_cholesky_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02282 
02291 Gan_SquMatrix44 *gan_symmat44_cholesky_i ( Gan_SquMatrix44 *A );
02292 
02298 #undef GAN_VEC_OUTER_SYM_Q
02299 #undef GAN_VEC_OUTER_SYM_S
02300 #undef GAN_SYMMAT_CHOLESKY
02301 #undef GAN_SYMMAT_CHOLESKY_Q
02302 #undef GAN_SYMMAT_CHOLESKY_S
02303 #undef GAN_SYMMAT_CHOLESKY_I
02304 
02317 /* This library is free software; you can redistribute it and/or
02318    modify it under the terms of the GNU Lesser General Public
02319    License as published by the Free Software Foundation; either
02320    version 2.1 of the License, or (at your option) any later version.
02321 
02322    This library is distributed in the hope that it will be useful,
02323    but WITHOUT ANY WARRANTY; without even the implied warranty of
02324    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02325    Lesser General Public License for more details.
02326 
02327    You should have received a copy of the GNU Lesser General Public
02328    License along with this library; if not, write to the Free Software
02329    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02330 */
02331 
02332 /* function declarations for functions common to all small square matrix
02333  * types */
02334 
02335 
02336 
02337 /* documentation for macros defined in individual header files */
02338 
02351 Gan_SquMatrix44 *gan_symmat44_ident_q ( Gan_SquMatrix44 *A );
02352 
02403 Gan_SquMatrix44 *gan_symmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02404 
02413 Gan_SquMatrix44 *gan_symmat44_invert_i ( Gan_SquMatrix44 *A );
02414 
02429 double gan_symmat44_det_q ( const Gan_SquMatrix44 *A );
02430 
02436 double gan_symmat44_trace_q ( const Gan_SquMatrix44 *A );
02437 
02443 #undef GAN_SQUMAT_IDENT_Q
02444 #undef GAN_SQUMAT_IDENT_S
02445 #undef GAN_SQUMAT_TPOSE_Q
02446 #undef GAN_SQUMAT_TPOSE_S
02447 #undef GAN_SQUMAT_TPOSE_I
02448 #undef GAN_MAT_SADDT_Q
02449 #undef GAN_MAT_SADDT_S
02450 #undef GAN_SQUMATI_MULTV_Q
02451 #undef GAN_SQUMATI_MULTV_S
02452 #undef GAN_SQUMATI_MULTV_I
02453 #undef GAN_SQUMATIT_MULTV_Q
02454 #undef GAN_SQUMATIT_MULTV_S
02455 #undef GAN_SQUMATIT_MULTV_I
02456 #undef GAN_SQUMAT_INVERT
02457 #undef GAN_SQUMAT_INVERT_Q
02458 #undef GAN_SQUMAT_INVERT_S
02459 #undef GAN_SQUMAT_INVERT_I
02460 #undef GAN_SQUMAT_ADJOINT_Q
02461 #undef GAN_SQUMAT_ADJOINT_S
02462 #undef GAN_SQUMAT_ADJOINTT_Q
02463 #undef GAN_SQUMAT_ADJOINTT_S
02464 #undef GAN_SQUMAT_DET_Q
02465 #undef GAN_SQUMAT_DET_S
02466 #undef GAN_SQUMAT_TRACE_Q
02467 #undef GAN_SQUMAT_TRACE_S
02468 
02481 /* This library is free software; you can redistribute it and/or
02482    modify it under the terms of the GNU Lesser General Public
02483    License as published by the Free Software Foundation; either
02484    version 2.1 of the License, or (at your option) any later version.
02485 
02486    This library is distributed in the hope that it will be useful,
02487    but WITHOUT ANY WARRANTY; without even the implied warranty of
02488    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02489    Lesser General Public License for more details.
02490 
02491    You should have received a copy of the GNU Lesser General Public
02492    License along with this library; if not, write to the Free Software
02493    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02494 */
02495 
02496 /* function declarations for functions common to all small vector types */
02497 
02498 
02499 
02500 /* documentation for macros defined in individual header files */
02501 
02512 Gan_SquMatrix44 *gan_symmat44_zero_q ( const Gan_SquMatrix44 *A );
02513 
02530 Gan_SquMatrix44 *gan_symmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02531 
02549 Gan_SquMatrix44 *gan_symmat44_scale_q ( Gan_SquMatrix44 *A, double a,
02550                                Gan_SquMatrix44 *B );
02551 
02559 Gan_SquMatrix44 *gan_symmat44_scale_i ( Gan_SquMatrix44 *A, double a );
02560 
02569 Gan_SquMatrix44 *gan_symmat44_divide_q ( Gan_SquMatrix44 *A, double a,
02570                                 Gan_SquMatrix44 *B );
02571 
02579 Gan_SquMatrix44 *gan_symmat44_divide_i ( Gan_SquMatrix44 *A, double a );
02580 
02588 Gan_SquMatrix44 *gan_symmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02589 
02597 Gan_SquMatrix44 *gan_symmat44_negate_i ( Gan_SquMatrix44 *A );
02598 
02606 Gan_SquMatrix44 *gan_symmat44_unit_i ( Gan_SquMatrix44 *A );
02607 
02625 Gan_SquMatrix44 *gan_symmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02626 
02635 Gan_SquMatrix44 *gan_symmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02636 
02645 Gan_SquMatrix44 *gan_symmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02646 
02655 Gan_SquMatrix44 *gan_symmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02656 
02674 Gan_SquMatrix44 *gan_symmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
02675 
02684 Gan_SquMatrix44 *gan_symmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02685 
02694 Gan_SquMatrix44 *gan_symmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02695 
02704 Gan_SquMatrix44 *gan_symmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
02705 
02724 Gan_Vector4 *gan_symmat44_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
02725                                 Gan_Vector4 *q );
02726 
02727 
02728 
02729 
02801 double gan_symmat44_sumsqr_q ( const Gan_SquMatrix44 *A );
02802 
02809 double gan_symmat44_Fnorm_q ( const Gan_SquMatrix44 *A );
02810 
02841 /* This library is free software; you can redistribute it and/or
02842    modify it under the terms of the GNU Lesser General Public
02843    License as published by the Free Software Foundation; either
02844    version 2.1 of the License, or (at your option) any later version.
02845 
02846    This library is distributed in the hope that it will be useful,
02847    but WITHOUT ANY WARRANTY; without even the implied warranty of
02848    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02849    Lesser General Public License for more details.
02850 
02851    You should have received a copy of the GNU Lesser General Public
02852    License along with this library; if not, write to the Free Software
02853    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02854 */
02855 
02856 #undef GAN_MATTYPE
02857 #undef GAN_MATRIX_TYPE
02858 #undef GAN_SQUMATRIX_TYPE
02859 #undef GAN_VECTOR_TYPE
02860 #undef GAN_MAT_ELEMENT_TYPE
02861 #undef GAN_REALTYPE
02862 #undef GAN_FWRITE_LENDIAN
02863 #undef GAN_FREAD_LENDIAN
02864 #undef GAN_VECTYPE1
02865 #undef GAN_VECTYPE2
02866 #undef GAN_MATTYPEL
02867 #undef GAN_MATTYPER
02868 #undef GAN_SQUMATTYPEL
02869 #undef GAN_SQUMATTYPER
02870 #undef GAN_FIXED_MATRIX_TYPE
02871 #undef GAN_MAT_FPRINT
02872 #undef GAN_MAT_PRINT
02873 #undef GAN_MAT_FSCANF
02874 #undef GAN_MAT_FWRITE
02875 #undef GAN_MAT_FREAD
02876 #undef GAN_MAT_ZERO_Q
02877 #undef GAN_MAT_ZERO_S
02878 #undef GAN_MAT_COPY_Q
02879 #undef GAN_MAT_COPY_S
02880 #undef GAN_MAT_SCALE_Q
02881 #undef GAN_MAT_SCALE_S
02882 #undef GAN_MAT_SCALE_I
02883 #undef GAN_MAT_DIVIDE_Q
02884 #undef GAN_MAT_DIVIDE_S
02885 #undef GAN_MAT_DIVIDE_I
02886 #undef GAN_MAT_NEGATE_Q
02887 #undef GAN_MAT_NEGATE_S
02888 #undef GAN_MAT_NEGATE_I
02889 #undef GAN_MAT_UNIT_Q
02890 #undef GAN_MAT_UNIT_S
02891 #undef GAN_MAT_UNIT_I
02892 #undef GAN_MAT_ADD_Q
02893 #undef GAN_MAT_ADD_I1
02894 #undef GAN_MAT_ADD_I2
02895 #undef GAN_MAT_INCREMENT
02896 #undef GAN_MAT_ADD_S
02897 #undef GAN_MAT_SUB_Q
02898 #undef GAN_MAT_SUB_I1
02899 #undef GAN_MAT_SUB_I2
02900 #undef GAN_MAT_DECREMENT
02901 #undef GAN_MAT_SUB_S
02902 #undef GAN_VEC_OUTER_Q
02903 #undef GAN_VEC_OUTER_S
02904 #undef GAN_MAT_MULTV_Q
02905 #undef GAN_MAT_MULTV_S
02906 #undef GAN_MAT_MULTV_I
02907 #undef GAN_MATT_MULTV_Q
02908 #undef GAN_MATT_MULTV_S
02909 #undef GAN_MATT_MULTV_I
02910 #undef GAN_MAT_LMULTM_Q
02911 #undef GAN_MAT_LMULTM_S
02912 #undef GAN_MAT_LMULTMT_Q
02913 #undef GAN_MAT_LMULTMT_S
02914 #undef GAN_MAT_RMULTM_Q
02915 #undef GAN_MAT_RMULTM_S
02916 #undef GAN_MAT_RMULTMT_Q
02917 #undef GAN_MAT_RMULTMT_S
02918 #undef GAN_MAT_LMULTMT_SYM_Q
02919 #undef GAN_MAT_LMULTMT_SYM_S
02920 #undef GAN_MAT_RMULTMT_SYM_Q
02921 #undef GAN_MAT_RMULTMT_SYM_S
02922 #undef GAN_MAT_LMULTS_Q
02923 #undef GAN_MAT_LMULTS_S
02924 #undef GAN_MAT_RMULTS_Q
02925 #undef GAN_MAT_RMULTS_S
02926 #undef GAN_SYMMATL_LRMULT_Q
02927 #undef GAN_SYMMATL_LRMULT_S
02928 #undef GAN_SYMMATR_LRMULT_Q
02929 #undef GAN_SYMMATR_LRMULT_S
02930 #undef GAN_MAT_LMULTL_Q
02931 #undef GAN_MAT_LMULTL_S
02932 #undef GAN_MAT_LMULTL_I
02933 #undef GAN_MAT_LMULTLI_Q
02934 #undef GAN_MAT_LMULTLI_S
02935 #undef GAN_MAT_LMULTLI_I
02936 #undef GAN_MAT_LMULTLT_Q
02937 #undef GAN_MAT_LMULTLT_S
02938 #undef GAN_MAT_LMULTLT_I
02939 #undef GAN_MAT_LMULTLIT_Q
02940 #undef GAN_MAT_LMULTLIT_S
02941 #undef GAN_MAT_LMULTLIT_I
02942 #undef GAN_MAT_RMULTL_Q
02943 #undef GAN_MAT_RMULTL_S
02944 #undef GAN_MAT_RMULTL_I
02945 #undef GAN_MAT_RMULTLI_Q
02946 #undef GAN_MAT_RMULTLI_S
02947 #undef GAN_MAT_RMULTLI_I
02948 #undef GAN_MAT_RMULTLT_Q
02949 #undef GAN_MAT_RMULTLT_S
02950 #undef GAN_MAT_RMULTLT_I
02951 #undef GAN_MAT_RMULTLIT_Q
02952 #undef GAN_MAT_RMULTLIT_S
02953 #undef GAN_MAT_RMULTLIT_I
02954 #undef GAN_MAT_SRMULTT_Q
02955 #undef GAN_MAT_SRMULTT_S
02956 #undef GAN_MAT_SRMULTT_I
02957 #undef GAN_MAT_SLMULTT_Q
02958 #undef GAN_MAT_SLMULTT_S
02959 #undef GAN_MAT_SLMULTT_I
02960 #undef GAN_MAT_RMULTLIT_S
02961 #undef GAN_MAT_SUMSQR_Q
02962 #undef GAN_MAT_SUMSQR_S
02963 #undef GAN_MAT_FNORM_Q
02964 #undef GAN_MAT_FNORM_S
02965 #undef GAN_MAT_FROM_MAT_Q
02966 #undef GAN_MAT_FROM_MAT_S
02967 #undef GAN_MAT_FROM_SQUMAT_Q
02968 #undef GAN_MAT_FROM_SQUMAT_S
02969 #undef GAN_SQUMAT_FROM_SQUMAT_Q
02970 #undef GAN_SQUMAT_FROM_SQUMAT_S
02971 
02972 /* declare functions specific to lower triangular 4x4 matrices */
02986 /* This library is free software; you can redistribute it and/or
02987    modify it under the terms of the GNU Lesser General Public
02988    License as published by the Free Software Foundation; either
02989    version 2.1 of the License, or (at your option) any later version.
02990 
02991    This library is distributed in the hope that it will be useful,
02992    but WITHOUT ANY WARRANTY; without even the implied warranty of
02993    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
02994    Lesser General Public License for more details.
02995 
02996    You should have received a copy of the GNU Lesser General Public
02997    License along with this library; if not, write to the Free Software
02998    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
02999 */
03000 
03001 #ifndef _GAN_4X4LTMAT_H
03002 
03019 Gan_SquMatrix44 *gan_ltmat44_fill_q (
03020                           Gan_SquMatrix44 *A,
03021                           double XX,
03022                           double YX, double YY,
03023                           double ZX, double ZY, double ZZ,
03024                           double WX, double WY, double WZ, double WW );
03025 
03045 void gan_ltmat44_get_parts_q ( const Gan_SquMatrix44 *A,
03046                                Gan_SquMatrix33 *B, Gan_Vector3 *p, double *s );
03047 
03070 Gan_SquMatrix44 *gan_ltmat44_set_parts_q ( Gan_SquMatrix44 *A,
03071                                            const Gan_SquMatrix33 *B,
03072                                            const Gan_Vector3 *p, double s );
03073 
03079 #endif /* #ifndef _GAN_4X4LTMAT_H */
03080 
03081 #define GAN_MATTYPE Gan_SquMatrix44
03082 #define GAN_MATRIX_TYPE Gan_SquMatrix
03083 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03084 #define GAN_VECTOR_TYPE Gan_Vector
03085 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03086 #define GAN_REALTYPE double
03087 #define GAN_FWRITE_LENDIAN gan_fwrite_lendian_f64
03088 #define GAN_FREAD_LENDIAN  gan_fread_lendian_f64
03089 #define GAN_VECTYPE1 Gan_Vector4
03090 #define GAN_VECTYPE2 Gan_Vector4
03091 #define GAN_SQUMATTYPEL Gan_SquMatrix44
03092 #define GAN_SQUMATTYPER Gan_SquMatrix44
03093 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03094 #define GAN_MAT_FPRINT     gan_ltmat44_fprint
03095 #define GAN_MAT_PRINT      gan_ltmat44_print
03096 #define GAN_MAT_FSCANF     gan_ltmat44_fscanf
03097 #define GAN_MAT_FWRITE     gan_ltmat44_fwrite
03098 #define GAN_MAT_FREAD      gan_ltmat44_fread
03099 #define GAN_MAT_ZERO_Q     gan_ltmat44_zero_q
03100 #define GAN_MAT_ZERO_S     gan_ltmat44_zero_s
03101 #define GAN_MAT_COPY_Q     gan_ltmat44_copy_q
03102 #define GAN_MAT_COPY_S     gan_ltmat44_copy_s
03103 #define GAN_MAT_SCALE_Q    gan_ltmat44_scale_q
03104 #define GAN_MAT_SCALE_S    gan_ltmat44_scale_s
03105 #define GAN_MAT_SCALE_I    gan_ltmat44_scale_i
03106 #define GAN_MAT_DIVIDE_Q   gan_ltmat44_divide_q
03107 #define GAN_MAT_DIVIDE_S   gan_ltmat44_divide_s
03108 #define GAN_MAT_DIVIDE_I   gan_ltmat44_divide_i
03109 #define GAN_MAT_NEGATE_Q   gan_ltmat44_negate_q
03110 #define GAN_MAT_NEGATE_S   gan_ltmat44_negate_s
03111 #define GAN_MAT_NEGATE_I   gan_ltmat44_negate_i
03112 #define GAN_MAT_UNIT_Q     gan_ltmat44_unit_q
03113 #define GAN_MAT_UNIT_S     gan_ltmat44_unit_s
03114 #define GAN_MAT_UNIT_I     gan_ltmat44_unit_i
03115 #define GAN_MAT_ADD_Q      gan_ltmat44_add_q
03116 #define GAN_MAT_ADD_I1     gan_ltmat44_add_i1
03117 #define GAN_MAT_ADD_I2     gan_ltmat44_add_i2
03118 #define GAN_MAT_INCREMENT  gan_ltmat44_increment
03119 #define GAN_MAT_ADD_S      gan_ltmat44_add_s
03120 #define GAN_MAT_SUB_Q      gan_ltmat44_sub_q
03121 #define GAN_MAT_SUB_I1     gan_ltmat44_sub_i1
03122 #define GAN_MAT_SUB_I2     gan_ltmat44_sub_i2
03123 #define GAN_MAT_DECREMENT  gan_ltmat44_decrement
03124 #define GAN_MAT_SUB_S      gan_ltmat44_sub_s
03125 #define GAN_MAT_MULTV_Q    gan_ltmat44_multv4_q
03126 #define GAN_MAT_MULTV_S    gan_ltmat44_multv4_s
03127 #define GAN_MAT_MULTV_I    gan_ltmat44_multv4_i
03128 #define GAN_MATT_MULTV_Q   gan_ltmat44T_multv4_q
03129 #define GAN_MATT_MULTV_S   gan_ltmat44T_multv4_s
03130 #define GAN_MATT_MULTV_I   gan_ltmat44T_multv4_i
03131 #define GAN_MAT_SRMULTT_Q  gan_ltmat44_srmultT_q
03132 #define GAN_MAT_SRMULTT_S  gan_ltmat44_srmultT_s
03133 #define GAN_MAT_SRMULTT_I  gan_ltmat44_srmultT_i
03134 #define GAN_MAT_SLMULTT_Q  gan_ltmat44_slmultT_q
03135 #define GAN_MAT_SLMULTT_S  gan_ltmat44_slmultT_s
03136 #define GAN_MAT_SLMULTT_I  gan_ltmat44_slmultT_i
03137 #define GAN_MAT_SUMSQR_Q   gan_ltmat44_sumsqr_q
03138 #define GAN_MAT_SUMSQR_S   gan_ltmat44_sumsqr_s
03139 #define GAN_MAT_FNORM_Q    gan_ltmat44_Fnorm_q
03140 #define GAN_MAT_FNORM_S    gan_ltmat44_Fnorm_s
03141 
03142 #define GAN_SQUMAT_IDENT_Q    gan_ltmat44_ident_q
03143 #define GAN_SQUMAT_IDENT_S    gan_ltmat44_ident_s
03144 #define GAN_SQUMATI_MULTV_Q   gan_ltmat44I_multv4_q
03145 #define GAN_SQUMATI_MULTV_S   gan_ltmat44I_multv4_s
03146 #define GAN_SQUMATI_MULTV_I   gan_ltmat44I_multv4_i
03147 #define GAN_SQUMATIT_MULTV_Q  gan_ltmat44IT_multv4_q
03148 #define GAN_SQUMATIT_MULTV_S  gan_ltmat44IT_multv4_s
03149 #define GAN_SQUMATIT_MULTV_I  gan_ltmat44IT_multv4_i
03150 #define GAN_SQUMAT_INVERT     gan_ltmat44_invert
03151 #define GAN_SQUMAT_INVERT_Q   gan_ltmat44_invert_q
03152 #define GAN_SQUMAT_INVERT_S   gan_ltmat44_invert_s
03153 #define GAN_SQUMAT_INVERT_I   gan_ltmat44_invert_i
03154 #define GAN_SQUMAT_DET_Q      gan_ltmat44_det_q
03155 #define GAN_SQUMAT_DET_S      gan_ltmat44_det_s
03156 #define GAN_SQUMAT_TRACE_Q    gan_ltmat44_trace_q
03157 #define GAN_SQUMAT_TRACE_S    gan_ltmat44_trace_s
03158 
03159 #ifndef _GAN_4X4LTMAT_H
03160 #define _GAN_4X4LTMAT_H
03161 
03162 
03163 #endif /* #ifndef _GAN_4X4LTMAT_H */
03164 
03177 /* This library is free software; you can redistribute it and/or
03178    modify it under the terms of the GNU Lesser General Public
03179    License as published by the Free Software Foundation; either
03180    version 2.1 of the License, or (at your option) any later version.
03181 
03182    This library is distributed in the hope that it will be useful,
03183    but WITHOUT ANY WARRANTY; without even the implied warranty of
03184    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03185    Lesser General Public License for more details.
03186 
03187    You should have received a copy of the GNU Lesser General Public
03188    License along with this library; if not, write to the Free Software
03189    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03190 */
03191 
03192 /* function declarations for functions common to all small square matrix
03193  * types */
03194 
03195 
03196 
03197 /* documentation for macros defined in individual header files */
03198 
03211 Gan_SquMatrix44 *gan_ltmat44_ident_q ( Gan_SquMatrix44 *A );
03212 
03250 Gan_Vector4 *gan_ltmat44I_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03251                                     Gan_Vector4 *q );
03252 
03261 Gan_Vector4 *gan_ltmat44I_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03262 
03271 Gan_Vector4 *gan_ltmat44IT_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03272                                      Gan_Vector4 *q );
03273 
03282 Gan_Vector4 *gan_ltmat44IT_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03283 
03301 Gan_SquMatrix44 *gan_ltmat44_invert_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03302 
03311 Gan_SquMatrix44 *gan_ltmat44_invert_i ( Gan_SquMatrix44 *A );
03312 
03327 double gan_ltmat44_det_q ( const Gan_SquMatrix44 *A );
03328 
03334 double gan_ltmat44_trace_q ( const Gan_SquMatrix44 *A );
03335 
03341 #undef GAN_SQUMAT_IDENT_Q
03342 #undef GAN_SQUMAT_IDENT_S
03343 #undef GAN_SQUMAT_TPOSE_Q
03344 #undef GAN_SQUMAT_TPOSE_S
03345 #undef GAN_SQUMAT_TPOSE_I
03346 #undef GAN_MAT_SADDT_Q
03347 #undef GAN_MAT_SADDT_S
03348 #undef GAN_SQUMATI_MULTV_Q
03349 #undef GAN_SQUMATI_MULTV_S
03350 #undef GAN_SQUMATI_MULTV_I
03351 #undef GAN_SQUMATIT_MULTV_Q
03352 #undef GAN_SQUMATIT_MULTV_S
03353 #undef GAN_SQUMATIT_MULTV_I
03354 #undef GAN_SQUMAT_INVERT
03355 #undef GAN_SQUMAT_INVERT_Q
03356 #undef GAN_SQUMAT_INVERT_S
03357 #undef GAN_SQUMAT_INVERT_I
03358 #undef GAN_SQUMAT_ADJOINT_Q
03359 #undef GAN_SQUMAT_ADJOINT_S
03360 #undef GAN_SQUMAT_ADJOINTT_Q
03361 #undef GAN_SQUMAT_ADJOINTT_S
03362 #undef GAN_SQUMAT_DET_Q
03363 #undef GAN_SQUMAT_DET_S
03364 #undef GAN_SQUMAT_TRACE_Q
03365 #undef GAN_SQUMAT_TRACE_S
03366 
03379 /* This library is free software; you can redistribute it and/or
03380    modify it under the terms of the GNU Lesser General Public
03381    License as published by the Free Software Foundation; either
03382    version 2.1 of the License, or (at your option) any later version.
03383 
03384    This library is distributed in the hope that it will be useful,
03385    but WITHOUT ANY WARRANTY; without even the implied warranty of
03386    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03387    Lesser General Public License for more details.
03388 
03389    You should have received a copy of the GNU Lesser General Public
03390    License along with this library; if not, write to the Free Software
03391    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03392 */
03393 
03394 /* function declarations for functions common to all small vector types */
03395 
03396 
03397 
03398 /* documentation for macros defined in individual header files */
03399 
03410 Gan_SquMatrix44 *gan_ltmat44_zero_q ( const Gan_SquMatrix44 *A );
03411 
03428 Gan_SquMatrix44 *gan_ltmat44_copy_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03429 
03447 Gan_SquMatrix44 *gan_ltmat44_scale_q ( Gan_SquMatrix44 *A, double a,
03448                                Gan_SquMatrix44 *B );
03449 
03457 Gan_SquMatrix44 *gan_ltmat44_scale_i ( Gan_SquMatrix44 *A, double a );
03458 
03467 Gan_SquMatrix44 *gan_ltmat44_divide_q ( Gan_SquMatrix44 *A, double a,
03468                                 Gan_SquMatrix44 *B );
03469 
03477 Gan_SquMatrix44 *gan_ltmat44_divide_i ( Gan_SquMatrix44 *A, double a );
03478 
03486 Gan_SquMatrix44 *gan_ltmat44_negate_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03487 
03495 Gan_SquMatrix44 *gan_ltmat44_negate_i ( Gan_SquMatrix44 *A );
03496 
03504 Gan_SquMatrix44 *gan_ltmat44_unit_i ( Gan_SquMatrix44 *A );
03505 
03523 Gan_SquMatrix44 *gan_ltmat44_add_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03524 
03533 Gan_SquMatrix44 *gan_ltmat44_add_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03534 
03543 Gan_SquMatrix44 *gan_ltmat44_add_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03544 
03553 Gan_SquMatrix44 *gan_ltmat44_increment ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03554 
03572 Gan_SquMatrix44 *gan_ltmat44_sub_q ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B, Gan_SquMatrix44 *C );
03573 
03582 Gan_SquMatrix44 *gan_ltmat44_sub_i1 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03583 
03592 Gan_SquMatrix44 *gan_ltmat44_sub_i2 ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03593 
03602 Gan_SquMatrix44 *gan_ltmat44_decrement ( Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03603 
03622 Gan_Vector4 *gan_ltmat44_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03623                                 Gan_Vector4 *q );
03624 
03633 Gan_Vector4 *gan_ltmat44_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03634 
03643 Gan_Vector4 *gan_ltmat44T_multv4_q ( const Gan_SquMatrix44 *A, Gan_Vector4 *p,
03644                                  Gan_Vector4 *q );
03645 
03654 Gan_Vector4 *gan_ltmat44T_multv4_i ( const Gan_SquMatrix44 *A, Gan_Vector4 *p );
03655 
03717 Gan_SquMatrix44 *gan_ltmat44_slmultT_q ( Gan_SquMatrix44 *A, const Gan_SquMatrix44 *B );
03718 
03728 Gan_SquMatrix44 *gan_ltmat44_slmultT_i ( Gan_SquMatrix44 *A );
03729 
03738 Gan_SquMatrix44 *gan_ltmat44_srmultT_q ( const Gan_SquMatrix44 *A, Gan_SquMatrix44 *B );
03739 
03749 Gan_SquMatrix44 *gan_ltmat44_srmultT_i ( Gan_SquMatrix44 *A );
03750 
03765 double gan_ltmat44_sumsqr_q ( const Gan_SquMatrix44 *A );
03766 
03773 double gan_ltmat44_Fnorm_q ( const Gan_SquMatrix44 *A );
03774 
03805 /* This library is free software; you can redistribute it and/or
03806    modify it under the terms of the GNU Lesser General Public
03807    License as published by the Free Software Foundation; either
03808    version 2.1 of the License, or (at your option) any later version.
03809 
03810    This library is distributed in the hope that it will be useful,
03811    but WITHOUT ANY WARRANTY; without even the implied warranty of
03812    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03813    Lesser General Public License for more details.
03814 
03815    You should have received a copy of the GNU Lesser General Public
03816    License along with this library; if not, write to the Free Software
03817    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03818 */
03819 
03820 #undef GAN_MATTYPE
03821 #undef GAN_MATRIX_TYPE
03822 #undef GAN_SQUMATRIX_TYPE
03823 #undef GAN_VECTOR_TYPE
03824 #undef GAN_MAT_ELEMENT_TYPE
03825 #undef GAN_REALTYPE
03826 #undef GAN_FWRITE_LENDIAN
03827 #undef GAN_FREAD_LENDIAN
03828 #undef GAN_VECTYPE1
03829 #undef GAN_VECTYPE2
03830 #undef GAN_MATTYPEL
03831 #undef GAN_MATTYPER
03832 #undef GAN_SQUMATTYPEL
03833 #undef GAN_SQUMATTYPER
03834 #undef GAN_FIXED_MATRIX_TYPE
03835 #undef GAN_MAT_FPRINT
03836 #undef GAN_MAT_PRINT
03837 #undef GAN_MAT_FSCANF
03838 #undef GAN_MAT_FWRITE
03839 #undef GAN_MAT_FREAD
03840 #undef GAN_MAT_ZERO_Q
03841 #undef GAN_MAT_ZERO_S
03842 #undef GAN_MAT_COPY_Q
03843 #undef GAN_MAT_COPY_S
03844 #undef GAN_MAT_SCALE_Q
03845 #undef GAN_MAT_SCALE_S
03846 #undef GAN_MAT_SCALE_I
03847 #undef GAN_MAT_DIVIDE_Q
03848 #undef GAN_MAT_DIVIDE_S
03849 #undef GAN_MAT_DIVIDE_I
03850 #undef GAN_MAT_NEGATE_Q
03851 #undef GAN_MAT_NEGATE_S
03852 #undef GAN_MAT_NEGATE_I
03853 #undef GAN_MAT_UNIT_Q
03854 #undef GAN_MAT_UNIT_S
03855 #undef GAN_MAT_UNIT_I
03856 #undef GAN_MAT_ADD_Q
03857 #undef GAN_MAT_ADD_I1
03858 #undef GAN_MAT_ADD_I2
03859 #undef GAN_MAT_INCREMENT
03860 #undef GAN_MAT_ADD_S
03861 #undef GAN_MAT_SUB_Q
03862 #undef GAN_MAT_SUB_I1
03863 #undef GAN_MAT_SUB_I2
03864 #undef GAN_MAT_DECREMENT
03865 #undef GAN_MAT_SUB_S
03866 #undef GAN_VEC_OUTER_Q
03867 #undef GAN_VEC_OUTER_S
03868 #undef GAN_MAT_MULTV_Q
03869 #undef GAN_MAT_MULTV_S
03870 #undef GAN_MAT_MULTV_I
03871 #undef GAN_MATT_MULTV_Q
03872 #undef GAN_MATT_MULTV_S
03873 #undef GAN_MATT_MULTV_I
03874 #undef GAN_MAT_LMULTM_Q
03875 #undef GAN_MAT_LMULTM_S
03876 #undef GAN_MAT_LMULTMT_Q
03877 #undef GAN_MAT_LMULTMT_S
03878 #undef GAN_MAT_RMULTM_Q
03879 #undef GAN_MAT_RMULTM_S
03880 #undef GAN_MAT_RMULTMT_Q
03881 #undef GAN_MAT_RMULTMT_S
03882 #undef GAN_MAT_LMULTMT_SYM_Q
03883 #undef GAN_MAT_LMULTMT_SYM_S
03884 #undef GAN_MAT_RMULTMT_SYM_Q
03885 #undef GAN_MAT_RMULTMT_SYM_S
03886 #undef GAN_MAT_LMULTS_Q
03887 #undef GAN_MAT_LMULTS_S
03888 #undef GAN_MAT_RMULTS_Q
03889 #undef GAN_MAT_RMULTS_S
03890 #undef GAN_SYMMATL_LRMULT_Q
03891 #undef GAN_SYMMATL_LRMULT_S
03892 #undef GAN_SYMMATR_LRMULT_Q
03893 #undef GAN_SYMMATR_LRMULT_S
03894 #undef GAN_MAT_LMULTL_Q
03895 #undef GAN_MAT_LMULTL_S
03896 #undef GAN_MAT_LMULTL_I
03897 #undef GAN_MAT_LMULTLI_Q
03898 #undef GAN_MAT_LMULTLI_S
03899 #undef GAN_MAT_LMULTLI_I
03900 #undef GAN_MAT_LMULTLT_Q
03901 #undef GAN_MAT_LMULTLT_S
03902 #undef GAN_MAT_LMULTLT_I
03903 #undef GAN_MAT_LMULTLIT_Q
03904 #undef GAN_MAT_LMULTLIT_S
03905 #undef GAN_MAT_LMULTLIT_I
03906 #undef GAN_MAT_RMULTL_Q
03907 #undef GAN_MAT_RMULTL_S
03908 #undef GAN_MAT_RMULTL_I
03909 #undef GAN_MAT_RMULTLI_Q
03910 #undef GAN_MAT_RMULTLI_S
03911 #undef GAN_MAT_RMULTLI_I
03912 #undef GAN_MAT_RMULTLT_Q
03913 #undef GAN_MAT_RMULTLT_S
03914 #undef GAN_MAT_RMULTLT_I
03915 #undef GAN_MAT_RMULTLIT_Q
03916 #undef GAN_MAT_RMULTLIT_S
03917 #undef GAN_MAT_RMULTLIT_I
03918 #undef GAN_MAT_SRMULTT_Q
03919 #undef GAN_MAT_SRMULTT_S
03920 #undef GAN_MAT_SRMULTT_I
03921 #undef GAN_MAT_SLMULTT_Q
03922 #undef GAN_MAT_SLMULTT_S
03923 #undef GAN_MAT_SLMULTT_I
03924 #undef GAN_MAT_RMULTLIT_S
03925 #undef GAN_MAT_SUMSQR_Q
03926 #undef GAN_MAT_SUMSQR_S
03927 #undef GAN_MAT_FNORM_Q
03928 #undef GAN_MAT_FNORM_S
03929 #undef GAN_MAT_FROM_MAT_Q
03930 #undef GAN_MAT_FROM_MAT_S
03931 #undef GAN_MAT_FROM_SQUMAT_Q
03932 #undef GAN_MAT_FROM_SQUMAT_S
03933 #undef GAN_SQUMAT_FROM_SQUMAT_Q
03934 #undef GAN_SQUMAT_FROM_SQUMAT_S
03935 
03936 /* declare functions specific to upper triangular 4x4 matrices */
03950 /* This library is free software; you can redistribute it and/or
03951    modify it under the terms of the GNU Lesser General Public
03952    License as published by the Free Software Foundation; either
03953    version 2.1 of the License, or (at your option) any later version.
03954 
03955    This library is distributed in the hope that it will be useful,
03956    but WITHOUT ANY WARRANTY; without even the implied warranty of
03957    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03958    Lesser General Public License for more details.
03959 
03960    You should have received a copy of the GNU Lesser General Public
03961    License along with this library; if not, write to the Free Software
03962    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
03963 */
03964 
03965 #define GAN_MATTYPE Gan_SquMatrix44
03966 #define GAN_MATRIX_TYPE Gan_SquMatrix
03967 #define GAN_SQUMATRIX_TYPE Gan_SquMatrix
03968 #define GAN_VECTOR_TYPE Gan_Vector
03969 #define GAN_MAT_ELEMENT_TYPE GAN_DOUBLE
03970 #define GAN_REALTYPE double
03971 #define GAN_MAT_FPRINT   gan_ltmat44T_fprint
03972 #define GAN_MAT_PRINT    gan_ltmat44T_print
03973 #define GAN_MAT_FSCANF   gan_ltmat44T_fscanf
03974 #define GAN_FIXED_MATRIX_TYPE GAN_LOWER_TRI_MATRIX44
03975 
03976 #define gan_ltmat44T_fwrite gan_ltmat44_fwrite
03977 #define gan_ltmat44T_fread  gan_ltmat44_fread
03978 
03991 /* This library is free software; you can redistribute it and/or
03992    modify it under the terms of the GNU Lesser General Public
03993    License as published by the Free Software Foundation; either
03994    version 2.1 of the License, or (at your option) any later version.
03995 
03996    This library is distributed in the hope that it will be useful,
03997    but WITHOUT ANY WARRANTY; without even the implied warranty of
03998    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
03999    Lesser General Public License for more details.
04000 
04001    You should have received a copy of the GNU Lesser General Public
04002    License along with this library; if not, write to the Free Software
04003    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04004 */
04005 
04006 /* function declarations for functions common to all small square matrix
04007  * types */
04008 
04009 
04010 
04011 /* documentation for macros defined in individual header files */
04012 
04079 #undef GAN_SQUMAT_IDENT_Q
04080 #undef GAN_SQUMAT_IDENT_S
04081 #undef GAN_SQUMAT_TPOSE_Q
04082 #undef GAN_SQUMAT_TPOSE_S
04083 #undef GAN_SQUMAT_TPOSE_I
04084 #undef GAN_MAT_SADDT_Q
04085 #undef GAN_MAT_SADDT_S
04086 #undef GAN_SQUMATI_MULTV_Q
04087 #undef GAN_SQUMATI_MULTV_S
04088 #undef GAN_SQUMATI_MULTV_I
04089 #undef GAN_SQUMATIT_MULTV_Q
04090 #undef GAN_SQUMATIT_MULTV_S
04091 #undef GAN_SQUMATIT_MULTV_I
04092 #undef GAN_SQUMAT_INVERT
04093 #undef GAN_SQUMAT_INVERT_Q
04094 #undef GAN_SQUMAT_INVERT_S
04095 #undef GAN_SQUMAT_INVERT_I
04096 #undef GAN_SQUMAT_ADJOINT_Q
04097 #undef GAN_SQUMAT_ADJOINT_S
04098 #undef GAN_SQUMAT_ADJOINTT_Q
04099 #undef GAN_SQUMAT_ADJOINTT_S
04100 #undef GAN_SQUMAT_DET_Q
04101 #undef GAN_SQUMAT_DET_S
04102 #undef GAN_SQUMAT_TRACE_Q
04103 #undef GAN_SQUMAT_TRACE_S
04104 
04117 /* This library is free software; you can redistribute it and/or
04118    modify it under the terms of the GNU Lesser General Public
04119    License as published by the Free Software Foundation; either
04120    version 2.1 of the License, or (at your option) any later version.
04121 
04122    This library is distributed in the hope that it will be useful,
04123    but WITHOUT ANY WARRANTY; without even the implied warranty of
04124    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04125    Lesser General Public License for more details.
04126 
04127    You should have received a copy of the GNU Lesser General Public
04128    License along with this library; if not, write to the Free Software
04129    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04130 */
04131 
04132 /* function declarations for functions common to all small vector types */
04133 
04134 
04135 
04136 /* documentation for macros defined in individual header files */
04137 
04308 /* This library is free software; you can redistribute it and/or
04309    modify it under the terms of the GNU Lesser General Public
04310    License as published by the Free Software Foundation; either
04311    version 2.1 of the License, or (at your option) any later version.
04312 
04313    This library is distributed in the hope that it will be useful,
04314    but WITHOUT ANY WARRANTY; without even the implied warranty of
04315    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
04316    Lesser General Public License for more details.
04317 
04318    You should have received a copy of the GNU Lesser General Public
04319    License along with this library; if not, write to the Free Software
04320    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
04321 */
04322 
04323 #undef GAN_MATTYPE
04324 #undef GAN_MATRIX_TYPE
04325 #undef GAN_SQUMATRIX_TYPE
04326 #undef GAN_VECTOR_TYPE
04327 #undef GAN_MAT_ELEMENT_TYPE
04328 #undef GAN_REALTYPE
04329 #undef GAN_FWRITE_LENDIAN
04330 #undef GAN_FREAD_LENDIAN
04331 #undef GAN_VECTYPE1
04332 #undef GAN_VECTYPE2
04333 #undef GAN_MATTYPEL
04334 #undef GAN_MATTYPER
04335 #undef GAN_SQUMATTYPEL
04336 #undef GAN_SQUMATTYPER
04337 #undef GAN_FIXED_MATRIX_TYPE
04338 #undef GAN_MAT_FPRINT
04339 #undef GAN_MAT_PRINT
04340 #undef GAN_MAT_FSCANF
04341 #undef GAN_MAT_FWRITE
04342 #undef GAN_MAT_FREAD
04343 #undef GAN_MAT_ZERO_Q
04344 #undef GAN_MAT_ZERO_S
04345 #undef GAN_MAT_COPY_Q
04346 #undef GAN_MAT_COPY_S
04347 #undef GAN_MAT_SCALE_Q
04348 #undef GAN_MAT_SCALE_S
04349 #undef GAN_MAT_SCALE_I
04350 #undef GAN_MAT_DIVIDE_Q
04351 #undef GAN_MAT_DIVIDE_S
04352 #undef GAN_MAT_DIVIDE_I
04353 #undef GAN_MAT_NEGATE_Q
04354 #undef GAN_MAT_NEGATE_S
04355 #undef GAN_MAT_NEGATE_I
04356 #undef GAN_MAT_UNIT_Q
04357 #undef GAN_MAT_UNIT_S
04358 #undef GAN_MAT_UNIT_I
04359 #undef GAN_MAT_ADD_Q
04360 #undef GAN_MAT_ADD_I1
04361 #undef GAN_MAT_ADD_I2
04362 #undef GAN_MAT_INCREMENT
04363 #undef GAN_MAT_ADD_S
04364 #undef GAN_MAT_SUB_Q
04365 #undef GAN_MAT_SUB_I1
04366 #undef GAN_MAT_SUB_I2
04367 #undef GAN_MAT_DECREMENT
04368 #undef GAN_MAT_SUB_S
04369 #undef GAN_VEC_OUTER_Q
04370 #undef GAN_VEC_OUTER_S
04371 #undef GAN_MAT_MULTV_Q
04372 #undef GAN_MAT_MULTV_S
04373 #undef GAN_MAT_MULTV_I
04374 #undef GAN_MATT_MULTV_Q
04375 #undef GAN_MATT_MULTV_S
04376 #undef GAN_MATT_MULTV_I
04377 #undef GAN_MAT_LMULTM_Q
04378 #undef GAN_MAT_LMULTM_S
04379 #undef GAN_MAT_LMULTMT_Q
04380 #undef GAN_MAT_LMULTMT_S
04381 #undef GAN_MAT_RMULTM_Q
04382 #undef GAN_MAT_RMULTM_S
04383 #undef GAN_MAT_RMULTMT_Q
04384 #undef GAN_MAT_RMULTMT_S
04385 #undef GAN_MAT_LMULTMT_SYM_Q
04386 #undef GAN_MAT_LMULTMT_SYM_S
04387 #undef GAN_MAT_RMULTMT_SYM_Q
04388 #undef GAN_MAT_RMULTMT_SYM_S
04389 #undef GAN_MAT_LMULTS_Q
04390 #undef GAN_MAT_LMULTS_S
04391 #undef GAN_MAT_RMULTS_Q
04392 #undef GAN_MAT_RMULTS_S
04393 #undef GAN_SYMMATL_LRMULT_Q
04394 #undef GAN_SYMMATL_LRMULT_S
04395 #undef GAN_SYMMATR_LRMULT_Q
04396 #undef GAN_SYMMATR_LRMULT_S
04397 #undef GAN_MAT_LMULTL_Q
04398 #undef GAN_MAT_LMULTL_S
04399 #undef GAN_MAT_LMULTL_I
04400 #undef GAN_MAT_LMULTLI_Q
04401 #undef GAN_MAT_LMULTLI_S
04402 #undef GAN_MAT_LMULTLI_I
04403 #undef GAN_MAT_LMULTLT_Q
04404 #undef GAN_MAT_LMULTLT_S
04405 #undef GAN_MAT_LMULTLT_I
04406 #undef GAN_MAT_LMULTLIT_Q
04407 #undef GAN_MAT_LMULTLIT_S
04408 #undef GAN_MAT_LMULTLIT_I
04409 #undef GAN_MAT_RMULTL_Q
04410 #undef GAN_MAT_RMULTL_S
04411 #undef GAN_MAT_RMULTL_I
04412 #undef GAN_MAT_RMULTLI_Q
04413 #undef GAN_MAT_RMULTLI_S
04414 #undef GAN_MAT_RMULTLI_I
04415 #undef GAN_MAT_RMULTLT_Q
04416 #undef GAN_MAT_RMULTLT_S
04417 #undef GAN_MAT_RMULTLT_I
04418 #undef GAN_MAT_RMULTLIT_Q
04419 #undef GAN_MAT_RMULTLIT_S
04420 #undef GAN_MAT_RMULTLIT_I
04421 #undef GAN_MAT_SRMULTT_Q
04422 #undef GAN_MAT_SRMULTT_S
04423 #undef GAN_MAT_SRMULTT_I
04424 #undef GAN_MAT_SLMULTT_Q
04425 #undef GAN_MAT_SLMULTT_S
04426 #undef GAN_MAT_SLMULTT_I
04427 #undef GAN_MAT_RMULTLIT_S
04428 #undef GAN_MAT_SUMSQR_Q
04429 #undef GAN_MAT_SUMSQR_S
04430 #undef GAN_MAT_FNORM_Q
04431 #undef GAN_MAT_FNORM_S
04432 #undef GAN_MAT_FROM_MAT_Q
04433 #undef GAN_MAT_FROM_MAT_S
04434 #undef GAN_MAT_FROM_SQUMAT_Q
04435 #undef GAN_MAT_FROM_SQUMAT_S
04436 #undef GAN_SQUMAT_FROM_SQUMAT_Q
04437 #undef GAN_SQUMAT_FROM_SQUMAT_S
04438 
04447 #ifdef __cplusplus
04448 }
04449 #endif
04450 
04451 #endif /* #ifndef _GAN_4X4MATRIX_H */

Generated on Sat May 21 23:52:47 2005 by  doxygen 1.4.3