comirva.util
Class VectorSort

java.lang.Object
  extended by comirva.util.VectorSort

public class VectorSort
extends java.lang.Object

This class implements special algorithms needed for sorting data vectors and updating their accompanying meta-data vectors.

Author:
Markus Schedl

Constructor Summary
VectorSort()
           
 
Method Summary
static void sortWithMetaData(java.util.Vector sort, java.util.Vector metaData)
          Sorts the Vector sort in decreasing order and also updates the Vector metaData.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorSort

public VectorSort()
Method Detail

sortWithMetaData

public static void sortWithMetaData(java.util.Vector sort,
                                    java.util.Vector metaData)
Sorts the Vector sort in decreasing order and also updates the Vector metaData. Each element in Vector sort is considered to have a meta-data element in Vector metaData at the same position. For example, metaData.elementAt[i] is considered to be a String describing the value sort.elementAt[i]. After the sort, the Vector sort is sorted and the Vector metaData is adapted according to the new positions of the values in sort.

Parameters:
sort - a Vector containing Doubles that represent a distance vector
metaData - a Vector containing Strings that represent the meta-data to be adapted