org.graphnetwork.util
Class ArrayUtils

java.lang.Object
  extended by org.graphnetwork.util.ArrayUtils

public class ArrayUtils
extends java.lang.Object


Constructor Summary
ArrayUtils()
           
 
Method Summary
static int getIndexOfMaximum(int[] a)
          Find and returns the index of the maximum number in the array.
static int getIndexOfMinimum(int[] a)
          Find and returns the index of the minimum number in the array.
static int[] getIndicesOfMinimum(int[][] a)
          Find and returns the index of the minimum number in the array.
static int getMaximum(int[] a)
          Find and returns the maximum number in the array.
static int getMinimum(int[] a)
          Find and returns the minimum number in the array.
static int getMinimum(int[][] a)
          Find and returns the minimum number in the array.
static void printArray(double[] a)
          Prints the contents of the array.
static void printArray(int[] a)
          Prints the contents of the array.
static void printArray(int[][] a)
          Prints the contents of the array.
static void printArray(java.lang.Object[] a)
          Prints the contents of the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

printArray

public static void printArray(java.lang.Object[] a)
Prints the contents of the array.

Parameters:
a - the array to print the contents of

printArray

public static void printArray(double[] a)
Prints the contents of the array.

Parameters:
a - the array to print the contents of

printArray

public static void printArray(int[] a)
Prints the contents of the array.

Parameters:
a - the array to print the contents of

printArray

public static void printArray(int[][] a)
Prints the contents of the array.

Parameters:
a - the array to print the contents of

getMaximum

public static int getMaximum(int[] a)
Find and returns the maximum number in the array.

Parameters:
a - the array to search
Returns:
the maximum number

getIndexOfMaximum

public static int getIndexOfMaximum(int[] a)
Find and returns the index of the maximum number in the array.

Parameters:
a - the array to search
Returns:
the index of the maximum number

getMinimum

public static int getMinimum(int[] a)
Find and returns the minimum number in the array.

Parameters:
a - the array to search
Returns:
the minimum number

getIndexOfMinimum

public static int getIndexOfMinimum(int[] a)
Find and returns the index of the minimum number in the array.

Parameters:
a - the array to search
Returns:
the index of the minimum number

getMinimum

public static int getMinimum(int[][] a)
Find and returns the minimum number in the array.

Parameters:
a - the array to search
Returns:
the minimum number

getIndicesOfMinimum

public static int[] getIndicesOfMinimum(int[][] a)
Find and returns the index of the minimum number in the array.

Parameters:
a - the array to search
Returns:
an array of size 2 with the indices of the minimum number