diff options
-rw-r--r-- | abs/mtx_matcher-help.pd | 49 | ||||
-rw-r--r-- | abs/mtx_matcher.pd | 37 | ||||
-rw-r--r-- | abs/mtx_spivot-help.pd | 100 | ||||
-rw-r--r-- | abs/mtx_spivot.pd | 25 | ||||
-rw-r--r-- | abs/mtx_symasym-help.pd | 31 | ||||
-rw-r--r-- | abs/mtx_symasym.pd | 6 |
6 files changed, 223 insertions, 25 deletions
diff --git a/abs/mtx_matcher-help.pd b/abs/mtx_matcher-help.pd new file mode 100644 index 0000000..94f3497 --- /dev/null +++ b/abs/mtx_matcher-help.pd @@ -0,0 +1,49 @@ +#N canvas 272 187 518 410 10; +#X obj 192 220 mtx_matcher; +#X obj 264 133 loadbang; +#X msg 174 136 bang; +#X obj 192 277 mtx_print matched; +#X obj 264 251 mtx_print permutator; +#X obj 141 298 mtx_-; +#X obj 141 320 mtx_.^ 2; +#X floatatom 141 383 0 0 0 0 error_unmatched - -; +#X obj 174 180 t a a; +#X obj 264 181 t a a a; +#X obj 270 302 mtx_-; +#X obj 270 324 mtx_.^ 2; +#X floatatom 270 387 0 0 0 1 error_matched - -; +#X obj 192 253 t a a; +#X obj 141 343 mtx_sum; +#X obj 141 363 mtx_sum; +#X obj 270 347 mtx_sum; +#X obj 270 367 mtx_sum; +#X msg 87 134 bang; +#X obj 87 155 mtx_rand 5; +#X obj 174 157 mtx_eye 5; +#X obj 264 157 mtx_egg 5; +#X text 68 9 mtx_matcher:: match 2 sets of vectors; +#X text 22 45 mtx_matcher tries to match 2 sets of vectors. The vector-sets +are expressed as matrices; +#X connect 0 0 13 0; +#X connect 0 1 4 0; +#X connect 1 0 21 0; +#X connect 2 0 20 0; +#X connect 5 0 6 0; +#X connect 6 0 14 0; +#X connect 8 0 0 0; +#X connect 8 1 5 0; +#X connect 9 0 0 1; +#X connect 9 1 5 1; +#X connect 9 2 10 1; +#X connect 10 0 11 0; +#X connect 11 0 16 0; +#X connect 13 0 3 0; +#X connect 13 1 10 0; +#X connect 14 0 15 0; +#X connect 15 0 7 0; +#X connect 16 0 17 0; +#X connect 17 0 12 0; +#X connect 18 0 19 0; +#X connect 19 0 8 0; +#X connect 20 0 8 0; +#X connect 21 0 9 0; diff --git a/abs/mtx_matcher.pd b/abs/mtx_matcher.pd index c713d4d..bfb7601 100644 --- a/abs/mtx_matcher.pd +++ b/abs/mtx_matcher.pd @@ -1,14 +1,14 @@ -#N canvas 411 75 586 409 10; -#X obj 61 120 mtx_distance2; -#X obj 61 96 t a a; -#X obj 61 164 t a a; -#X obj 61 199 mtx_*; -#X obj 61 245 outlet matched; -#X obj 171 245 outlet matcher; -#X obj 147 97 inlet dest; -#X obj 61 69 inlet source; -#X text 25 25 both "source" and "dest" must have the same number of -columns (dimension in feature-space); +#N canvas 411 75 676 452 10; +#X obj 61 190 mtx_distance2; +#X obj 61 166 t a a; +#X obj 61 234 t a a; +#X obj 61 269 mtx_*; +#X obj 61 315 outlet matched; +#X obj 171 315 outlet matcher; +#X obj 147 167 inlet dest; +#X obj 61 139 inlet source; +#X text 235 131 both "source" and "dest" must have the same number +of columns (dimension in feature-space); #N canvas 0 0 618 479 mtx_rowpermutate 0; #X obj 150 214 t b a; #X obj 150 235 mtx; @@ -25,14 +25,23 @@ trace of the result!; #X connect 3 1 0 0; #X connect 3 2 1 1; #X connect 6 0 3 0; -#X restore 61 141 pd mtx_rowpermutate; -#X text 34 303 this algorithm is _far_ from being perfect! the [mtx_rowpermutate] +#X restore 61 211 pd mtx_rowpermutate; +#X text 220 224 this algorithm is _far_ from being perfect! the [mtx_rowpermutate] does not really guarantee that the trace of the result is a global mimimum \; if it is not \, than the match will be sub-optimal! this will be even worse \, if there are several _equal_ (sub)minima in the distance-matrix.; -#X text 158 114 greater distances have an extra penalty (^2) \; is +#X text 158 184 greater distances have an extra penalty (^2) \; is this ok?; +#X text 120 346 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz +austria; +#X text 120 363 for license-details see LICENSE.txt that must come +with iemmatrix.; +#X text 57 12 mtx_matcher:: match 2 sets of vectors; +#X text 46 42 2 vectors are matching if their euclidean distance is +a minimum. each "source" vector is assigned to a "dest" vector in order +to get a maximum matching. the output is a permutation "matched" of +the "source" vector-field \, and a permutation matrix "matcher".; #X connect 0 0 9 0; #X connect 1 0 0 0; #X connect 1 1 3 1; diff --git a/abs/mtx_spivot-help.pd b/abs/mtx_spivot-help.pd new file mode 100644 index 0000000..f42bd0d --- /dev/null +++ b/abs/mtx_spivot-help.pd @@ -0,0 +1,100 @@ +#N canvas 0 35 759 714 10; +#N canvas 352 114 190 367 rand-matrix 0; +#X obj 74 163 inlet; +#X obj 74 280 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 369 pd rand-matrix; +#X msg 53 347 4 3; +#X obj 139 215 mtx_print pre; +#X obj 53 255 mtx_print pivot; +#X text 269 171 the first outlet is the pivot-transformed matrix.; +#X obj 53 121 t a a; +#X obj 83 140 mtx_print original; +#X obj 53 98 mtx 3 3; +#X msg 53 78 1 2 3 6 5 4 8 7 9; +#X obj 53 532 mtx_print pivot; +#X obj 97 421 mtx_print original; +#X obj 53 398 t a a a; +#X obj 139 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 obj 411 461 mtx_print pivot; +#X obj 381 500 mtx_*; +#X obj 411 560 mtx_print depivot; +#X obj 381 437 t a a; +#X obj 381 480 mtx_transpose; +#X obj 381 520 mtx_transpose; +#X text 456 22 part of [iemmatrix]; +#X obj 403 383 mtx_print original; +#X text 39 326 B=pivot(A)=pre*A; +#X text 377 288 A=depivot(B)=(B'*pre)'; +#X text 49 59 pivot-transform the rows of a matrix; +#X text 270 122 this will tranform (permutate) the rows \, so that +the result will have all maximum (or minimum) values in the diagonale. +however \, the diagonale will be unsorted.; +#X text 268 197 the second outlet gives the permutation-matrix that +have to be pre-multiplied to the original matrix to get the semi-pivot-tranformation. +this is useful for de-pivoting.; +#X obj 70 494 mtx_-; +#X obj 70 513 mtx_print diff; +#X obj 381 582 mtx_-; +#X obj 381 601 mtx_print diff; +#X obj 381 540 t a a; +#X obj 381 362 t a a a; +#X msg 381 316 3 4; +#X obj 521 461 mtx_print pivoteer; +#X obj 453 434 t a a; +#X obj 53 194 mtx_spivot; +#X obj 53 450 mtx_spivot; +#X obj 381 413 mtx_spivot; +#X text 52 19 mtx_spivot:: semi-pivot transform a matrix; +#X text 88 639 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria +; +#X text 88 656 for license-details see LICENSE.txt that must come with +iemmatrix.; +#X connect 0 0 11 0; +#X connect 1 0 0 0; +#X connect 5 0 37 0; +#X connect 5 1 6 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 11 0 38 0; +#X connect 11 1 12 1; +#X connect 11 2 10 0; +#X connect 12 0 13 0; +#X connect 12 0 28 1; +#X connect 14 0 33 0; +#X connect 16 0 20 0; +#X connect 18 0 19 0; +#X connect 18 1 15 0; +#X connect 19 0 16 0; +#X connect 20 0 32 0; +#X connect 28 0 29 0; +#X connect 30 0 31 0; +#X connect 32 0 30 0; +#X connect 32 1 17 0; +#X connect 33 0 39 0; +#X connect 33 1 22 0; +#X connect 33 2 30 1; +#X connect 34 0 14 0; +#X connect 36 0 16 1; +#X connect 36 1 35 0; +#X connect 37 0 3 0; +#X connect 37 1 2 0; +#X connect 38 0 9 0; +#X connect 38 0 28 0; +#X connect 38 1 12 0; +#X connect 39 0 18 0; +#X connect 39 1 36 0; diff --git a/abs/mtx_spivot.pd b/abs/mtx_spivot.pd index 6bd873a..043825d 100644 --- a/abs/mtx_spivot.pd +++ b/abs/mtx_spivot.pd @@ -1,14 +1,14 @@ #N canvas 835 313 564 462 10; -#X obj 154 247 mtx; -#X obj 154 338 mtx_*; +#X obj 154 166 mtx; +#X obj 154 208 mtx_*; #X obj 115 78 inlet; -#X obj 115 115 t a a; -#X obj 154 398 mtx_*; -#X obj 154 368 t a a; -#X obj 115 144 mtx_pivot \$1; -#X obj 154 420 outlet pivoted; -#X obj 260 421 outlet pivoter; -#X obj 154 196 t b a a; +#X obj 115 99 t a a; +#X obj 154 248 mtx_*; +#X obj 154 228 t a a; +#X obj 115 119 mtx_pivot \$1; +#X obj 154 270 outlet pivoted; +#X obj 260 271 outlet pivoter; +#X obj 154 139 t b a a; #N canvas 118 188 669 439 resizer 0; #X obj 322 204 mtx_size; #X obj 236 283 mtx_eye; @@ -47,7 +47,12 @@ from a big I-matrix) and add them together; #X connect 10 0 4 0; #X connect 11 0 0 0; #X connect 16 0 12 0; -#X restore 154 274 pd resizer; +#X restore 154 187 pd resizer; +#X text 72 316 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria +; +#X text 72 333 for license-details see LICENSE.txt that must come with +iemmatrix.; +#X text 62 38 semi-pivotize a matrix; #X connect 0 0 10 0; #X connect 1 0 5 0; #X connect 2 0 3 0; diff --git a/abs/mtx_symasym-help.pd b/abs/mtx_symasym-help.pd new file mode 100644 index 0000000..0e78414 --- /dev/null +++ b/abs/mtx_symasym-help.pd @@ -0,0 +1,31 @@ +#N canvas 302 270 518 410 10; +#X msg 174 116 bang; +#X obj 174 160 t a a; +#X msg 87 114 bang; +#X obj 87 135 mtx_rand 5; +#X obj 174 137 mtx_eye 5; +#X obj 264 137 mtx_egg 5; +#X obj 174 240 mtx_symasym; +#X obj 246 271 mtx_print asymmetric; +#X obj 174 297 mtx_print symmetric; +#X obj 204 205 mtx_print original; +#X msg 264 114 bang; +#X text 26 12 mtx_symasym:: decompose a matrix into symmetric & asymmetric +parts; +#X text 22 45 each square matrix can be decomposed into a symmetric +and an assymmetric part \, with; +#X text 205 79 M=S+A; +#X text 70 336 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria +; +#X text 70 353 for license-details see LICENSE.txt that must come with +iemmatrix.; +#X connect 0 0 4 0; +#X connect 1 0 6 0; +#X connect 1 1 9 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 8 0; +#X connect 6 1 7 0; +#X connect 10 0 5 0; diff --git a/abs/mtx_symasym.pd b/abs/mtx_symasym.pd index d078cab..4fe59f6 100644 --- a/abs/mtx_symasym.pd +++ b/abs/mtx_symasym.pd @@ -1,4 +1,4 @@ -#N canvas 0 0 450 300 10; +#N canvas 0 0 493 363 10; #X obj 61 66 inlet matrix; #X obj 61 255 outlet symmetric; #X obj 105 229 outlet assymetric; @@ -13,6 +13,10 @@ and an assymtric part; #X text 240 101 S=0.5*(M+M'); #X text 240 120 A=0.5*(M-M'); #X text 240 76 M=S+A; +#X text 38 289 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria +; +#X text 38 306 for license-details see LICENSE.txt that must come with +iemmatrix.; #X connect 0 0 4 0; #X connect 3 0 8 0; #X connect 4 0 7 0; |