comirva.util.external
Class TopNItemsDistances

java.lang.Object
  extended by comirva.util.external.TopNItemsDistances

public class TopNItemsDistances
extends Object

This class only extracts the nearest N items (per item) from a complete distance matrix and stores them in another matrix into a text file.


Field Summary
static int CLOSEST_N
           
static boolean USE_IDX_INSTEADOF_FILENAME
           
 
Constructor Summary
TopNItemsDistances()
           
 
Method Summary
static void doQuickSort(int leftBorder, int rightBorder, double[] sortArray, String[] metaDataArray)
          Uses Quick-Sort to sort the array sortArray and adapt the array metaDataArray accordingly.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSEST_N

public static int CLOSEST_N

USE_IDX_INSTEADOF_FILENAME

public static boolean USE_IDX_INSTEADOF_FILENAME
Constructor Detail

TopNItemsDistances

public TopNItemsDistances()
Method Detail

main

public static void main(String[] args)

doQuickSort

public static void doQuickSort(int leftBorder,
                               int rightBorder,
                               double[] sortArray,
                               String[] metaDataArray)
Uses Quick-Sort to sort the array sortArray and adapt the array metaDataArray accordingly. Sorting is performed in decreasing order.

Parameters:
leftBorder - the left border for the Quick-Sort algorithm
rightBorder - the right border for the Quick-Sort algorithm
sortArray - a float[] representing the values to be sorted
metaDataArray - a String[] representing the meta-data to be updated according to new order after the sort