// Path: src/process/features/Rectangle.java
// public class Rectangle {
//     private final int x;
//     private final int y;
//     private final int width;
//     private final int height;
// 
//     public Rectangle(int x, int y, int width, int height) {
//         this.x = x;
//         this.y = y;
//         this.width = width;
//         this.height = height;
//     }
// 
// 
//     public boolean conrains(int px, int py) {
// 
//         if (px >= x && px <= x + width && py >= y && py <= y + height)
//             return true;
//         else
//             return false;
// 
//     }
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     public int getWidth() {
//         return width;
//     }
// 
//     public int getHeight() {
//         return height;
//     }
// }
// 
// Path: src/process/ImageEvaluator.java
// public static ArrayList<Rectangle> getAllRectangles(int imageWidth, int imageHeight, float coeff, int xDisplacer, int yDisplacer, int minSlidingWindowSize, int maxSlidingWindowSize) {
// 
//     if (coeff <= 1) {
//         System.err.println("Error for coeff in getAllRectanges, coeff should be > 1. coeff=" + coeff + " Aborting now!");
//         System.exit(1);
//     }
// 
//     if (minSlidingWindowSize * coeff == minSlidingWindowSize) {
//         System.err.println("Coeff too small, cannot scale minwindow. Aborting now!");
//         System.exit(1);
//     }
// 
//     ArrayList<Rectangle> rectangles = new ArrayList<>();
//     for (int frame = minSlidingWindowSize; frame <= maxSlidingWindowSize; frame *= coeff) {
//         for (int x = 0; x <= imageWidth - frame; x += xDisplacer) {
//             for (int y = 0; y <= imageHeight - frame; y += yDisplacer) {
//                 rectangles.add(new Rectangle(x, y, frame, frame));
//             }
//         }
//     }
// 
//     return rectangles;
// }


import org.junit.Assert;
import org.junit.Test;
import process.features.Rectangle;
import java.util.ArrayList;
import static process.ImageEvaluator.getAllRectangles;
package process;




public class TestEvaluateImage {

    @Test
    public void getAllRectanglesTest() {
        ArrayList<Rectangle> rectangles = getAllRectangles(19, 19, 1.25f, 1, 1, 19, 19);
        Assert.assertEquals(1, rectangles.size());

        rectangles = getAllRectangles(19, 18, 1.25f, 1, 1, 19, 19);
        Assert.assertEquals(0, rectangles.size());

        rectangles = getAllRectangles(19, 20, 1.25f, 1, 1, 19, 20);
// Path: src/process/features/Rectangle.java
// public class Rectangle {
//     private final int x;
//     private final int y;
//     private final int width;
//     private final int height;
// 
//     public Rectangle(int x, int y, int width, int height) {
//         this.x = x;
//         this.y = y;
//         this.width = width;
//         this.height = height;
//     }
// 
// 
//     public boolean conrains(int px, int py) {
// 
//         if (px >= x && px <= x + width && py >= y && py <= y + height)
//             return true;
//         else
//             return false;
// 
//     }
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     public int getWidth() {
//         return width;
//     }
// 
//     public int getHeight() {
//         return height;
//     }
// }
// 
// Path: src/process/ImageEvaluator.java
// public static ArrayList<Rectangle> getAllRectangles(int imageWidth, int imageHeight, float coeff, int xDisplacer, int yDisplacer, int minSlidingWindowSize, int maxSlidingWindowSize) {
// 
//     if (coeff <= 1) {
//         System.err.println("Error for coeff in getAllRectanges, coeff should be > 1. coeff=" + coeff + " Aborting now!");
//         System.exit(1);
//     }
// 
//     if (minSlidingWindowSize * coeff == minSlidingWindowSize) {
//         System.err.println("Coeff too small, cannot scale minwindow. Aborting now!");
//         System.exit(1);
//     }
// 
//     ArrayList<Rectangle> rectangles = new ArrayList<>();
//     for (int frame = minSlidingWindowSize; frame <= maxSlidingWindowSize; frame *= coeff) {
//         for (int x = 0; x <= imageWidth - frame; x += xDisplacer) {
//             for (int y = 0; y <= imageHeight - frame; y += yDisplacer) {
//                 rectangles.add(new Rectangle(x, y, frame, frame));
//             }
//         }
//     }
// 
//     return rectangles;
// }


// Path: test/process/TestEvaluateImage.java
import org.junit.Assert;
import org.junit.Test;
import process.features.Rectangle;
import java.util.ArrayList;
import static process.ImageEvaluator.getAllRectangles;

package process;




public class TestEvaluateImage {

    @Test
    public void getAllRectanglesTest() {
        ArrayList<Rectangle> rectangles = getAllRectangles(19, 19, 1.25f, 1, 1, 19, 19);
        Assert.assertEquals(1, rectangles.size());

        rectangles = getAllRectangles(19, 18, 1.25f, 1, 1, 19, 19);
        Assert.assertEquals(0, rectangles.size());

        rectangles = getAllRectangles(19, 20, 1.25f, 1, 1, 19, 20);
        Assert.assertEquals(2, rectangles.size());