aboutsummaryrefslogtreecommitdiff
path: root/doc/mtx_pivot.pd
blob: 26da757148c81d729a6c92a27641d34622439ca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#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;