object Quick3Way extends Quick
Implements a 3-way quick sort algorithm for sorting arrays in place.
Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.
- See also
Section 2.3 of Algorithms, 4th Edition
Algorithms, 4th edition by Robert Sedgewick and Kevin Wayne, Addison-Wesley Professional, 2011, ISBN 0-321-57351-X. http://algs4.cs.princeton.edu
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Quick3Way
- Quick
- Sort
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isSorted[E](a: Array[E]): Unit
[use case]
-
def
lt[E](v: E, w: E)(implicit ord: Ordering[E]): Boolean
- returns
v<w
- Attributes
- protected
- Definition Classes
- Sort
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def sort[E](a: Array[E], lo: Int, hi: Int)(implicit ord: Ordering[E]): Unit
-
def
sort[E](a: Array[E]): Unit
[use case]
-
def
swap[E](a: Array[E], i: Int, j: Int): Unit
Swaps ai and aj.
Swaps ai and aj.
- Attributes
- protected
- Definition Classes
- Sort
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Quick3Way → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )