package adt

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait Bag [A] extends Iterable[A]

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  2. abstract class HeapPriorityQueue [Key] extends ResizingArrayPriorityQueue[Key]

    This abstract class represents a priority queue of generic keys.

    This abstract class represents a priority queue of generic keys. It supports the usual insert and delete operations, along with methods for peeking at the highest-priority key, testing if the priority queue is empty, and iterating through the keys.

    The super trait PriorityQueue supports both minimum and maximum priority-key implementations by means of the ht method.

    This implementation uses a binary heap based on a resizing array. Enqueuing and dequeuing operations take logarithmic amortized time. The peek, size, and isEempty operations take constant time.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 2.4 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

  3. abstract class IndexPriorityQueue [Key] extends Iterable[Key]

    This abstract class represents an indexed priority queue of generic keys.

    This abstract class represents an indexed priority queue of generic keys. It supports the usual insert and delete operations, along with methods for changing a given key, peeking at the highest-priority key, testing if the priority queue is empty, and iterating through the keys.

    In order to let the client refer to items on the priority queue, an integer between 0 and length-1 is associated with each key;the client uses this integer to specify which key to delete or change.

    This implementation uses a binary heap along with additional arrays to associate keys with integers in the given range.

    The insert, delete and change-key, operations take logarithmic time. The is-empty, size, highest-index, highest-key and key-of operations take constant time. Construction takes time proportional to the specified capacity.

    This abstract class supports both minimum and maximum priority-key implementations by means of the ht method.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 2.4 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

  4. class LinkedBag [A] extends Bag[A]

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    This implementation uses a singly-linked list. The add, isEmpty, and size operations take constant time. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  5. trait LinkedPriorityQueue [Key] extends PriorityQueue[Key]
  6. class LinkedQueue [A] extends Queue[A]

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item,

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item,

    This implementation uses a singly-linked list. The enqueue, dequeue, peek, size, and isEmpty operations all take constant time in the worst case. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  7. class LinkedStack [A] extends Stack[A]

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    This implementation uses a singly-linked list. The push, pop, peek, size, and isEmpty operations all take constant time in the worst case. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  8. abstract class OrderedLinkedPriorityQueue [Key] extends LinkedPriorityQueue[Key]
  9. abstract class OrderedResizingArrayPriorityQueue [Key] extends ResizingArrayPriorityQueue[Key]
  10. trait PriorityQueue [Key] extends Iterable[Key]

    This trait represents a priority queue of generic keys.

    This trait represents a priority queue of generic keys. It supports the usual insert and delete operations, along with methods for peeking at the highest-priority key, testing if the priority queue is empty, and iterating through the keys.

    This trait supports both minimum and maximum priority-key implementations by means of the ht method.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 2.4 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

  11. trait Queue [A] extends Iterable[A]

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item, testing if the queue is empty, and iterating through the items in FIFO order.

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item, testing if the queue is empty, and iterating through the items in FIFO order.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  12. class ResizingArrayBag [A] extends Bag[A]

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    Provides a bag (or multiset) of generic items, supporting insertion and iterating over the items in arbitrary order.

    This implementation uses a resizing array. The add operation takes constant amortized time; the isEmpty, and size operations take constant time. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  13. abstract class ResizingArrayPriorityQueue [Key] extends PriorityQueue[Key]
  14. class ResizingArrayQueue [A] extends Queue[A]

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item,

    Provides a FIFO queue of generic items, supporting enqueue and dequeue operations, along with methods for peeking at the first item,

    This implementation uses a resizing array, which doubles the underlying array when it is full and halves the underlying array when it is one-quarter full. The enqueue and dequeue operations take constant amortized time. The size, peek, and isEmpty operations take constant time in the worst case. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  15. class ResizingArrayStack [A] extends Stack[A]

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    This implementation uses a resizing array, which doubles the underlying array when it is full and halves the underlying array when it is one-quarter full. The push and pop operations take constant amortized time. The size, peek, and isEmpty operations take constant time in the worst case. Iteration takes time proportional to the number of items.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  16. trait Stack [A] extends Iterable[A]

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    Provides a LIFO stack of generic items, supporting push and pop operations, along with methods for peeking at the top item, testing if the stack is empty, and iterating through the items in LIFO order.

    Adapted from the book Algorithms 4 by R. Sedgewick and K. Wayne.

    See also

    Section 1.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

  17. abstract class UnorderedLinkedPriorityQueue [Key] extends LinkedPriorityQueue[Key]
  18. abstract class UnorderedResizingArrayPriorityQueue [Key] extends ResizingArrayPriorityQueue[Key]

Ungrouped