root/gdb_bdm @ 62

Revision 37, 1.1 kB (checked in by smidl, 17 years ago)

Matrix in Cholesky decomposition, Square-root Kalman and many bug fixes

Line 
1# This file defines handy gdb macros for printing out ITPP types
2# To use it, add this line to your ~/.gdbinit :
3# source gdb_bdm
4
5define dm
6   set $i=0
7
8   set $M = $arg0
9   set $rs = $M.no_rows
10   set $col = $M.no_cols
11
12   while $i < $rs
13     set $j=0
14     printf "["
15     while $j< $col
16        output $M.data[$j*$rs+$i]
17        printf " "
18        set $j++
19     end
20     printf "]"
21     printf "\n"
22     set $i++
23   end
24end
25
26define dm2
27   set $i=0
28
29   set $M = $arg0
30   set $rs = $M.no_rows
31   set $col = $M.no_cols
32
33   while $i < $rs
34     set $j=0
35     printf "["
36     while $j< $col
37        printf "%2.2f,",$M.data[$j*$rs+$i]
38        printf " "
39        set $j++
40     end
41     printf "]"
42     printf "\n"
43     set $i++
44   end
45end
46
47define dav
48   set $i=0
49   printf "{"
50   while $i < $arg0.ndata
51     dv $arg0.data[$i]
52     set $i++
53   end
54   printf "}"
55end
56
57define dam
58   set $i=0
59   printf "{"
60   while $i < $arg0.ndata
61     dm $arg0.data[$i]
62     set $i++
63   end
64   printf "}"
65end
66
67
68define dv
69    output $arg0.data[0]@($arg0.datasize)
70end
71
72define dl
73   dm $arg0.L
74   dv $arg0.D
75end
Note: See TracBrowser for help on using the browser.