public static int getLowestInColumnIndex(double[] [] data, int col){ double min =data (0] [col] ; int location = -1; for(int i =0; i= 0 && coldata[i] [col]) { min = data[i] [col); location = i; return location; public static int getLowestInRowIndex(double[][] data, int row) { double min = data[row] [0]; int location = 0; for(int col = 1; coldata(row] [col]) { location = col; return location;
Ok so I have been working on these two methods( I put my code in the screen shots) getLowestColumnINdex and getLowestRowIndex
1.
getLowestInColumnIndex
public static int getLowestInColumnIndex(double[][] data,
int col)
Returns the index of the smallest element of the selected column in the two dimensional array index 0 refers to the first column. If a row in the two dimensional array doesn't have this column index, it is not an error, it doesn't participate in this method
2.
getLowestInRowIndex
public static int getLowestInRowIndex(double[][] data,
int row)
Returns the index of the smallest element of the selected row in the two dimensional array index 0 refers to the first row.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images