#N canvas -35 125 680 290 10;
#X declare -lib iemmatrix;
#X obj 595 63 matrix;
#X text 465 62 see also help for;
#X text 198 15 [mtx_pivot];
#X text 59 79 pivot-transform a matrix;
#X obj 63 164 mtx_pivot;
#N canvas 352 114 190 367 rand-matrix 0;
#X obj 74 163 inlet;
#X obj 74 270 outlet;
#X obj 74 195 mtx_rand;
#X obj 74 215 mtx_* 10;
#X obj 74 237 mtx_int;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X restore 63 118 pd rand-matrix;
#X msg 63 96 4 3;
#X obj 112 185 mtx_print post;
#X obj 87 205 mtx_print pre;
#X obj 63 245 mtx_print pivot;
#X text 290 184 the first outlet is the pivot-transformed matrix.;
#X text 289 210 the other outlets are the 1/0-matrices that have to be pre-multiplied (row-transform) and post-multiplied (column-tranform) to the original matrix to get the pivot-tranformation. this is useful for de-pivoting.;
#X obj 63 141 t a a;
#X obj 103 141 mtx_print original;
#X msg 175 99 matrix 4 3 1 2 3 4 5 6 7 8 9 10 11 12;
#X text 194 36 pivot-transform matrices;
#X text 290 131 this will transform the columns and rows \, so that the result will have "all" maximum values in the diagonal. the maximum of the matrix will be located at the upper-left corner.;
#N canvas 460 154 494 218 META 0;
#X text 12 135 AUTHOR IOhannes m zmoelnig;
#X text 12 85 OUTLET_0 matrix;
#X text 12 155 HELP_PATCH_AUTHORS IOhannes m zmölnig;
#X text 12 25 LICENSE GPL-2+;
#X text 12 65 INLET_0 matrix;
#X text 12 5 KEYWORDS control matrix math;
#X text 12 44 DESCRIPTION pivot transform a matrix;
#X text 12 95 OUTLET_1 matrix;
#X text 12 105 OUTLET_2 matrix;
#X obj 16 187 declare -lib iemmatrix;
#X restore 591 16 pd META;
#X connect 4 0 9 0;
#X connect 4 1 8 0;
#X connect 4 2 7 0;
#X connect 5 0 12 0;
#X connect 6 0 5 0;
#X connect 12 0 4 0;
#X connect 12 1 13 0;
#X connect 14 0 12 0;
