it.unipd.dei.ims.nestor.experiment.utils
Class ArrayUtils

java.lang.Object
  extended by it.unipd.dei.ims.nestor.experiment.utils.ArrayUtils

public class ArrayUtils
extends java.lang.Object


Constructor Summary
ArrayUtils()
           
 
Method Summary
static java.lang.String[] hashMapContentToArray(java.util.HashMap<java.lang.Integer,java.lang.String> map)
           
static int[] hashMapToArrayForINSM(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)
           
static int[][] hashMaptoMatrix(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)
           
static java.util.HashMap<java.lang.Integer,int[]> hashMaptoSortedArraysMap(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)
           
static int[][] hashMaptoSortedArraysMatrix(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)
           
static java.lang.String[] listContentToArray(java.util.ArrayList<java.lang.String> list)
           
static Node[] listNodeToArray(java.util.ArrayList<Node> list)
           
static int[] listToArray(java.util.ArrayList<java.lang.Integer> list)
           
static int[][] resizeXDimension(int[][] array, int yPoint)
           
static int[][] resizeYDimension(int[][] array)
           
static int[][] sortMatrix(int[][] matrix)
           
static int[][] treeToChildrenMatrix(Tree tree)
          Returns the matrix of the children of each node in a tree.
static int[][] treeToElementsMatrix(Tree tree)
          Returns the matrix of the elements of each node in a tree.
static int[] treeToParentsArray(Tree tree)
          Returns the array of the parent of each node in a tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

resizeYDimension

public static int[][] resizeYDimension(int[][] array)

resizeXDimension

public static int[][] resizeXDimension(int[][] array,
                                       int yPoint)

listToArray

public static int[] listToArray(java.util.ArrayList<java.lang.Integer> list)

listContentToArray

public static java.lang.String[] listContentToArray(java.util.ArrayList<java.lang.String> list)

listNodeToArray

public static Node[] listNodeToArray(java.util.ArrayList<Node> list)

hashMaptoMatrix

public static int[][] hashMaptoMatrix(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)

hashMapContentToArray

public static java.lang.String[] hashMapContentToArray(java.util.HashMap<java.lang.Integer,java.lang.String> map)

hashMapToArrayForINSM

public static int[] hashMapToArrayForINSM(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)

treeToChildrenMatrix

public static int[][] treeToChildrenMatrix(Tree tree)
Returns the matrix of the children of each node in a tree.

Parameters:
tree -
Returns:

treeToElementsMatrix

public static int[][] treeToElementsMatrix(Tree tree)
Returns the matrix of the elements of each node in a tree.

Parameters:
tree -
Returns:

treeToParentsArray

public static int[] treeToParentsArray(Tree tree)
Returns the array of the parent of each node in a tree.

Parameters:
tree -
Returns:

hashMaptoSortedArraysMap

public static java.util.HashMap<java.lang.Integer,int[]> hashMaptoSortedArraysMap(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)

hashMaptoSortedArraysMatrix

public static int[][] hashMaptoSortedArraysMatrix(java.util.HashMap<java.lang.Integer,java.util.ArrayList<java.lang.Integer>> map)

sortMatrix

public static int[][] sortMatrix(int[][] matrix)