Package

cats

collections

Permalink

package collections

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. collections
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AvlMap[K, V] extends AnyRef

    Permalink

    A tree based immutable map.

  2. trait AvlMapInstances extends AnyRef

    Permalink
  3. sealed abstract class AvlSet[A] extends AnyRef

    Permalink

    An immutable, ordered, extensional set

    An immutable, ordered, extensional set

    This data-structure maintains balance using the [AVL](https://en.wikipedia.org/wiki/AVL_tree) algorithm.

  4. trait AvlSetInstances extends AnyRef

    Permalink
  5. sealed abstract class BitSet extends AnyRef

    Permalink

    A fast, immutable BitSet.

    A fast, immutable BitSet.

    A Bitset is a specialized type of set that tracks the Int values it contains: for each integer value, a BitSet uses a single bit to track whether the value is present (1) or absent (0). Bitsets are often sparse, since "missing" bits can be assumed to be zero.

    Unlike scala's default immutable this BitSet does not do a full copy on each added value.

    Internally the implementation is a tree. Each leaf uses an Array[Long] value to hold up to 2048 bits, and each branch uses an Array[BitSet] to hold up to 32 subtrees (null subtrees are treated as empty).

    Bitset treats the values it stores as 32-bit unsigned values, which is relevant to the internal addressing methods as well as the order used by iterator.

    The benchmarks suggest this bitset is MUCH faster than Scala's built-in bitset for cases where you may need many modifications and merges, (for example in a BloomFilter).

  6. sealed abstract class Dequeue[+A] extends AnyRef

    Permalink

    Dequeue - A Double Ended Queue

    Dequeue - A Double Ended Queue

    Front Back

    <- uncons --------- unsnoc -> cons -> --------- <- snoc

    Based on the Bankers Double Ended Queue as described by C. Okasaki in "Purely Functional Data Structures"

    A queue that allows items to be put onto either the front (cons) or the back (snoc) of the queue in constant time, and constant time access to the element at the very front or the very back of the queue. Dequeuing an element from either end is constant time when amortized over a number of dequeues.

    This queue maintains an invariant that whenever there are at least two elements in the queue, neither the front list nor back list are empty. In order to maintain this invariant, a dequeue from either side which would leave that side empty constructs the resulting queue by taking elements from the opposite side

  7. sealed trait DequeueInstances extends AnyRef

    Permalink
  8. sealed abstract class Diet[A] extends AnyRef

    Permalink

    Discrete Interval Encoding Tree (Diet).

    Discrete Interval Encoding Tree (Diet). It stores subsets of types having a total order, a predecessor and a successor function described by Discrete[A]

    Diet is a binary search tree where each node contains a range of values and the set of all nodes is a set of disjoint sets.

    In the best case, when there are no "holes" in the stored set, the interval representation consists of just one single interval (node) and finding, inserting and deleting operations are O(1). In the worse case, where there are not two adjacent elements in the set, the representation is equivalent to a binary search tree.

  9. trait Discrete[A] extends AnyRef

    Permalink

    Represent discrete operations that can be performed on A

  10. class DisjointSets[T] extends AnyRef

    Permalink
  11. trait DisjointSetsStates extends AnyRef

    Permalink
  12. sealed abstract class Heap[A] extends AnyRef

    Permalink

    Heap is a Purely Functional Binary Heap.

    Heap is a Purely Functional Binary Heap. Binary Heaps are not common in the functional space, especially because their implementation depends on mutable arrays in order to gain in performance. This functional binary heap is based on Vladimir Kostyukov's paper and it does support the basic operations on a heap without compromising performance.

    It is important to note that we can, in fact, to create the Binary Heap in order O(n) from a List using the function heapify.

  13. sealed abstract class PairingHeap[A] extends AnyRef

    Permalink

    A PairingHeap is a heap with excellent empirical performance.

    A PairingHeap is a heap with excellent empirical performance.

    See: https://en.wikipedia.org/wiki/Pairing_heap in particular: https://en.wikipedia.org/wiki/Pairing_heap#Summary_of_running_times

    Additionally, it supports an efficient O(1) combine operation

  14. trait PartiallyOrderedSet[F[_]] extends UnorderedFoldable[F]

    Permalink

    This is a typeclass for Heap-like data-structures which are not totally ordered sets, but can produce the minimimum value, add and remove items.

  15. abstract class Predicate[-A] extends (A) ⇒ Boolean

    Permalink

    An intensional set, which is a set which instead of enumerating its elements as a extensional set does, it is defined by a predicate which is a test for membership.

  16. trait PredicateInstances extends AnyRef

    Permalink
  17. final case class Range[A](start: A, end: A) extends Product with Serializable

    Permalink

    Represent an inclusive range [x, y] that can be generated by using discrete operations

  18. sealed abstract class TreeList[+A] extends AnyRef

    Permalink

    Implementation of "Purely Functional Random Access Lists" by Chris Okasaki.

    Implementation of "Purely Functional Random Access Lists" by Chris Okasaki. This gives O(1) cons and uncons, and 2 log_2 N lookup.

    A consequence of the log N complexity is that naive recursion on the inner methods will (almost) never blow the stack since the depth of the structure is log N, this greatly simplifies many methods. A key example is that unlike List, using a TreeList you can sequence and traverse very large lists without blowing the stack since the stack depth is only log N.

    This data-structure is useful when you want fast cons and uncons, but also want to index. It does not have an optimized concatenation.

  19. type ISet[K] = Predicate[K]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version cats-collections 0.8.0) ISet has been renamed to Predicate.

Value Members

  1. object AvlMap extends AvlMapInstances

    Permalink
  2. object AvlSet extends AvlSetInstances

    Permalink
  3. object BitSet

    Permalink
  4. object Dequeue extends DequeueInstances

    Permalink
  5. object Diet

    Permalink
  6. object Discrete

    Permalink
  7. object DisjointSets extends DisjointSetsStates

    Permalink
  8. object Heap

    Permalink
  9. object PairingHeap

    Permalink
  10. object PartiallyOrderedSet extends Serializable

    Permalink
  11. object Predicate extends PredicateInstances

    Permalink
  12. object Range extends Serializable

    Permalink
  13. object TreeList extends TreeListInstances0

    Permalink
  14. package compat

    Permalink
  15. package syntax

    Permalink

Deprecated Value Members

  1. val ISet: Predicate.type

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version cats-collections 0.8.0) ISet has been renamed to Predicate.

Inherited from AnyRef

Inherited from Any

Ungrouped