Kernel implements Serializable { public Kernel negate() { mul(-1.0); 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 testNegate() { Kernel k = new Kernel(1.0, 1.0); k.negate(); assertEquals(-1.0, k.get(-1), DELTA); assertEquals(-1.0, k.get( 0), DELTA); }