Update of /cvsroot/pure-data/externals/iem/iemmatrix/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13085
Modified Files: mtx_binops.pd mtx_transpose.pd Added Files: mtx_distance2.pd mtx_pivot.pd Log Message: added and updated help
Index: mtx_transpose.pd =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/doc/mtx_transpose.pd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mtx_transpose.pd 21 Mar 2005 14:33:31 -0000 1.1.1.1 --- mtx_transpose.pd 12 Apr 2005 09:03:42 -0000 1.2 *************** *** 1,3 **** ! #N canvas 199 -133 718 600 10; #X obj 48 162 mtx_print; #X obj 48 134 mtx_transpose; --- 1,3 ---- ! #N canvas 199 0 718 600 10; #X obj 48 162 mtx_print; #X obj 48 134 mtx_transpose; *************** *** 22,26 **** #X text 143 299 shift amount (0=no-shift ; 1=1-row-down ; -2=2-rows-up ; ...); ! #X text 29 419 pivot-transform a matrix; #X obj 33 494 mtx_pivot; #N canvas 352 114 190 367 rand-matrix 0; --- 22,26 ---- #X text 143 299 shift amount (0=no-shift ; 1=1-row-down ; -2=2-rows-up ; ...); ! #X text 29 409 pivot-transform a matrix; #X obj 33 494 mtx_pivot; #N canvas 352 114 190 367 rand-matrix 0; *************** *** 34,39 **** #X connect 3 0 4 0; #X connect 4 0 1 0; ! #X restore 33 458 pd rand-matrix; ! #X msg 33 436 4 3; #X obj 82 515 mtx_print post; #X obj 57 535 mtx_print pre; --- 34,39 ---- #X connect 3 0 4 0; #X connect 4 0 1 0; ! #X restore 33 448 pd rand-matrix; ! #X msg 33 426 4 3; #X obj 82 515 mtx_print post; #X obj 57 535 mtx_print pre; *************** *** 49,52 **** --- 49,55 ---- the result will have all maximum values in the diagonale. the maximum of the matrix will be located at the upper-left corner.; + #X obj 33 471 t a a; + #X obj 73 471 mtx_print original; + #X msg 145 429 matrix 4 3 1 2 3 4 5 6 7 8 9 10 11 12; #X connect 1 0 0 0; #X connect 2 0 1 0; *************** *** 63,66 **** #X connect 21 1 25 0; #X connect 21 2 24 0; ! #X connect 22 0 21 0; #X connect 23 0 22 0; --- 66,72 ---- #X connect 21 1 25 0; #X connect 21 2 24 0; ! #X connect 22 0 32 0; #X connect 23 0 22 0; + #X connect 32 0 21 0; + #X connect 32 1 33 0; + #X connect 34 0 32 0;
Index: mtx_binops.pd =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/doc/mtx_binops.pd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mtx_binops.pd 21 Mar 2005 14:33:31 -0000 1.1.1.1 --- mtx_binops.pd 12 Apr 2005 09:03:42 -0000 1.2 *************** *** 1,3 **** ! #N canvas 79 32 859 673 10; #X obj 87 360 mtx_mul; #X obj 157 360 mtx_*; --- 1,3 ---- ! #N canvas 79 32 976 685 10; #X obj 87 360 mtx_mul; #X obj 157 360 mtx_*; *************** *** 47,51 **** #X text 245 422 multiply a matrix with a scalar; #X text 506 425 multiply 2 matrices element by element; ! #X text 334 19 matrix arithmetic; #X obj 88 599 mtx_print; #X obj 88 492 t b f; --- 47,51 ---- #X text 245 422 multiply a matrix with a scalar; #X text 506 425 multiply 2 matrices element by element; ! #X text 50 24 matrix arithmetic; #X obj 88 599 mtx_print; #X obj 88 492 t b f; *************** *** 57,68 **** #X obj 354 521 mtx_ones 3; #X obj 354 540 mtx_* 2; ! #X text 84 622 divide a matrix by a scalar; #X obj 88 563 mtx_./ 2; #X obj 323 565 mtx_./; ! #X text 307 624 divide 2 matrices element by element; #X obj 323 482 t b b f; #X floatatom 323 463 4 0 0 0 - - -; - #X obj 709 538 matrix; - #X text 592 538 see also help for; #X obj 550 141 mtx_diag 1 2 3 4 5; #X obj 483 141 mtx_ones 5; --- 57,66 ---- #X obj 354 521 mtx_ones 3; #X obj 354 540 mtx_* 2; ! #X text 44 622 divide a matrix by a scalar; #X obj 88 563 mtx_./ 2; #X obj 323 565 mtx_./; ! #X text 267 624 divide 2 matrices element by element; #X obj 323 482 t b b f; #X floatatom 323 463 4 0 0 0 - - -; #X obj 550 141 mtx_diag 1 2 3 4 5; #X obj 483 141 mtx_ones 5; *************** *** 83,86 **** --- 81,101 ---- #X text 481 221 subtract 2 matrices; #X text 669 225 subtract an offset from a matrix; + #X text 600 27 part of iemmatrix; + #X obj 737 28 iemmatrix; + #X obj 568 609 mtx_print; + #X obj 568 502 t b f; + #X floatatom 568 484 4 0 0 0 - - -; + #X msg 568 525 4 2 1 3; + #X obj 568 545 mtx_diag; + #X obj 763 610 mtx_print; + #X obj 763 513 mtx_diag 1 2 3; + #X obj 794 531 mtx_ones 3; + #X obj 794 550 mtx_* 2; + #X obj 763 492 t b b f; + #X floatatom 763 473 4 0 0 0 - - -; + #X obj 568 573 mtx_.^ 2; + #X obj 763 575 mtx_.^; + #X text 546 638 matrix-elements^f; + #X text 720 636 elementA(i , j)^elementB(i , j); #X connect 0 0 18 0; #X connect 2 0 7 0; *************** *** 129,142 **** #X connect 61 2 56 1; #X connect 62 0 61 0; ! #X connect 65 0 77 1; ! #X connect 66 0 77 0; ! #X connect 67 0 66 0; ! #X connect 67 1 65 0; ! #X connect 69 0 67 0; ! #X connect 71 0 80 0; ! #X connect 72 0 71 0; ! #X connect 74 0 75 0; ! #X connect 75 0 71 0; ! #X connect 75 1 80 1; ! #X connect 77 0 68 0; ! #X connect 80 0 73 0; --- 144,171 ---- #X connect 61 2 56 1; #X connect 62 0 61 0; ! #X connect 63 0 75 1; ! #X connect 64 0 75 0; ! #X connect 65 0 64 0; ! #X connect 65 1 63 0; ! #X connect 67 0 65 0; ! #X connect 69 0 78 0; ! #X connect 70 0 69 0; ! #X connect 72 0 73 0; ! #X connect 73 0 69 0; ! #X connect 73 1 78 1; ! #X connect 75 0 66 0; ! #X connect 78 0 71 0; ! #X connect 84 0 86 0; ! #X connect 84 1 94 1; ! #X connect 85 0 84 0; ! #X connect 86 0 87 0; ! #X connect 87 0 94 0; ! #X connect 89 0 95 0; ! #X connect 90 0 91 0; ! #X connect 91 0 95 1; ! #X connect 92 0 89 0; ! #X connect 92 1 90 0; ! #X connect 92 2 91 1; ! #X connect 93 0 92 0; ! #X connect 94 0 83 0; ! #X connect 95 0 88 0;
--- NEW FILE: mtx_distance2.pd --- #N canvas 83 338 696 369 10; #X obj 33 242 mtx_distance2; #X obj 33 267 mtx_print distances; #X obj 119 179 t a a; #X obj 149 198 mtx_print B; #X obj 33 179 t a a; #X obj 63 198 mtx_print A; #X obj 33 106 t b b; #X msg 33 85 bang; #X obj 33 132 mtx_rand 4 3; #X obj 119 154 mtx_rand 2 3; #X text 44 34 [mtx_distance2]; #X text 482 28 part of iemmatrix; #X text 268 138 inletA: a matrix defining <i> vectors of dimension <n>; #X text 268 158 inletB: a matrix defining <j> vectors of dimension <n>; #X text 267 179 outlet: distance matrix (i , j) , where each element Y(i , j)=(A(i)-B(i)).(A(i)-B(i))=|A(i)-B(i)|^2; #X text 166 69 calculate the (square of the) euclidian distance between two sets of vectors.; #X text 233 274 note: if you want the real-distance (non-squared) , calculate the square-root with [mtx_.^ 0.5]; #X connect 0 0 1 0; #X connect 2 0 0 1; #X connect 2 1 3 0; #X connect 4 0 0 0; #X connect 4 1 5 0; #X connect 6 0 8 0; #X connect 6 1 9 0; #X connect 7 0 6 0; #X connect 8 0 4 0; #X connect 9 0 2 0;
--- NEW FILE: mtx_pivot.pd --- #N canvas 199 0 759 714 10; #X text 69 19 pivot-transform a matrix; #X obj 73 154 mtx_pivot; #N canvas 352 114 190 367 rand-matrix 0; #X obj 74 163 inlet; #X obj 74 240 outlet; #X obj 74 195 mtx_rand; #X obj 74 215 mtx_* 10; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X restore 53 376 pd rand-matrix; #X msg 53 354 4 3; #X obj 131 175 mtx_print post; #X obj 102 195 mtx_print pre; #X obj 73 215 mtx_print pivot; #X text 269 171 the first outlet is the pivot-transformed matrix.; #X text 270 122 this will tranform the columns and rows , so that the result will have all maximum values in the diagonale. the maximum of the matrix will be located at the upper-left corner.; #X obj 73 81 t a a; #X obj 103 100 mtx_print original; #X text 268 197 the other outlets are the permutation-matrices that have to be pre-multiplied (row-tranform) and post-multiplied (column-tranform) to the original matrix to get the pivot-tranformation. this is useful for de-pivoting.; #X obj 73 58 mtx 3 3; #X msg 73 38 1 2 3 6 5 4 8 7 9; #X obj 53 451 mtx_pivot; #X obj 53 532 mtx_print pivot; #X obj 82 501 mtx_*; #X obj 97 421 mtx_print original; #X obj 53 398 t a a a; #X obj 82 475 mtx_*; #X obj 167 532 mtx_print pivot2; #N canvas 352 114 190 367 rand-matrix 0; #X obj 74 163 inlet; #X obj 74 240 outlet; #X obj 74 195 mtx_rand; #X obj 74 215 mtx_* 10; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X restore 381 338 pd rand-matrix; #X msg 381 316 4 3; #X obj 381 413 mtx_pivot; #X obj 381 464 mtx_print pivot; #X obj 535 550 mtx_*; #X obj 535 484 mtx_*; #X obj 535 604 mtx_print depivot; #X obj 381 437 t a a; #X obj 535 460 mtx_transpose; #X obj 381 362 t a a; #X obj 535 506 t b a; #X obj 535 528 mtx; #X obj 535 580 mtx_transpose; #X text 39 326 B=pivot(A)=pre*A*post; #X text 377 288 A=depivot(B)=(post*B'*pre)'; #X text 456 22 part of [iemmatrix]; #X obj 411 382 mtx_print original; #X connect 1 0 6 0; #X connect 1 1 5 0; #X connect 1 2 4 0; #X connect 2 0 18 0; #X connect 3 0 2 0; #X connect 9 0 1 0; #X connect 9 1 10 0; #X connect 12 0 9 0; #X connect 13 0 12 0; #X connect 14 0 15 0; #X connect 14 1 19 0; #X connect 14 2 16 1; #X connect 16 0 20 0; #X connect 18 0 14 0; #X connect 18 1 19 1; #X connect 18 2 17 0; #X connect 19 0 16 0; #X connect 21 0 30 0; #X connect 22 0 21 0; #X connect 23 0 28 0; #X connect 23 1 26 1; #X connect 23 2 32 1; #X connect 25 0 33 0; #X connect 26 0 31 0; #X connect 28 0 24 0; #X connect 28 1 29 0; #X connect 29 0 26 0; #X connect 30 0 23 0; #X connect 30 1 37 0; #X connect 31 0 32 0; #X connect 31 1 25 1; #X connect 32 0 25 0; #X connect 33 0 27 0;