Java Array Min Value minOfCol(int[][] matrixTable, int colBound)

Here you can find the source of minOfCol(int[][] matrixTable, int colBound)

Description

minOfCol will return the minimum value of table based on specific column.

License

Open Source License

Parameter

Parameter Description
matrixTable matrix of integer
colBound specific row

Return

minCol

Declaration

private static int minOfCol(int[][] matrixTable, int colBound) 

Method Source Code

//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;
    }
}

Related

  1. minNonNeg(int... vals)
  2. minNum(Number iArr[])
  3. minOf(double[] da, double val)
  4. minOfArr(int[] arrInput)
  5. minOfArray(float[] array)
  6. minOfSortedValues(double[] sortedValues)
  7. minOfSubRange(double[] xs, int start, int end)
  8. minOverArraySubset(double[] array, Iterable subset)
  9. minPrim(final int... numbers)