aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generics/associative-test.pd36
-rw-r--r--generics/commutative-test.pd28
-rw-r--r--generics/distributive-test.pd32
-rw-r--r--generics/fnorm.pd8
-rw-r--r--generics/invertible-test.pd32
5 files changed, 72 insertions, 64 deletions
diff --git a/generics/associative-test.pd b/generics/associative-test.pd
index 71d6852..ee3ca36 100644
--- a/generics/associative-test.pd
+++ b/generics/associative-test.pd
@@ -1,7 +1,5 @@
-#N canvas 736 151 452 362 10;
+#N canvas 736 151 452 267 10;
#X obj 40 15 inlet bang;
-#X obj 40 112 abs;
-#X obj 126 112 abs;
#X obj 40 131 /;
#X obj 40 150 t a a;
#X obj 40 188 pack 0 0;
@@ -13,18 +11,20 @@
#X obj 40 74 unpack 0 0 0;
#X msg 40 207 list associative1 \$1 \$2 -;
#X obj 40 93 associator \$2;
-#X connect 0 0 10 0;
-#X connect 1 0 3 0;
-#X connect 2 0 3 1;
-#X connect 3 0 4 0;
-#X connect 4 0 8 0;
-#X connect 4 1 5 1;
-#X connect 5 0 12 0;
-#X connect 8 0 5 0;
-#X connect 10 0 11 0;
-#X connect 11 0 13 0;
-#X connect 11 1 13 1;
-#X connect 11 2 13 2;
-#X connect 12 0 6 0;
-#X connect 13 0 1 0;
-#X connect 13 1 2 0;
+#X obj 40 112 \$1norm;
+#X obj 126 112 \$1norm;
+#X connect 0 0 8 0;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 2 1 3 1;
+#X connect 3 0 10 0;
+#X connect 6 0 3 0;
+#X connect 8 0 9 0;
+#X connect 9 0 11 0;
+#X connect 9 1 11 1;
+#X connect 9 2 11 2;
+#X connect 10 0 4 0;
+#X connect 11 0 12 0;
+#X connect 11 1 13 0;
+#X connect 12 0 1 0;
+#X connect 13 0 1 1;
diff --git a/generics/commutative-test.pd b/generics/commutative-test.pd
index 559b3bf..ddc7822 100644
--- a/generics/commutative-test.pd
+++ b/generics/commutative-test.pd
@@ -1,7 +1,6 @@
#N canvas 380 66 452 291 10;
#X obj 40 15 inlet bang;
#X obj 40 79 unpack 0 0;
-#X obj 33 122 abs;
#X obj 33 151 /;
#X msg 40 34 1 3;
#X text 216 9 This test verifies that 1+3=3+1;
@@ -11,20 +10,21 @@
#X text 217 44 with tolerance 0;
#X obj 33 189 <= 0;
#X msg 33 227 list commutative1 \$1 \$2 -;
-#X obj 119 122 abs;
#X text 218 23 and 1*3=3*1 and...;
#X obj 33 103 commutator \$2;
-#X connect 0 0 4 0;
-#X connect 1 0 14 0;
-#X connect 1 1 14 1;
-#X connect 2 0 3 0;
-#X connect 3 0 6 0;
-#X connect 4 0 1 0;
+#X obj 33 122 \$1norm;
+#X obj 119 122 \$1norm;
+#X connect 0 0 3 0;
+#X connect 1 0 12 0;
+#X connect 1 1 12 1;
+#X connect 2 0 5 0;
+#X connect 3 0 1 0;
+#X connect 5 0 9 0;
+#X connect 5 1 6 1;
#X connect 6 0 10 0;
-#X connect 6 1 7 1;
-#X connect 7 0 11 0;
+#X connect 9 0 6 0;
#X connect 10 0 7 0;
-#X connect 11 0 8 0;
-#X connect 12 0 3 1;
-#X connect 14 0 2 0;
-#X connect 14 1 12 0;
+#X connect 12 0 13 0;
+#X connect 12 1 14 0;
+#X connect 13 0 2 0;
+#X connect 14 0 2 1;
diff --git a/generics/distributive-test.pd b/generics/distributive-test.pd
index 202e1aa..959d6e4 100644
--- a/generics/distributive-test.pd
+++ b/generics/distributive-test.pd
@@ -1,30 +1,30 @@
#N canvas 665 86 452 291 10;
#X obj 40 15 inlet bang;
-#X obj 37 122 abs;
#X obj 37 151 /;
#X obj 37 170 t a a;
#X obj 37 208 pack 0 0;
#X obj 37 246 outlet;
#X text 157 24 with tolerance 0;
#X obj 37 189 <= 0;
-#X obj 130 122 abs;
#X text 156 9 This test verifies that 3*(4+5)=3*4+3*5;
#X msg 40 34 3 4 5;
#X obj 40 82 unpack 0 0 0;
#X msg 37 227 list distributive1 \$1 \$2 -;
#X obj 37 103 distributor \$2;
-#X connect 0 0 10 0;
+#X obj 37 122 \$1norm;
+#X obj 130 122 \$1norm;
+#X connect 0 0 8 0;
#X connect 1 0 2 0;
-#X connect 2 0 3 0;
-#X connect 3 0 7 0;
-#X connect 3 1 4 1;
-#X connect 4 0 12 0;
-#X connect 7 0 4 0;
-#X connect 8 0 2 1;
-#X connect 10 0 11 0;
-#X connect 11 0 13 0;
-#X connect 11 1 13 1;
-#X connect 11 2 13 2;
-#X connect 12 0 5 0;
-#X connect 13 0 1 0;
-#X connect 13 1 8 0;
+#X connect 2 0 6 0;
+#X connect 2 1 3 1;
+#X connect 3 0 10 0;
+#X connect 6 0 3 0;
+#X connect 8 0 9 0;
+#X connect 9 0 11 0;
+#X connect 9 1 11 1;
+#X connect 9 2 11 2;
+#X connect 10 0 4 0;
+#X connect 11 0 12 0;
+#X connect 11 1 13 0;
+#X connect 12 0 1 0;
+#X connect 13 0 1 1;
diff --git a/generics/fnorm.pd b/generics/fnorm.pd
new file mode 100644
index 0000000..ad4f405
--- /dev/null
+++ b/generics/fnorm.pd
@@ -0,0 +1,8 @@
+#N canvas 462 350 544 148 10;
+#X obj 23 20 inlet f;
+#X obj 23 58 outlet f;
+#X obj 23 39 abs;
+#X text 101 18 \$1norm takes a value of type \$1 and produces a nonnegative
+float \, normally using L2-norm formulas;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
diff --git a/generics/invertible-test.pd b/generics/invertible-test.pd
index 2253ff4..0596485 100644
--- a/generics/invertible-test.pd
+++ b/generics/invertible-test.pd
@@ -1,7 +1,6 @@
#N canvas 665 86 452 291 10;
#X obj 40 15 inlet bang;
#X obj 40 79 unpack 0 0;
-#X obj 33 122 abs;
#X obj 33 151 /;
#X msg 40 34 1 3;
#X obj 33 170 t a a;
@@ -9,21 +8,22 @@
#X obj 33 246 outlet;
#X text 217 24 with tolerance 0;
#X obj 33 189 <= 0;
-#X obj 126 122 abs;
#X text 215 9 This test verifies that 1+3-3=1;
#X msg 33 227 list invertible1 \$1 \$2 -;
#X obj 33 103 invertor \$2 \$3;
-#X connect 0 0 4 0;
-#X connect 1 0 13 0;
-#X connect 1 1 13 1;
-#X connect 2 0 3 0;
-#X connect 3 0 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 9 0;
-#X connect 5 1 6 1;
-#X connect 6 0 12 0;
-#X connect 9 0 6 0;
-#X connect 10 0 3 1;
-#X connect 12 0 7 0;
-#X connect 13 0 2 0;
-#X connect 13 1 10 0;
+#X obj 33 122 \$1norm;
+#X obj 126 122 \$1norm;
+#X connect 0 0 3 0;
+#X connect 1 0 11 0;
+#X connect 1 1 11 1;
+#X connect 2 0 4 0;
+#X connect 3 0 1 0;
+#X connect 4 0 8 0;
+#X connect 4 1 5 1;
+#X connect 5 0 10 0;
+#X connect 8 0 5 0;
+#X connect 10 0 6 0;
+#X connect 11 0 12 0;
+#X connect 11 1 13 0;
+#X connect 12 0 2 0;
+#X connect 13 0 2 1;