Kernel implements Serializable { public Kernel mul(double v) { for (int i = 0; i < values.length; i++) { values[i] *= v; } return this; } Kernel(int offset, double[] values);  Kernel(double... values); static Kernel getBinomial(double variance); static Kernel getBinomial(int size); static Kernel getUniform(int size, int offset, double value); double get(int i); int getOffset(); int size(); int getMinIndex(); int getMaxIndex(); Kernel add(double v); Kernel add(Kernel k); Kernel mul(double v); Kernel mul(Kernel k); Kernel normalize(); Kernel negate();  }
@Test public void testMul() { Kernel k1 = new Kernel(1.0, 2.0); Kernel k2 = new Kernel(3.0); k1.mul(k2); assertEquals(6.0, k1.get(0), DELTA); k1.mul(2.0); assertEquals(12.0, k1.get(0), DELTA); }