comirva.util.external
Class TopNItemsDistances
java.lang.Object
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.
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 |
CLOSEST_N
public static int CLOSEST_N
USE_IDX_INSTEADOF_FILENAME
public static boolean USE_IDX_INSTEADOF_FILENAME
TopNItemsDistances
public TopNItemsDistances()
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 algorithmrightBorder
- the right border for the Quick-Sort algorithmsortArray
- a float[] representing the values to be sortedmetaDataArray
- a String[] representing the meta-data to be updated according to new order after the sort