Terrier IR Platform
2.2.1

uk.ac.gla.terrier.sorting
Class SortAscendingVectors

java.lang.Object
  extended by uk.ac.gla.terrier.sorting.SortAscendingVectors

public class SortAscendingVectors
extends java.lang.Object

This class sorts one or more arrays, based on sorting a key array, ie where the corresponding entries are related. The result is that the first array is sorted in ascending order, and the second is transformed in a way that the corresponding entries are in the correct places. This class replaces SortAscending*Vectors.

Version:
$Revision: 1.11 $
Author:
Gianni Amati, Craig Macdonald, Vassilis Plachouras

Constructor Summary
SortAscendingVectors()
           
 
Method Summary
static void sort(int[] a, int[][] u)
          Sort the vectors contained in u with respect to the ascending order of the vector a.
static void sort2(int[] a, int[] u)
          Sorts the two vectors with respect to the ascending order of the first one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortAscendingVectors

public SortAscendingVectors()
Method Detail

sort

public static void sort(int[] a,
                        int[][] u)
Sort the vectors contained in u with respect to the ascending order of the vector a.

Parameters:
a - the first vector to sort (the key vector)
u - the vector of vectors to sort with respect to a

sort2

public static void sort2(int[] a,
                         int[] u)
Sorts the two vectors with respect to the ascending order of the first one.

Parameters:
a - the first vector to sort.
u - the second vector to sort.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow