From e1a8039ec9fb3ca4db8b197069425b99ef48a941 Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Thu, 17 Aug 2006 09:21:51 +0000 Subject: added indexing abstractions for row and column indices. svn path=/trunk/externals/iem/iemmatrix/; revision=5638 --- abs/mtx_fill_col_grid-help.pd | 34 ++++++++++++++++++++++ abs/mtx_fill_col_grid.pd | 57 +++++++++++++++++++++++++++++++++++++ abs/mtx_fill_row_grid-help.pd | 34 ++++++++++++++++++++++ abs/mtx_fill_row_grid.pd | 60 +++++++++++++++++++++++++++++++++++++++ abs/mtx_fill_rowcol.pd | 31 ++++++++++++++++++++ abs/mtx_fill_rowcol_grid-help.pd | 40 ++++++++++++++++++++++++++ abs/mtx_fill_rowcol_grid.pd | 60 +++++++++++++++++++++++++++++++++++++++ abs/mtx_find_rowcol-help.pd | 21 ++++++++++++++ abs/mtx_index2rowcol-help.pd | 34 ++++++++++++++++++++++ abs/mtx_index_col_grid-help.pd | 26 +++++++++++++++++ abs/mtx_index_col_grid.pd | 53 ++++++++++++++++++++++++++++++++++ abs/mtx_index_row_grid-help.pd | 26 +++++++++++++++++ abs/mtx_index_row_grid.pd | 56 ++++++++++++++++++++++++++++++++++++ abs/mtx_index_rowcol-help.pd | 32 +++++++++++++++++++++ abs/mtx_index_rowcol.pd | 26 +++++++++++++++++ abs/mtx_index_rowcol_grid-help.pd | 33 +++++++++++++++++++++ abs/mtx_index_rowcol_grid.pd | 56 ++++++++++++++++++++++++++++++++++++ 17 files changed, 679 insertions(+) create mode 100644 abs/mtx_fill_col_grid-help.pd create mode 100644 abs/mtx_fill_col_grid.pd create mode 100644 abs/mtx_fill_row_grid-help.pd create mode 100644 abs/mtx_fill_row_grid.pd create mode 100644 abs/mtx_fill_rowcol.pd create mode 100644 abs/mtx_fill_rowcol_grid-help.pd create mode 100644 abs/mtx_fill_rowcol_grid.pd create mode 100644 abs/mtx_find_rowcol-help.pd create mode 100644 abs/mtx_index2rowcol-help.pd create mode 100644 abs/mtx_index_col_grid-help.pd create mode 100644 abs/mtx_index_col_grid.pd create mode 100644 abs/mtx_index_row_grid-help.pd create mode 100644 abs/mtx_index_row_grid.pd create mode 100644 abs/mtx_index_rowcol-help.pd create mode 100644 abs/mtx_index_rowcol.pd create mode 100644 abs/mtx_index_rowcol_grid-help.pd create mode 100644 abs/mtx_index_rowcol_grid.pd (limited to 'abs') diff --git a/abs/mtx_fill_col_grid-help.pd b/abs/mtx_fill_col_grid-help.pd new file mode 100644 index 0000000..19c5142 --- /dev/null +++ b/abs/mtx_fill_col_grid-help.pd @@ -0,0 +1,34 @@ +#N canvas 162 457 841 379 10; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X obj 33 85 t b b b; +#X text 43 34 [mtx_fill_col_grid]; +#X text 166 69 fills values into to the col indices of given matrix. +; +#X text 424 184 inletA: matrix/vector values for fill; +#X text 424 197 inletB: matrix/vector to fill values into; +#X text 424 211 inletC: matrix/vector indices for filling; +#X text 422 231 outleA: matrix containing the inserted values; +#X msg 193 111 3 4; +#X obj 193 133 mtx_zeros; +#X msg 33 112 matrix 1 6 1 2 3 4 5 6; +#X msg 310 107 matrix 1 2 4 2; +#X obj 75 133 mtx_print A_fill; +#X obj 33 232 mtx_print output; +#X obj 193 158 mtx_print B_orig; +#X obj 310 158 mtx_print C_col; +#X obj 33 194 mtx_fill_col_grid; +#X connect 0 0 3 0; +#X connect 2 0 18 0; +#X connect 2 1 14 0; +#X connect 3 0 12 0; +#X connect 3 1 10 0; +#X connect 3 2 13 0; +#X connect 10 0 11 0; +#X connect 11 0 16 0; +#X connect 11 0 18 1; +#X connect 12 0 2 0; +#X connect 13 0 17 0; +#X connect 13 0 18 2; +#X connect 18 0 15 0; diff --git a/abs/mtx_fill_col_grid.pd b/abs/mtx_fill_col_grid.pd new file mode 100644 index 0000000..9bcca98 --- /dev/null +++ b/abs/mtx_fill_col_grid.pd @@ -0,0 +1,57 @@ +#N canvas 597 0 516 388 10; +#X obj 70 20 inlet; +#X obj 70 41 t a a; +#X obj 119 87 mtx_size; +#X obj 200 20 inlet; +#X text 68 4 matrix; +#X obj 200 40 mtx_:; +#X obj 184 86 mtx; +#X obj 184 106 mtx_repmat; +#X obj 184 129 t a a; +#X obj 223 129 mtx_size; +#X obj 223 170 mtx_:; +#X obj 223 250 mtx_repmat; +#X obj 184 271 mtx_+; +#X obj 15 328 outlet; +#X text 246 20 col_idcs; +#X obj 119 107 t b f; +#X obj 223 190 mtx_transpose; +#X obj 223 210 mtx_- 1; +#X obj 223 230 mtx_* 1; +#X msg 274 149 1 \$1; +#X msg 249 84 \$1 1; +#X msg 223 150 1 \$1; +#X obj 15 19 inlet; +#X text 18 4 matrix; +#X text 75 -10 orig; +#X text 13 -9 fill; +#X obj 15 304 mtx_fill; +#X text 291 98 fills in elements into; +#X text 302 120 the given columns; +#X text 331 145 of a matrix; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 26 1; +#X connect 2 0 15 0; +#X connect 2 1 18 1; +#X connect 3 0 5 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 12 0; +#X connect 8 1 9 0; +#X connect 9 0 21 0; +#X connect 9 1 19 0; +#X connect 10 0 16 0; +#X connect 11 0 12 1; +#X connect 12 0 26 2; +#X connect 15 0 6 0; +#X connect 15 1 20 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 11 0; +#X connect 19 0 11 1; +#X connect 20 0 7 1; +#X connect 21 0 10 0; +#X connect 22 0 26 0; +#X connect 26 0 13 0; diff --git a/abs/mtx_fill_row_grid-help.pd b/abs/mtx_fill_row_grid-help.pd new file mode 100644 index 0000000..25a3c2f --- /dev/null +++ b/abs/mtx_fill_row_grid-help.pd @@ -0,0 +1,34 @@ +#N canvas 377 497 841 379 10; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X obj 33 85 t b b b; +#X text 424 184 inletA: matrix/vector values for fill; +#X text 424 197 inletB: matrix/vector to fill values into; +#X text 424 211 inletC: matrix/vector indices for filling; +#X text 422 231 outleA: matrix containing the inserted values; +#X msg 224 112 3 4; +#X obj 224 134 mtx_zeros; +#X obj 75 133 mtx_print A_fill; +#X obj 33 232 mtx_print output; +#X obj 224 159 mtx_print B_orig; +#X text 43 34 [mtx_fill_row_grid]; +#X text 166 69 fills values into to the row indices of given matrix. +; +#X obj 341 159 mtx_print C_row; +#X obj 33 201 mtx_fill_row_grid; +#X msg 341 108 matrix 1 2 3 1; +#X msg 33 112 matrix 1 8 1 2 3 4 5 6 7 8; +#X connect 0 0 3 0; +#X connect 2 0 16 0; +#X connect 2 1 10 0; +#X connect 3 0 18 0; +#X connect 3 1 8 0; +#X connect 3 2 17 0; +#X connect 8 0 9 0; +#X connect 9 0 12 0; +#X connect 9 0 16 1; +#X connect 16 0 11 0; +#X connect 17 0 15 0; +#X connect 17 0 16 2; +#X connect 18 0 2 0; diff --git a/abs/mtx_fill_row_grid.pd b/abs/mtx_fill_row_grid.pd new file mode 100644 index 0000000..80c96ef --- /dev/null +++ b/abs/mtx_fill_row_grid.pd @@ -0,0 +1,60 @@ +#N canvas 191 265 450 388 10; +#X obj 70 20 inlet; +#X obj 70 41 t a a; +#X obj 100 61 mtx_size; +#X obj 200 20 inlet; +#X text 246 20 row_idcs; +#X text 74 3 matrix; +#X obj 200 40 mtx_:; +#X obj 200 78 mtx_- 1; +#X obj 184 100 mtx; +#X obj 184 120 mtx_* 1; +#X obj 184 140 mtx_repmat; +#X msg 249 118 1 \$1; +#X obj 200 59 mtx_transpose; +#X obj 184 159 t a a; +#X obj 223 159 mtx_size; +#X obj 223 218 mtx_:; +#X obj 223 238 mtx_repmat; +#X obj 223 198 pack 1 f; +#X obj 222 178 t b f; +#X msg 262 178 \$1 1; +#X obj 151 81 t b f; +#X obj 184 266 mtx_+; +#X obj 9 328 outlet; +#X text 73 -9 orig; +#X obj 9 19 inlet; +#X text 11 -10 fill; +#X text 13 1 matrix; +#X obj 9 304 mtx_fill; +#X text 293 98 fills in elements; +#X text 302 120 into given rows; +#X text 310 142 of a matrix; +#X connect 0 0 1 0; +#X connect 1 0 27 1; +#X connect 1 1 2 0; +#X connect 2 1 20 0; +#X connect 3 0 6 0; +#X connect 6 0 12 0; +#X connect 7 0 8 1; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 13 0; +#X connect 11 0 10 1; +#X connect 12 0 7 0; +#X connect 13 0 21 0; +#X connect 13 1 14 0; +#X connect 14 0 18 0; +#X connect 14 1 17 1; +#X connect 15 0 16 0; +#X connect 16 0 21 1; +#X connect 17 0 15 0; +#X connect 18 0 17 0; +#X connect 18 1 19 0; +#X connect 19 0 16 1; +#X connect 20 0 8 0; +#X connect 20 1 11 0; +#X connect 20 1 9 1; +#X connect 21 0 27 2; +#X connect 24 0 27 0; +#X connect 27 0 22 0; diff --git a/abs/mtx_fill_rowcol.pd b/abs/mtx_fill_rowcol.pd new file mode 100644 index 0000000..b730224 --- /dev/null +++ b/abs/mtx_fill_rowcol.pd @@ -0,0 +1,31 @@ +#N canvas 344 107 450 300 10; +#X obj 88 36 inlet; +#X text 16 15 matrix; +#X text 255 19 row idcs; +#X text 356 19 col idcs; +#X text 258 4 from mtx_find_rowcol:; +#X obj 258 37 inlet; +#X obj 361 37 inlet; +#X obj 146 118 mtx_rowcol2index; +#X obj 189 93 mtx; +#X obj 88 55 t a a; +#X obj 128 55 mtx_size; +#X obj 189 55 t b f; +#X obj 63 160 outlet; +#X obj 11 35 inlet; +#X text 91 15 matrix; +#X text 90 4 orig; +#X text 14 5 fill; +#X obj 63 140 mtx_fill; +#X connect 0 0 9 0; +#X connect 5 0 8 1; +#X connect 6 0 7 1; +#X connect 7 0 17 2; +#X connect 8 0 7 0; +#X connect 9 0 17 1; +#X connect 9 1 10 0; +#X connect 10 1 11 0; +#X connect 11 0 8 0; +#X connect 11 1 7 2; +#X connect 13 0 17 0; +#X connect 17 0 12 0; diff --git a/abs/mtx_fill_rowcol_grid-help.pd b/abs/mtx_fill_rowcol_grid-help.pd new file mode 100644 index 0000000..12fe5f6 --- /dev/null +++ b/abs/mtx_fill_rowcol_grid-help.pd @@ -0,0 +1,40 @@ +#N canvas 377 497 841 379 10; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X text 424 206 inletA: matrix/vector values for fill; +#X text 424 219 inletB: matrix/vector to fill values into; +#X text 424 233 inletC: matrix/vector indices for filling; +#X text 422 278 outleA: matrix containing the inserted values; +#X obj 224 134 mtx_zeros; +#X obj 75 133 mtx_print A_fill; +#X obj 33 232 mtx_print output; +#X obj 224 159 mtx_print B_orig; +#X obj 341 159 mtx_print C_row; +#X msg 33 112 matrix 1 8 1 2 3 4 5 6 7 8; +#X text 31 31 [mtx_fill_rowcol_grid]; +#X obj 33 201 mtx_fill_rowcol_grid; +#X text 425 247 inletD: matrix/vector indices for filling; +#X text 166 69 fills values into to the row and col grid indices of +given matrix.; +#X msg 450 108 matrix 1 2 2 4; +#X obj 33 85 t b b b b; +#X obj 450 159 mtx_print D_col; +#X msg 224 113 6 5; +#X msg 341 108 matrix 1 2 2 5; +#X connect 0 0 18 0; +#X connect 2 0 14 0; +#X connect 2 1 8 0; +#X connect 7 0 10 0; +#X connect 7 0 14 1; +#X connect 12 0 2 0; +#X connect 14 0 9 0; +#X connect 17 0 19 0; +#X connect 17 0 14 3; +#X connect 18 0 12 0; +#X connect 18 1 20 0; +#X connect 18 2 21 0; +#X connect 18 3 17 0; +#X connect 20 0 7 0; +#X connect 21 0 11 0; +#X connect 21 0 14 2; diff --git a/abs/mtx_fill_rowcol_grid.pd b/abs/mtx_fill_rowcol_grid.pd new file mode 100644 index 0000000..cdae0f7 --- /dev/null +++ b/abs/mtx_fill_rowcol_grid.pd @@ -0,0 +1,60 @@ +#N canvas 200 516 575 378 10; +#X text 92 2 matrix; +#X obj 35 335 outlet; +#X text 381 153 at the given row and col; +#X text 381 179 grid indices; +#X obj 35 311 mtx_fill; +#X obj 35 21 inlet; +#X text 29 1 matrix; +#X text 31 -10 fill; +#X text 89 -10 orig; +#X text 383 98 fills in elements; +#X text 384 124 into a matrix; +#X obj 274 20 inlet; +#X text 320 20 row_idcs; +#X obj 274 40 mtx_:; +#X obj 274 78 mtx_- 1; +#X obj 258 159 mtx; +#X obj 258 179 mtx_* 1; +#X obj 258 199 mtx_repmat; +#X msg 323 177 1 \$1; +#X obj 274 59 mtx_transpose; +#X obj 400 20 inlet; +#X obj 400 40 mtx_:; +#X obj 145 182 mtx; +#X obj 145 203 mtx_repmat; +#X msg 210 180 \$1 1; +#X obj 87 20 inlet; +#X obj 145 283 mtx_+; +#X obj 400 63 mtx_size; +#X obj 274 99 mtx_size; +#X obj 87 63 t a a; +#X obj 117 89 mtx_size; +#X obj 168 110 t b b f; +#X connect 4 0 1 0; +#X connect 5 0 4 0; +#X connect 11 0 13 0; +#X connect 13 0 19 0; +#X connect 14 0 28 0; +#X connect 14 0 15 1; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 17 0 26 1; +#X connect 18 0 17 1; +#X connect 19 0 14 0; +#X connect 20 0 21 0; +#X connect 21 0 22 1; +#X connect 21 0 27 0; +#X connect 22 0 23 0; +#X connect 23 0 26 0; +#X connect 24 0 23 1; +#X connect 25 0 29 0; +#X connect 26 0 4 2; +#X connect 27 0 18 0; +#X connect 28 0 24 0; +#X connect 29 0 4 1; +#X connect 29 1 30 0; +#X connect 30 1 31 0; +#X connect 31 0 22 0; +#X connect 31 1 15 0; +#X connect 31 2 16 1; diff --git a/abs/mtx_find_rowcol-help.pd b/abs/mtx_find_rowcol-help.pd new file mode 100644 index 0000000..e33db2c --- /dev/null +++ b/abs/mtx_find_rowcol-help.pd @@ -0,0 +1,21 @@ +#N canvas 83 338 841 379 10; +#X obj 111 142 mtx_print A; +#X msg 33 88 bang; +#X text 482 28 part of iemmatrix; +#X text 267 190 outleA: matrix containing row indices; +#X text 269 209 outletB: matrix containing col indices; +#X obj 33 132 t a a; +#X obj 33 201 mtx_print row; +#X obj 140 200 mtx_print col; +#X obj 33 163 mtx_find_rowcol; +#X text 265 149 inletA: matrix/vector; +#X text 166 69 calculates the row/col indices of the nonzero elements +in a matrix; +#X msg 33 112 matrix 2 3 1 0 1 0 1 1; +#X text 43 34 [mtx_find_rowcol]; +#X connect 1 0 11 0; +#X connect 5 0 8 0; +#X connect 5 1 0 0; +#X connect 8 0 6 0; +#X connect 8 1 7 0; +#X connect 11 0 5 0; diff --git a/abs/mtx_index2rowcol-help.pd b/abs/mtx_index2rowcol-help.pd new file mode 100644 index 0000000..a97304d --- /dev/null +++ b/abs/mtx_index2rowcol-help.pd @@ -0,0 +1,34 @@ +#N canvas 83 338 841 379 10; +#X obj 152 214 mtx_print A; +#X msg 33 88 bang; +#X text 482 28 part of iemmatrix; +#X text 43 34 [mtx_index2rowcol]; +#X text 166 69 calculate the row and column indices w.r.t. the linear +matrix indices used by the standard objects (e.g. mtx_find \, mtx_index +\, mtx_fill \, ...); +#X text 268 138 inletA: matrix/vector containing linear indices of +a matrix; +#X text 268 158 inletB: integer describing the number of columns of +the indexed matrix; +#X text 267 190 outleA: matrix containing row indices; +#X text 269 209 outletB: matrix containing col indices; +#X obj 33 242 mtx_index2rowcol; +#X msg 33 112 matrix 2 3 1 1 1 1 1 1; +#X obj 33 163 mtx_find; +#X obj 156 160 print B; +#X obj 90 133 mtx_size; +#X obj 33 132 t a a; +#X obj 33 184 t a a; +#X obj 33 267 mtx_print row; +#X obj 140 266 mtx_print col; +#X connect 1 0 10 0; +#X connect 9 0 16 0; +#X connect 9 1 17 0; +#X connect 10 0 14 0; +#X connect 11 0 15 0; +#X connect 13 1 12 0; +#X connect 13 1 9 1; +#X connect 14 0 11 0; +#X connect 14 1 13 0; +#X connect 15 0 9 0; +#X connect 15 1 0 0; diff --git a/abs/mtx_index_col_grid-help.pd b/abs/mtx_index_col_grid-help.pd new file mode 100644 index 0000000..30996f6 --- /dev/null +++ b/abs/mtx_index_col_grid-help.pd @@ -0,0 +1,26 @@ +#N canvas 133 130 841 379 10; +#X obj 75 133 mtx_print A; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X text 384 152 inletA: matrix/vector; +#X obj 33 232 mtx_print output; +#X obj 33 83 t b b b; +#X obj 242 135 mtx_print B_row; +#X msg 241 110 matrix 1 2 3 1; +#X text 43 34 [mtx_index_col_grid]; +#X text 166 69 finds the values to the col grid indices in a given +matrix.; +#X text 384 165 inletB: col matrix/vector; +#X text 382 199 outleA: matrix containing the indexed cols; +#X obj 33 194 mtx_index_col_grid; +#X msg 33 112 matrix 3 3 1 2 3 1 2 3 1 2 3; +#X connect 1 0 6 0; +#X connect 3 0 13 0; +#X connect 3 1 0 0; +#X connect 6 0 14 0; +#X connect 6 1 8 0; +#X connect 8 0 7 0; +#X connect 8 0 13 1; +#X connect 13 0 5 0; +#X connect 14 0 3 0; diff --git a/abs/mtx_index_col_grid.pd b/abs/mtx_index_col_grid.pd new file mode 100644 index 0000000..bc5140a --- /dev/null +++ b/abs/mtx_index_col_grid.pd @@ -0,0 +1,53 @@ +#N canvas 597 0 450 388 10; +#X obj 70 20 inlet; +#X obj 70 41 t a a; +#X obj 100 61 mtx_size; +#X obj 200 20 inlet; +#X text 68 4 matrix; +#X obj 200 40 mtx_:; +#X obj 184 86 mtx; +#X obj 184 106 mtx_repmat; +#X obj 184 129 t a a; +#X obj 223 129 mtx_size; +#X obj 223 170 mtx_:; +#X obj 223 250 mtx_repmat; +#X obj 184 271 mtx_+; +#X obj 70 329 outlet; +#X text 293 98 slices out given; +#X text 310 142 writing them into; +#X text 318 165 a new matrix; +#X text 246 20 col_idcs; +#X text 302 120 columns of a matrix; +#X obj 100 81 t b f; +#X obj 223 190 mtx_transpose; +#X obj 223 210 mtx_- 1; +#X obj 223 230 mtx_* 1; +#X msg 274 149 1 \$1; +#X msg 249 84 \$1 1; +#X msg 223 150 1 \$1; +#X obj 70 305 mtx_index; +#X connect 0 0 1 0; +#X connect 1 0 26 0; +#X connect 1 1 2 0; +#X connect 2 0 19 0; +#X connect 2 1 22 1; +#X connect 3 0 5 0; +#X connect 5 0 6 1; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 12 0; +#X connect 8 1 9 0; +#X connect 9 0 25 0; +#X connect 9 1 23 0; +#X connect 10 0 20 0; +#X connect 11 0 12 1; +#X connect 12 0 26 1; +#X connect 19 0 6 0; +#X connect 19 1 24 0; +#X connect 20 0 21 0; +#X connect 21 0 22 0; +#X connect 22 0 11 0; +#X connect 23 0 11 1; +#X connect 24 0 7 1; +#X connect 25 0 10 0; +#X connect 26 0 13 0; diff --git a/abs/mtx_index_row_grid-help.pd b/abs/mtx_index_row_grid-help.pd new file mode 100644 index 0000000..0ef45b5 --- /dev/null +++ b/abs/mtx_index_row_grid-help.pd @@ -0,0 +1,26 @@ +#N canvas 133 130 841 379 10; +#X obj 75 133 mtx_print A; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X text 384 152 inletA: matrix/vector; +#X text 384 165 inletB: row matrix/vector; +#X obj 33 232 mtx_print output; +#X obj 33 83 t b b b; +#X obj 242 135 mtx_print B_row; +#X text 43 34 [mtx_index_row_grid]; +#X text 166 69 finds the values to the row grid indices in a given +matrix.; +#X obj 33 194 mtx_index_row_grid; +#X text 382 199 outleA: matrix containing the indexed rows; +#X msg 33 112 matrix 3 3 1 1 1 2 2 2 3 3 3; +#X msg 241 110 matrix 1 2 3 1; +#X connect 1 0 7 0; +#X connect 3 0 11 0; +#X connect 3 1 0 0; +#X connect 7 0 13 0; +#X connect 7 1 14 0; +#X connect 11 0 6 0; +#X connect 13 0 3 0; +#X connect 14 0 8 0; +#X connect 14 0 11 1; diff --git a/abs/mtx_index_row_grid.pd b/abs/mtx_index_row_grid.pd new file mode 100644 index 0000000..8d83dad --- /dev/null +++ b/abs/mtx_index_row_grid.pd @@ -0,0 +1,56 @@ +#N canvas 116 0 450 388 10; +#X obj 70 20 inlet; +#X obj 70 41 t a a; +#X obj 100 61 mtx_size; +#X obj 200 20 inlet; +#X text 246 20 row_idcs; +#X text 113 21 matrix; +#X obj 200 40 mtx_:; +#X obj 200 78 mtx_- 1; +#X obj 184 100 mtx; +#X obj 184 120 mtx_* 1; +#X obj 184 140 mtx_repmat; +#X msg 249 118 1 \$1; +#X obj 200 59 mtx_transpose; +#X obj 184 159 t a a; +#X obj 223 159 mtx_size; +#X obj 223 218 mtx_:; +#X obj 223 238 mtx_repmat; +#X obj 223 198 pack 1 f; +#X obj 222 178 t b f; +#X msg 262 178 \$1 1; +#X obj 151 81 t b f; +#X obj 184 266 mtx_+; +#X obj 70 304 mtx_index; +#X obj 70 328 outlet; +#X text 293 98 slices out given; +#X text 302 120 rows of a matrix; +#X text 310 142 writing them into; +#X text 318 165 a new matrix; +#X connect 0 0 1 0; +#X connect 1 0 22 0; +#X connect 1 1 2 0; +#X connect 2 1 20 0; +#X connect 3 0 6 0; +#X connect 6 0 12 0; +#X connect 7 0 8 1; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 13 0; +#X connect 11 0 10 1; +#X connect 12 0 7 0; +#X connect 13 0 21 0; +#X connect 13 1 14 0; +#X connect 14 0 18 0; +#X connect 14 1 17 1; +#X connect 15 0 16 0; +#X connect 16 0 21 1; +#X connect 17 0 15 0; +#X connect 18 0 17 0; +#X connect 18 1 19 0; +#X connect 19 0 16 1; +#X connect 20 0 8 0; +#X connect 20 1 11 0; +#X connect 20 1 9 1; +#X connect 21 0 22 1; +#X connect 22 0 23 0; diff --git a/abs/mtx_index_rowcol-help.pd b/abs/mtx_index_rowcol-help.pd new file mode 100644 index 0000000..4df824b --- /dev/null +++ b/abs/mtx_index_rowcol-help.pd @@ -0,0 +1,32 @@ +#N canvas 133 130 841 379 10; +#X obj 75 133 mtx_print A; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X text 481 154 inletA: matrix/vector; +#X text 481 167 inletB: row matrix/vector; +#X text 481 180 inletC: col matrix/vector; +#X text 479 201 outleA: matrix containing the indexed values; +#X obj 33 232 mtx_print output; +#X text 43 34 [mtx_index_rowcol]; +#X text 166 69 finds the values to the given row/col indices in a given +matrix.; +#X obj 33 194 mtx_index_rowcol; +#X msg 33 112 matrix 2 3 1 2 3 4 5 6; +#X obj 33 83 t b b b; +#X msg 205 111 matrix 1 4 1 2 2 2; +#X msg 381 108 matrix 1 4 2 3 1 2 3; +#X obj 373 130 mtx_print C_col; +#X obj 179 138 mtx_print B_row; +#X connect 1 0 13 0; +#X connect 3 0 11 0; +#X connect 3 1 0 0; +#X connect 11 0 8 0; +#X connect 12 0 3 0; +#X connect 13 0 12 0; +#X connect 13 1 14 0; +#X connect 13 2 15 0; +#X connect 14 0 11 1; +#X connect 14 0 17 0; +#X connect 15 0 11 2; +#X connect 15 0 16 0; diff --git a/abs/mtx_index_rowcol.pd b/abs/mtx_index_rowcol.pd new file mode 100644 index 0000000..0fdd1b6 --- /dev/null +++ b/abs/mtx_index_rowcol.pd @@ -0,0 +1,26 @@ +#N canvas 344 107 450 300 10; +#X obj 63 36 inlet; +#X text 65 15 matrix; +#X text 230 19 row idcs; +#X text 331 19 col idcs; +#X text 233 4 from mtx_find_rowcol:; +#X obj 233 37 inlet; +#X obj 336 37 inlet; +#X obj 121 118 mtx_rowcol2index; +#X obj 164 93 mtx; +#X obj 63 55 t a a; +#X obj 103 55 mtx_size; +#X obj 164 55 t b f; +#X obj 63 140 mtx_index; +#X obj 63 160 outlet; +#X connect 0 0 9 0; +#X connect 5 0 8 1; +#X connect 6 0 7 1; +#X connect 7 0 12 1; +#X connect 8 0 7 0; +#X connect 9 0 12 0; +#X connect 9 1 10 0; +#X connect 10 1 11 0; +#X connect 11 0 8 0; +#X connect 11 1 7 2; +#X connect 12 0 13 0; diff --git a/abs/mtx_index_rowcol_grid-help.pd b/abs/mtx_index_rowcol_grid-help.pd new file mode 100644 index 0000000..8d11175 --- /dev/null +++ b/abs/mtx_index_rowcol_grid-help.pd @@ -0,0 +1,33 @@ +#N canvas 91 491 841 379 10; +#X obj 75 133 mtx_print A; +#X msg 33 59 bang; +#X text 482 28 part of iemmatrix; +#X obj 33 132 t a a; +#X text 384 169 inletA: matrix/vector; +#X obj 33 232 mtx_print output; +#X obj 33 83 t b b b; +#X obj 305 136 mtx_print B_row; +#X msg 304 111 matrix 1 2 3 1; +#X text 43 34 [mtx_index_rowcol_grid]; +#X text 166 69 finds the values to the row and col grid indices in +a given matrix.; +#X text 383 195 inletB: col matrix/vector; +#X text 384 181 inletB: row matrix/vector; +#X msg 33 112 matrix 3 3 11 12 13 21 22 23 31 32 33; +#X obj 33 194 mtx_index_rowcol_grid; +#X msg 416 111 matrix 1 2 2 1; +#X obj 417 137 mtx_print B_col; +#X text 382 216 outleA: matrix containing the grid-indexed rows and +cols; +#X connect 1 0 6 0; +#X connect 3 0 14 0; +#X connect 3 1 0 0; +#X connect 6 0 13 0; +#X connect 6 1 8 0; +#X connect 6 2 15 0; +#X connect 8 0 7 0; +#X connect 8 0 14 1; +#X connect 13 0 3 0; +#X connect 14 0 5 0; +#X connect 15 0 14 2; +#X connect 15 0 16 0; diff --git a/abs/mtx_index_rowcol_grid.pd b/abs/mtx_index_rowcol_grid.pd new file mode 100644 index 0000000..3daef60 --- /dev/null +++ b/abs/mtx_index_rowcol_grid.pd @@ -0,0 +1,56 @@ +#N canvas -44 0 575 378 10; +#X obj 257 20 inlet; +#X text 303 20 row_idcs; +#X obj 257 40 mtx_:; +#X obj 257 78 mtx_- 1; +#X obj 241 159 mtx; +#X obj 241 179 mtx_* 1; +#X obj 241 199 mtx_repmat; +#X msg 306 177 1 \$1; +#X obj 257 59 mtx_transpose; +#X obj 383 20 inlet; +#X obj 383 40 mtx_:; +#X obj 128 182 mtx; +#X obj 128 203 mtx_repmat; +#X text 429 20 col_idcs; +#X msg 193 180 \$1 1; +#X obj 70 20 inlet; +#X text 68 4 matrix; +#X obj 128 283 mtx_+; +#X obj 70 329 outlet; +#X obj 70 305 mtx_index; +#X text 358 98 slices out given; +#X text 360 124 matrix rows and columns; +#X text 356 153 at the given row and col; +#X text 356 179 grid indices; +#X obj 383 63 mtx_size; +#X obj 257 99 mtx_size; +#X obj 70 63 t a a; +#X obj 100 89 mtx_size; +#X obj 151 110 t b b f; +#X connect 0 0 2 0; +#X connect 2 0 8 0; +#X connect 3 0 25 0; +#X connect 3 0 4 1; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 17 1; +#X connect 7 0 6 1; +#X connect 8 0 3 0; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 10 0 24 0; +#X connect 11 0 12 0; +#X connect 12 0 17 0; +#X connect 14 0 12 1; +#X connect 15 0 26 0; +#X connect 17 0 19 1; +#X connect 19 0 18 0; +#X connect 24 0 7 0; +#X connect 25 0 14 0; +#X connect 26 0 19 0; +#X connect 26 1 27 0; +#X connect 27 1 28 0; +#X connect 28 0 11 0; +#X connect 28 1 4 0; +#X connect 28 2 5 1; -- cgit v1.2.1