-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOverAllInput.java
32 lines (30 loc) · 1.2 KB
/
OverAllInput.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Austin Briggs and Nick Evans
* CSE 332 AB
* Project 3B
*
* OverAllInput is a holder class that contains relevant data for calculations that
* don't change with queries or parallelism
*/
public class OverAllInput {
public int gridX; // The width of the grid ie max x coordinate
public int gridY; // The height of the grid ie max y coordinate
public Rectangle usCorners; // The locations of the four corners of the united states
public CensusGroup[] census; // Census array
public float dLong; // The change in longitude for every x.
public float dLat; // The change in latitude for every y.
/** Constructs OverAllInput object
* @param horizontal is the number of columns
* @param vertical is the number of rows
* @param corners is the locations of the four corners of the united states
* @param census is the CensusGroup[] that represents the united states
* */
public OverAllInput(int horizontal, int vertical, Rectangle corners, CensusGroup[] census){
this.gridX = horizontal;
this.gridY = vertical;
this.usCorners = corners;
this.census = census;
this.dLong = (corners.right - corners.left) / horizontal;
this.dLat = (corners.top - corners.bottom) / vertical;
}
}