loom
1import "tf" tf;
2
3float x1 = -1;
4float x2 = 4;
5float f [4, 2] = [
6[0.0, 1.0],
7[3.0, 2.0],
8[4.5, 0.0],
9[6.7, 3.0]
10];
11
12print tf.linear1(x1, f);
13print tf.linear1(x2, f);
14print tf.nearest1(x1, f);
15print tf.nearest1(x2, f);
16