Revision 37, 1.1 kB
(checked in by smidl, 17 years ago)
|
Matrix in Cholesky decomposition, Square-root Kalman and many bug fixes
|
Rev | Line | |
---|
[32] | 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 | |
---|
| 5 | define 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 |
---|
[37] | 16 | output $M.data[$j*$rs+$i] |
---|
| 17 | printf " " |
---|
[32] | 18 | set $j++ |
---|
| 19 | end |
---|
| 20 | printf "]" |
---|
| 21 | printf "\n" |
---|
| 22 | set $i++ |
---|
| 23 | end |
---|
| 24 | end |
---|
| 25 | |
---|
[37] | 26 | define dm2 |
---|
[32] | 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] | 37 | printf "%2.2f,",$M.data[$j*$rs+$i] |
---|
| 38 | printf " " |
---|
[32] | 39 | set $j++ |
---|
| 40 | end |
---|
| 41 | printf "]" |
---|
| 42 | printf "\n" |
---|
| 43 | set $i++ |
---|
| 44 | end |
---|
| 45 | end |
---|
| 46 | |
---|
[37] | 47 | define dav |
---|
| 48 | set $i=0 |
---|
| 49 | printf "{" |
---|
| 50 | while $i < $arg0.ndata |
---|
| 51 | dv $arg0.data[$i] |
---|
| 52 | set $i++ |
---|
| 53 | end |
---|
| 54 | printf "}" |
---|
| 55 | end |
---|
| 56 | |
---|
| 57 | define dam |
---|
| 58 | set $i=0 |
---|
| 59 | printf "{" |
---|
| 60 | while $i < $arg0.ndata |
---|
| 61 | dm $arg0.data[$i] |
---|
| 62 | set $i++ |
---|
| 63 | end |
---|
| 64 | printf "}" |
---|
| 65 | end |
---|
| 66 | |
---|
| 67 | |
---|
[32] | 68 | define dv |
---|
[37] | 69 | output $arg0.data[0]@($arg0.datasize) |
---|
[32] | 70 | end |
---|
| 71 | |
---|
| 72 | define dl |
---|
[37] | 73 | dm $arg0.L |
---|
| 74 | dv $arg0.D |
---|
[32] | 75 | end |
---|