test_class.declarator: tester = new Quick<Integer>()
test_class.original_string: Quick<Integer> tester = new Quick<Integer>();
test_class.type: Quick<Integer>
test_class.var_name: tester
test_class.file: clrs/07_quicksort/src/QuickTest.java
test_class.identifier: QuickTest
test_case.body: @Test
  	public void testPartition() {
  		List<Integer> input = Arrays.asList(5, 7, 9, 1, 3, 4);
  		List<Integer> expectedOutput = Arrays.asList(1, 3, 4, 5, 7, 9);
  		int newPivot = tester.partition(input, 0, input.size() - 1);
  		assertEquals(2, newPivot);
  		assertArrayEquals(expectedOutput.toArray(), input.toArray());
  	}
test_case.class_method_signature: QuickTest.testPartition()
test_case.full_signature: @Test public void testPartition()
test_case.identifier: testPartition
test_case.invocations: asList asList partition size assertEquals assertArrayEquals toArray toArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPartition()
focal_class.declarator: generator
focal_class.original_string: Random generator;
focal_class.type: Random
focal_class.var_name: generator
focal_class.file: clrs/07_quicksort/src/Quick.java
focal_class.identifier: Quick
focal_class.class_method_signature: Quick.Quick()
focal_class.full_signature:   Quick()
focal_class.identifier: Quick
focal_class.parameters: ()
focal_class.signature:  Quick()
focal_class.class_method_signature: Quick.Quick(Random generator)
focal_class.full_signature:   Quick(Random generator)
focal_class.identifier: Quick
focal_class.parameters: (Random generator)
focal_class.signature:  Quick(Random generator)
focal_class.class_method_signature: Quick.sort(List<T> A)
focal_class.full_signature: static void sort(List<T> A)
focal_class.identifier: sort
focal_class.modifiers: static
focal_class.parameters: (List<T> A)
focal_class.return: void
focal_class.signature: void sort(List<T> A)
focal_class.class_method_signature: Quick.randomizedSort(List<T> A)
focal_class.full_signature: static void randomizedSort(List<T> A)
focal_class.identifier: randomizedSort
focal_class.modifiers: static
focal_class.parameters: (List<T> A)
focal_class.return: void
focal_class.signature: void randomizedSort(List<T> A)
focal_class.class_method_signature: Quick.partition(List<T> A, int p, int r)
focal_class.full_signature: public int partition(List<T> A, int p, int r)
focal_class.identifier: partition
focal_class.modifiers: public
focal_class.parameters: (List<T> A, int p, int r)
focal_class.return: int
focal_class.signature: int partition(List<T> A, int p, int r)
focal_class.class_method_signature: Quick.randomizedPartition(List<T> A, int p, int r)
focal_class.full_signature: public int randomizedPartition(List<T> A, int p, int r)
focal_class.identifier: randomizedPartition
focal_class.modifiers: public
focal_class.parameters: (List<T> A, int p, int r)
focal_class.return: int
focal_class.signature: int randomizedPartition(List<T> A, int p, int r)
focal_class.class_method_signature: Quick.randomizedQuicksort(List<T> A, int p, int r)
focal_class.full_signature: public void randomizedQuicksort(List<T> A, int p, int r)
focal_class.identifier: randomizedQuicksort
focal_class.modifiers: public
focal_class.parameters: (List<T> A, int p, int r)
focal_class.return: void
focal_class.signature: void randomizedQuicksort(List<T> A, int p, int r)
focal_class.class_method_signature: Quick.quicksort(List<T> A, int p, int r)
focal_class.full_signature: public void quicksort(List<T> A, int p, int r)
focal_class.identifier: quicksort
focal_class.modifiers: public
focal_class.parameters: (List<T> A, int p, int r)
focal_class.return: void
focal_class.signature: void quicksort(List<T> A, int p, int r)
focal_class.class_method_signature: Quick.exchange(List<T> A, int i, int j)
focal_class.full_signature: private void exchange(List<T> A, int i, int j)
focal_class.identifier: exchange
focal_class.modifiers: private
focal_class.parameters: (List<T> A, int i, int j)
focal_class.return: void
focal_class.signature: void exchange(List<T> A, int i, int j)
focal_method.body: public int partition(List<T> A, int p, int r) {
  		T x = A.get(r);  					 // pivot value
  		int i = p - 1;						 // where we start comparisons to pivot.
  		for (int j = p; j <= (r - 1); j++) { // from first element to before the pivot
  			if (A.get(j).compareTo(x) < 0) { // is this smaller than the pivot?
  				i += 1;
  				exchange(A, i, j);
  			}
  		}
  		// i+1 is the new pivot
  		exchange(A, i+1, r);
  		return (i+1);
  	}
focal_method.class_method_signature: Quick.partition(List<T> A, int p, int r)
focal_method.full_signature: public int partition(List<T> A, int p, int r)
focal_method.identifier: partition
focal_method.invocations: get compareTo get exchange exchange
focal_method.modifiers: public
focal_method.parameters: (List<T> A, int p, int r)
focal_method.return: int
focal_method.signature: int partition(List<T> A, int p, int r)