PIP.Collections.Distribution
Class HistogramUtility

java.lang.Object
  extended by PIP.Collections.Distribution.HistogramUtility

public class HistogramUtility
extends java.lang.Object

This is just a helper class for analysis code


Constructor Summary
HistogramUtility()
           
 
Method Summary
static
<E extends java.util.Collection>
void
histogramCollectionSizes(java.util.Collection<E> mainCollection, Distribution<java.lang.Integer> hist)
           
static void saveAsCSVDataFile(Histogram hist, java.lang.String name)
          This saves the histogram in csv format in the directory which is the DATADIR property
static void sortByKeyAndSave(Histogram<java.lang.Integer> hist, java.lang.String fileName)
          This saves the histogram in csv format in the order of the key value in the directory which is the DATADIR property
static void sortByValueAndSave(Histogram<java.lang.Integer> hist, java.lang.String fileName)
          This saves the histogram in csv format in the order of the value in the directory which is the DATADIR property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistogramUtility

public HistogramUtility()
Method Detail

histogramCollectionSizes

public static <E extends java.util.Collection> void histogramCollectionSizes(java.util.Collection<E> mainCollection,
                                                                             Distribution<java.lang.Integer> hist)

saveAsCSVDataFile

public static void saveAsCSVDataFile(Histogram hist,
                                     java.lang.String name)
                              throws java.io.IOException
This saves the histogram in csv format in the directory which is the DATADIR property

Parameters:
hist -
Throws:
java.io.FileNotFoundException
java.io.IOException

sortByKeyAndSave

public static void sortByKeyAndSave(Histogram<java.lang.Integer> hist,
                                    java.lang.String fileName)
                             throws java.io.FileNotFoundException
This saves the histogram in csv format in the order of the key value in the directory which is the DATADIR property

Parameters:
hist -
fileName -
Throws:
java.io.FileNotFoundException

sortByValueAndSave

public static void sortByValueAndSave(Histogram<java.lang.Integer> hist,
                                      java.lang.String fileName)
                               throws java.io.FileNotFoundException
This saves the histogram in csv format in the order of the value in the directory which is the DATADIR property

Parameters:
hist -
fileName -
Throws:
java.io.FileNotFoundException