@Test public void imageDotProduct() { ImageFloat64 a = new ImageFloat64(width, height); ImageMiscOps.fillUniform(a, rand, 0, 10); double total = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { total += a.get(x, y) * a.get(x, y); } } double found = CirculantTracker.imageDotProduct(a); assertEquals(total, found, 1e-8); }