Here you can find the source of minOfCol(int[][] matrixTable, int colBound)
Parameter | Description |
---|---|
matrixTable | matrix of integer |
colBound | specific row |
private static int minOfCol(int[][] matrixTable, int colBound)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w . j av a2 s. c o m * minOfCol will return the minimum value of table based on specific column. * * @param matrixTable matrix of integer * @param colBound specific row * @return minCol */ private static int minOfCol(int[][] matrixTable, int colBound) { int min = matrixTable[0][colBound]; for (int idx = 1; idx < matrixTable.length; idx++) { if (matrixTable[idx][colBound] != 99999) { min = matrixTable[idx][colBound] < min ? matrixTable[idx][colBound] : min; } } return min; } }