api documentation for algorithms (v0.10.0)

Traditional computer science algorithms and data structures implemented in JavaScript

table of contents

  1. module algorithms
    1. function algorithms.DataStructures.AVLTree ()
    2. function algorithms.DataStructures.BST (compareFn)
    3. function algorithms.DataStructures.DisjointSetForest ()
    4. function algorithms.DataStructures.FenwickTree (length)
    5. function algorithms.DataStructures.Graph (directed)
    6. function algorithms.DataStructures.HashTable (initialCapacity)
    7. function algorithms.DataStructures.LinkedList ()
    8. function algorithms.DataStructures.PriorityQueue (initialItems)
    9. function algorithms.DataStructures.Queue ()
    10. function algorithms.DataStructures.Set ()
    11. function algorithms.DataStructures.Stack ()
    12. function algorithms.DataStructures.Treap ()
    13. function algorithms.Geometry.BezierCurve (points)
    14. function algorithms.Math.fibonacci (n)
    15. function algorithms.Math.gcd (a, b)
    16. function algorithms.Math.lcm ()
    17. function algorithms.Math.powerSet (array)
    18. function algorithms.Search.dfs (node, callback)
    19. function algorithms.comparator (compareFn)
    20. object algorithms.DataStructures
    21. object algorithms.DataStructures.AVLTree.prototype
    22. object algorithms.DataStructures.BST.prototype
    23. object algorithms.DataStructures.DisjointSetForest.prototype
    24. object algorithms.DataStructures.FenwickTree.prototype
    25. object algorithms.DataStructures.Graph.prototype
    26. object algorithms.DataStructures.HashTable.prototype
    27. object algorithms.DataStructures.Heap
    28. object algorithms.DataStructures.Heap.MinHeap.prototype
    29. object algorithms.DataStructures.LinkedList.prototype
    30. object algorithms.DataStructures.PriorityQueue.prototype
    31. object algorithms.DataStructures.Queue.prototype
    32. object algorithms.DataStructures.Set.prototype
    33. object algorithms.DataStructures.Stack.prototype
    34. object algorithms.DataStructures.Treap.prototype
    35. object algorithms.Geometry
    36. object algorithms.Geometry.BezierCurve.prototype
    37. object algorithms.Graph
    38. object algorithms.Math
    39. object algorithms.Math.collatzConjecture
    40. object algorithms.Math.primalityTests
    41. object algorithms.Search
    42. object algorithms.Sorting
    43. object algorithms.String
    44. object algorithms.String.huffman
    45. object algorithms.comparator.prototype
  2. module algorithms.DataStructures
    1. function algorithms.DataStructures.AVLTree ()
    2. function algorithms.DataStructures.BST (compareFn)
    3. function algorithms.DataStructures.DisjointSetForest ()
    4. function algorithms.DataStructures.FenwickTree (length)
    5. function algorithms.DataStructures.Graph (directed)
    6. function algorithms.DataStructures.HashTable (initialCapacity)
    7. function algorithms.DataStructures.LinkedList ()
    8. function algorithms.DataStructures.PriorityQueue (initialItems)
    9. function algorithms.DataStructures.Queue ()
    10. function algorithms.DataStructures.Set ()
    11. function algorithms.DataStructures.Stack ()
    12. function algorithms.DataStructures.Treap ()
    13. object algorithms.DataStructures.Heap
  3. module algorithms.DataStructures.AVLTree
    1. function algorithms.DataStructures.AVLTree ()
  4. module algorithms.DataStructures.AVLTree.prototype
    1. function algorithms.DataStructures.AVLTree.prototype._find (value, current)
    2. function algorithms.DataStructures.AVLTree.prototype._findMax (node, current)
    3. function algorithms.DataStructures.AVLTree.prototype._findMin (node, current)
    4. function algorithms.DataStructures.AVLTree.prototype.find (value)
    5. function algorithms.DataStructures.AVLTree.prototype.findMax ()
    6. function algorithms.DataStructures.AVLTree.prototype.findMin ()
    7. function algorithms.DataStructures.AVLTree.prototype.getNodeHeight (node)
    8. function algorithms.DataStructures.AVLTree.prototype.getNodesToRestructureAfterInsert (traveledNodes)
    9. function algorithms.DataStructures.AVLTree.prototype.getNodesToRestructureAfterRemove (traveledNodes)
    10. function algorithms.DataStructures.AVLTree.prototype.getTreeHeight ()
    11. function algorithms.DataStructures.AVLTree.prototype.inOrder (current, callback)
    12. function algorithms.DataStructures.AVLTree.prototype.insert (value, current)
    13. function algorithms.DataStructures.AVLTree.prototype.isNodeBalanced (node)
    14. function algorithms.DataStructures.AVLTree.prototype.isTreeBalanced ()
    15. function algorithms.DataStructures.AVLTree.prototype.keepHeightBalance (node, afterRemove)
    16. function algorithms.DataStructures.AVLTree.prototype.leftLeft (x, y, z)
    17. function algorithms.DataStructures.AVLTree.prototype.leftRight (x, y, z)
    18. function algorithms.DataStructures.AVLTree.prototype.postOrder (current, callback)
    19. function algorithms.DataStructures.AVLTree.prototype.preOrder (current, callback)
    20. function algorithms.DataStructures.AVLTree.prototype.remove (value)
    21. function algorithms.DataStructures.AVLTree.prototype.replaceChild (parent, oldChild, newChild)
    22. function algorithms.DataStructures.AVLTree.prototype.restructure (nodesToRestructure)
    23. function algorithms.DataStructures.AVLTree.prototype.rightLeft (x, y, z)
    24. function algorithms.DataStructures.AVLTree.prototype.rightRight (x, y, z)
  5. module algorithms.DataStructures.BST
    1. function algorithms.DataStructures.BST (compareFn)
  6. module algorithms.DataStructures.BST.prototype
    1. function algorithms.DataStructures.BST.prototype._find (e, root)
    2. function algorithms.DataStructures.BST.prototype._findMin (root)
    3. function algorithms.DataStructures.BST.prototype._replaceNodeInParent (currNode, newNode)
    4. function algorithms.DataStructures.BST.prototype.contains (e)
    5. function algorithms.DataStructures.BST.prototype.insert (value, parent)
    6. function algorithms.DataStructures.BST.prototype.remove (e)
  7. module algorithms.DataStructures.DisjointSetForest
    1. function algorithms.DataStructures.DisjointSetForest ()
  8. module algorithms.DataStructures.DisjointSetForest.prototype
    1. function algorithms.DataStructures.DisjointSetForest.prototype._introduce (element)
    2. function algorithms.DataStructures.DisjointSetForest.prototype.merge (element1, element2)
    3. function algorithms.DataStructures.DisjointSetForest.prototype.root (element)
    4. function algorithms.DataStructures.DisjointSetForest.prototype.sameSubset (element)
    5. function algorithms.DataStructures.DisjointSetForest.prototype.size (element)
  9. module algorithms.DataStructures.FenwickTree
    1. function algorithms.DataStructures.FenwickTree (length)
  10. module algorithms.DataStructures.FenwickTree.prototype
    1. function algorithms.DataStructures.FenwickTree.prototype.adjust (index, value)
    2. function algorithms.DataStructures.FenwickTree.prototype.prefixSum (index)
    3. function algorithms.DataStructures.FenwickTree.prototype.rangeSum (fromIndex, toIndex)
  11. module algorithms.DataStructures.Graph
    1. function algorithms.DataStructures.Graph (directed)
  12. module algorithms.DataStructures.Graph.prototype
    1. function algorithms.DataStructures.Graph.prototype.addEdge (a, b, w)
    2. function algorithms.DataStructures.Graph.prototype.addVertex (v)
    3. function algorithms.DataStructures.Graph.prototype.edge (a, b)
    4. function algorithms.DataStructures.Graph.prototype.neighbors (v)
  13. module algorithms.DataStructures.HashTable
    1. function algorithms.DataStructures.HashTable (initialCapacity)
  14. module algorithms.DataStructures.HashTable.prototype
    1. function algorithms.DataStructures.HashTable.prototype._findInList (list, key)
    2. function algorithms.DataStructures.HashTable.prototype._increaseCapacity ()
    3. function algorithms.DataStructures.HashTable.prototype._position (key)
    4. function algorithms.DataStructures.HashTable.prototype.del (key)
    5. function algorithms.DataStructures.HashTable.prototype.forEach (fn)
    6. function algorithms.DataStructures.HashTable.prototype.get (key)
    7. function algorithms.DataStructures.HashTable.prototype.hash (s)
    8. function algorithms.DataStructures.HashTable.prototype.put (key, value)
  15. module algorithms.DataStructures.Heap
    1. function algorithms.DataStructures.Heap.MaxHeap (compareFn)
    2. function algorithms.DataStructures.Heap.MinHeap (compareFn)
  16. module algorithms.DataStructures.Heap.MinHeap.prototype
    1. function algorithms.DataStructures.Heap.MinHeap.prototype._siftDown (i)
    2. function algorithms.DataStructures.Heap.MinHeap.prototype._siftUp ()
    3. function algorithms.DataStructures.Heap.MinHeap.prototype._swap (a, b)
    4. function algorithms.DataStructures.Heap.MinHeap.prototype.extract ()
    5. function algorithms.DataStructures.Heap.MinHeap.prototype.forEach (fn)
    6. function algorithms.DataStructures.Heap.MinHeap.prototype.heapify (a)
    7. function algorithms.DataStructures.Heap.MinHeap.prototype.insert (e)
    8. function algorithms.DataStructures.Heap.MinHeap.prototype.isEmpty ()
  17. module algorithms.DataStructures.LinkedList
    1. function algorithms.DataStructures.LinkedList ()
  18. module algorithms.DataStructures.LinkedList.prototype
    1. function algorithms.DataStructures.LinkedList.prototype.add (n, index)
    2. function algorithms.DataStructures.LinkedList.prototype.del (index)
    3. function algorithms.DataStructures.LinkedList.prototype.delNode (node)
    4. function algorithms.DataStructures.LinkedList.prototype.forEach (fn)
    5. function algorithms.DataStructures.LinkedList.prototype.get (index)
    6. function algorithms.DataStructures.LinkedList.prototype.getNode (index)
    7. function algorithms.DataStructures.LinkedList.prototype.isEmpty ()
  19. module algorithms.DataStructures.PriorityQueue
    1. function algorithms.DataStructures.PriorityQueue (initialItems)
  20. module algorithms.DataStructures.PriorityQueue.prototype
    1. function algorithms.DataStructures.PriorityQueue.prototype.changePriority (item, priority)
    2. function algorithms.DataStructures.PriorityQueue.prototype.extract (withPriority)
    3. function algorithms.DataStructures.PriorityQueue.prototype.insert (item, priority)
    4. function algorithms.DataStructures.PriorityQueue.prototype.priority (item)
    5. object algorithms.DataStructures.PriorityQueue.prototype._comparator
    6. object algorithms.DataStructures.PriorityQueue.prototype._elements
  21. module algorithms.DataStructures.Queue
    1. function algorithms.DataStructures.Queue ()
  22. module algorithms.DataStructures.Queue.prototype
    1. function algorithms.DataStructures.Queue.prototype.forEach (fn)
    2. function algorithms.DataStructures.Queue.prototype.isEmpty ()
    3. function algorithms.DataStructures.Queue.prototype.peek ()
    4. function algorithms.DataStructures.Queue.prototype.pop ()
    5. function algorithms.DataStructures.Queue.prototype.push (e)
  23. module algorithms.DataStructures.Set
    1. function algorithms.DataStructures.Set ()
  24. module algorithms.DataStructures.Set.prototype
    1. function algorithms.DataStructures.Set.prototype.add ()
    2. function algorithms.DataStructures.Set.prototype.contains (e)
    3. function algorithms.DataStructures.Set.prototype.forEach (fn)
    4. function algorithms.DataStructures.Set.prototype.remove ()
  25. module algorithms.DataStructures.Stack
    1. function algorithms.DataStructures.Stack ()
  26. module algorithms.DataStructures.Stack.prototype
    1. function algorithms.DataStructures.Stack.prototype.push (e)
    2. object algorithms.DataStructures.Stack.prototype._elements
  27. module algorithms.DataStructures.Treap
    1. function algorithms.DataStructures.Treap ()
  28. module algorithms.DataStructures.Treap.prototype
    1. function algorithms.DataStructures.Treap.prototype._find (node, value)
    2. function algorithms.DataStructures.Treap.prototype._insert (node, value)
    3. function algorithms.DataStructures.Treap.prototype._maximum (node)
    4. function algorithms.DataStructures.Treap.prototype._minimum (node)
    5. function algorithms.DataStructures.Treap.prototype._remove (node, value)
    6. function algorithms.DataStructures.Treap.prototype.find (value)
    7. function algorithms.DataStructures.Treap.prototype.height ()
    8. function algorithms.DataStructures.Treap.prototype.insert (value)
    9. function algorithms.DataStructures.Treap.prototype.maximum ()
    10. function algorithms.DataStructures.Treap.prototype.minimum ()
    11. function algorithms.DataStructures.Treap.prototype.remove (value)
    12. function algorithms.DataStructures.Treap.prototype.size ()
  29. module algorithms.Geometry
    1. function algorithms.Geometry.BezierCurve (points)
  30. module algorithms.Geometry.BezierCurve
    1. function algorithms.Geometry.BezierCurve (points)
  31. module algorithms.Geometry.BezierCurve.prototype
    1. function algorithms.Geometry.BezierCurve.prototype.get (t)
  32. module algorithms.Graph
    1. function algorithms.Graph.SPFA (graph, s)
    2. function algorithms.Graph.bellmanFord (graph, startNode)
    3. function algorithms.Graph.bfsShortestPath (graph, source)
    4. function algorithms.Graph.breadthFirstSearch (graph, startVertex, callbacks)
    5. function algorithms.Graph.depthFirstSearch (graph, startVertex, callbacks)
    6. function algorithms.Graph.dijkstra (graph, s)
    7. function algorithms.Graph.eulerPath (graph)
    8. function algorithms.Graph.floydWarshall (graph)
    9. function algorithms.Graph.kruskal (graph)
    10. function algorithms.Graph.prim (graph)
    11. function algorithms.Graph.topologicalSort (graph)
  33. module algorithms.Math
    1. function algorithms.Math.extendedEuclidean (a, b)
    2. function algorithms.Math.fastPower (base, power, mul, identity)
    3. function algorithms.Math.fibonacci (n)
    4. function algorithms.Math.fisherYates (a)
    5. function algorithms.Math.gcd (a, b)
    6. function algorithms.Math.greatestDifference (numbers)
    7. function algorithms.Math.lcm ()
    8. function algorithms.Math.newtonSqrt (n, tolerance, maxIterations)
    9. function algorithms.Math.nextPermutation (array, compareFn)
    10. function algorithms.Math.powerSet (array)
    11. function algorithms.Math.reservoirSampling (array, sampleSize)
    12. function algorithms.Math.shannonEntropy (arr)
    13. object algorithms.Math.collatzConjecture
    14. object algorithms.Math.primalityTests
  34. module algorithms.Math.collatzConjecture
    1. function algorithms.Math.collatzConjecture.calculate (number)
    2. function algorithms.Math.collatzConjecture.generate (number)
  35. module algorithms.Math.fibonacci
    1. function algorithms.Math.fibonacci (n)
    2. function algorithms.Math.fibonacci.direct (number)
    3. function algorithms.Math.fibonacci.exponential (n)
    4. function algorithms.Math.fibonacci.logarithmic (number)
    5. function algorithms.Math.fibonacci.withMemoization (n)
  36. module algorithms.Math.gcd
    1. function algorithms.Math.gcd (a, b)
    2. function algorithms.Math.gcd.binary (a, b)
  37. module algorithms.Math.lcm
    1. function algorithms.Math.lcm ()
    2. function algorithms.Math.lcm.binary ()
  38. module algorithms.Math.powerSet
    1. function algorithms.Math.powerSet (array)
    2. function algorithms.Math.powerSet.recursive (array)
  39. module algorithms.Math.primalityTests
    1. function algorithms.Math.primalityTests.naiveTest ()
    2. function algorithms.Math.primalityTests.trialDivisionTest ()
  40. module algorithms.Search
    1. function algorithms.Search.bfs (root, callback)
    2. function algorithms.Search.binarySearch (sortedArray, element)
    3. function algorithms.Search.dfs (node, callback)
    4. function algorithms.Search.ternarySearch (fn, left, right, precision)
  41. module algorithms.Search.dfs
    1. function algorithms.Search.dfs (node, callback)
    2. function algorithms.Search.dfs.postOrder (node, callback)
    3. function algorithms.Search.dfs.preOrder (node, callback)
  42. module algorithms.Sorting
    1. function algorithms.Sorting.bubbleSort (a, comparatorFn)
    2. function algorithms.Sorting.countingSort (array)
    3. function algorithms.Sorting.heapSort (array, comparatorFn)
    4. function algorithms.Sorting.insertionSort (vector, comparatorFn)
    5. function algorithms.Sorting.mergeSort (a, compareFn)
    6. function algorithms.Sorting.quicksort (array, comparatorFn)
    7. function algorithms.Sorting.radixSort (array)
    8. function algorithms.Sorting.selectionSort (a, comparatorFn)
    9. function algorithms.Sorting.shellSort (array, comparatorFn)
    10. function algorithms.Sorting.shortBubbleSort (array, comparatorFn)
  43. module algorithms.String
    1. function algorithms.String.hamming (a, b)
    2. function algorithms.String.knuthMorrisPratt (text, pattern)
    3. function algorithms.String.levenshtein (a, b)
    4. function algorithms.String.longestCommonSubsequence (s1, s2)
    5. function algorithms.String.longestCommonSubstring (s1, s2)
    6. function algorithms.String.rabinKarp (s, pattern)
    7. object algorithms.String.huffman
  44. module algorithms.String.huffman
    1. function algorithms.String.huffman.decode (encoding, encodedString)
    2. function algorithms.String.huffman.encode (string, compressed)
  45. module algorithms.comparator
    1. function algorithms.comparator (compareFn)
  46. module algorithms.comparator.prototype
    1. function algorithms.comparator.prototype.compare (a, b)
    2. function algorithms.comparator.prototype.equal (a, b)
    3. function algorithms.comparator.prototype.greaterThan (a, b)
    4. function algorithms.comparator.prototype.greaterThanOrEqual (a, b)
    5. function algorithms.comparator.prototype.lessThan (a, b)
    6. function algorithms.comparator.prototype.lessThanOrEqual (a, b)
    7. function algorithms.comparator.prototype.reverse ()

module algorithms

function algorithms.DataStructures.AVLTree ()

function algorithms.DataStructures.BST (compareFn)

function algorithms.DataStructures.DisjointSetForest ()

function algorithms.DataStructures.FenwickTree (length)

function algorithms.DataStructures.Graph (directed)

function algorithms.DataStructures.HashTable (initialCapacity)

function algorithms.DataStructures.LinkedList ()

function algorithms.DataStructures.PriorityQueue (initialItems)

function algorithms.DataStructures.Queue ()

function algorithms.DataStructures.Set ()

function algorithms.DataStructures.Stack ()

function algorithms.DataStructures.Treap ()

function algorithms.Geometry.BezierCurve (points)

function algorithms.Math.fibonacci (n)

function algorithms.Math.gcd (a, b)

function algorithms.Math.lcm ()

function algorithms.Math.powerSet (array)

function algorithms.Search.dfs (node, callback)

function algorithms.comparator (compareFn)

module algorithms.DataStructures

function algorithms.DataStructures.AVLTree ()

function algorithms.DataStructures.BST (compareFn)

function algorithms.DataStructures.DisjointSetForest ()

function algorithms.DataStructures.FenwickTree (length)

function algorithms.DataStructures.Graph (directed)

function algorithms.DataStructures.HashTable (initialCapacity)

function algorithms.DataStructures.LinkedList ()

function algorithms.DataStructures.PriorityQueue (initialItems)

function algorithms.DataStructures.Queue ()

function algorithms.DataStructures.Set ()

function algorithms.DataStructures.Stack ()

function algorithms.DataStructures.Treap ()

module algorithms.DataStructures.AVLTree

function algorithms.DataStructures.AVLTree ()

module algorithms.DataStructures.AVLTree.prototype

function algorithms.DataStructures.AVLTree.prototype._find (value, current)

function algorithms.DataStructures.AVLTree.prototype._findMax (node, current)

function algorithms.DataStructures.AVLTree.prototype._findMin (node, current)

function algorithms.DataStructures.AVLTree.prototype.find (value)

function algorithms.DataStructures.AVLTree.prototype.findMax ()

function algorithms.DataStructures.AVLTree.prototype.findMin ()

function algorithms.DataStructures.AVLTree.prototype.getNodeHeight (node)

function algorithms.DataStructures.AVLTree.prototype.getNodesToRestructureAfterInsert (traveledNodes)

function algorithms.DataStructures.AVLTree.prototype.getNodesToRestructureAfterRemove (traveledNodes)

function algorithms.DataStructures.AVLTree.prototype.getTreeHeight ()

function algorithms.DataStructures.AVLTree.prototype.inOrder (current, callback)

function algorithms.DataStructures.AVLTree.prototype.insert (value, current)

function algorithms.DataStructures.AVLTree.prototype.isNodeBalanced (node)

function algorithms.DataStructures.AVLTree.prototype.isTreeBalanced ()

function algorithms.DataStructures.AVLTree.prototype.keepHeightBalance (node, afterRemove)

function algorithms.DataStructures.AVLTree.prototype.leftLeft (x, y, z)

function algorithms.DataStructures.AVLTree.prototype.leftRight (x, y, z)

function algorithms.DataStructures.AVLTree.prototype.postOrder (current, callback)

function algorithms.DataStructures.AVLTree.prototype.preOrder (current, callback)

function algorithms.DataStructures.AVLTree.prototype.remove (value)

function algorithms.DataStructures.AVLTree.prototype.replaceChild (parent, oldChild, newChild)

function algorithms.DataStructures.AVLTree.prototype.restructure (nodesToRestructure)

function algorithms.DataStructures.AVLTree.prototype.rightLeft (x, y, z)

function algorithms.DataStructures.AVLTree.prototype.rightRight (x, y, z)

module algorithms.DataStructures.BST

function algorithms.DataStructures.BST (compareFn)

module algorithms.DataStructures.BST.prototype

function algorithms.DataStructures.BST.prototype._find (e, root)

function algorithms.DataStructures.BST.prototype._findMin (root)

function algorithms.DataStructures.BST.prototype._replaceNodeInParent (currNode, newNode)

function algorithms.DataStructures.BST.prototype.contains (e)

function algorithms.DataStructures.BST.prototype.insert (value, parent)

function algorithms.DataStructures.BST.prototype.remove (e)

module algorithms.DataStructures.DisjointSetForest

function algorithms.DataStructures.DisjointSetForest ()

module algorithms.DataStructures.DisjointSetForest.prototype

function algorithms.DataStructures.DisjointSetForest.prototype._introduce (element)

function algorithms.DataStructures.DisjointSetForest.prototype.merge (element1, element2)

function algorithms.DataStructures.DisjointSetForest.prototype.root (element)

function algorithms.DataStructures.DisjointSetForest.prototype.sameSubset (element)

function algorithms.DataStructures.DisjointSetForest.prototype.size (element)

module algorithms.DataStructures.FenwickTree

function algorithms.DataStructures.FenwickTree (length)

module algorithms.DataStructures.FenwickTree.prototype

function algorithms.DataStructures.FenwickTree.prototype.adjust (index, value)

function algorithms.DataStructures.FenwickTree.prototype.prefixSum (index)

function algorithms.DataStructures.FenwickTree.prototype.rangeSum (fromIndex, toIndex)

module algorithms.DataStructures.Graph

function algorithms.DataStructures.Graph (directed)

module algorithms.DataStructures.Graph.prototype

function algorithms.DataStructures.Graph.prototype.addEdge (a, b, w)

function algorithms.DataStructures.Graph.prototype.addVertex (v)

function algorithms.DataStructures.Graph.prototype.edge (a, b)

function algorithms.DataStructures.Graph.prototype.neighbors (v)

module algorithms.DataStructures.HashTable

function algorithms.DataStructures.HashTable (initialCapacity)

module algorithms.DataStructures.HashTable.prototype

function algorithms.DataStructures.HashTable.prototype._findInList (list, key)

function algorithms.DataStructures.HashTable.prototype._increaseCapacity ()

function algorithms.DataStructures.HashTable.prototype._position (key)

function algorithms.DataStructures.HashTable.prototype.del (key)

function algorithms.DataStructures.HashTable.prototype.forEach (fn)

function algorithms.DataStructures.HashTable.prototype.get (key)

function algorithms.DataStructures.HashTable.prototype.hash (s)

function algorithms.DataStructures.HashTable.prototype.put (key, value)

module algorithms.DataStructures.Heap

function algorithms.DataStructures.Heap.MaxHeap (compareFn)

function algorithms.DataStructures.Heap.MinHeap (compareFn)

module algorithms.DataStructures.Heap.MinHeap.prototype

function algorithms.DataStructures.Heap.MinHeap.prototype._siftDown (i)

function algorithms.DataStructures.Heap.MinHeap.prototype._siftUp ()

function algorithms.DataStructures.Heap.MinHeap.prototype._swap (a, b)

function algorithms.DataStructures.Heap.MinHeap.prototype.extract ()

function algorithms.DataStructures.Heap.MinHeap.prototype.forEach (fn)

function algorithms.DataStructures.Heap.MinHeap.prototype.heapify (a)

function algorithms.DataStructures.Heap.MinHeap.prototype.insert (e)

function algorithms.DataStructures.Heap.MinHeap.prototype.isEmpty ()

module algorithms.DataStructures.LinkedList

function algorithms.DataStructures.LinkedList ()

module algorithms.DataStructures.LinkedList.prototype

function algorithms.DataStructures.LinkedList.prototype.add (n, index)

function algorithms.DataStructures.LinkedList.prototype.del (index)

function algorithms.DataStructures.LinkedList.prototype.delNode (node)

function algorithms.DataStructures.LinkedList.prototype.forEach (fn)

function algorithms.DataStructures.LinkedList.prototype.get (index)

function algorithms.DataStructures.LinkedList.prototype.getNode (index)

function algorithms.DataStructures.LinkedList.prototype.isEmpty ()

module algorithms.DataStructures.PriorityQueue

function algorithms.DataStructures.PriorityQueue (initialItems)

module algorithms.DataStructures.PriorityQueue.prototype

function algorithms.DataStructures.PriorityQueue.prototype.changePriority (item, priority)

function algorithms.DataStructures.PriorityQueue.prototype.extract (withPriority)

function algorithms.DataStructures.PriorityQueue.prototype.insert (item, priority)

function algorithms.DataStructures.PriorityQueue.prototype.priority (item)

module algorithms.DataStructures.Queue

function algorithms.DataStructures.Queue ()

module algorithms.DataStructures.Queue.prototype

function algorithms.DataStructures.Queue.prototype.forEach (fn)

function algorithms.DataStructures.Queue.prototype.isEmpty ()

function algorithms.DataStructures.Queue.prototype.peek ()

function algorithms.DataStructures.Queue.prototype.pop ()

function algorithms.DataStructures.Queue.prototype.push (e)

module algorithms.DataStructures.Set

function algorithms.DataStructures.Set ()

module algorithms.DataStructures.Set.prototype

function algorithms.DataStructures.Set.prototype.add ()

function algorithms.DataStructures.Set.prototype.contains (e)

function algorithms.DataStructures.Set.prototype.forEach (fn)

function algorithms.DataStructures.Set.prototype.remove ()

module algorithms.DataStructures.Stack

function algorithms.DataStructures.Stack ()

module algorithms.DataStructures.Stack.prototype

function algorithms.DataStructures.Stack.prototype.push (e)

module algorithms.DataStructures.Treap

function algorithms.DataStructures.Treap ()

module algorithms.DataStructures.Treap.prototype

function algorithms.DataStructures.Treap.prototype._find (node, value)

function algorithms.DataStructures.Treap.prototype._insert (node, value)

function algorithms.DataStructures.Treap.prototype._maximum (node)

function algorithms.DataStructures.Treap.prototype._minimum (node)

function algorithms.DataStructures.Treap.prototype._remove (node, value)

function algorithms.DataStructures.Treap.prototype.find (value)

function algorithms.DataStructures.Treap.prototype.height ()

function algorithms.DataStructures.Treap.prototype.insert (value)

function algorithms.DataStructures.Treap.prototype.maximum ()

function algorithms.DataStructures.Treap.prototype.minimum ()

function algorithms.DataStructures.Treap.prototype.remove (value)

function algorithms.DataStructures.Treap.prototype.size ()

module algorithms.Geometry

function algorithms.Geometry.BezierCurve (points)

module algorithms.Geometry.BezierCurve

function algorithms.Geometry.BezierCurve (points)

module algorithms.Geometry.BezierCurve.prototype

function algorithms.Geometry.BezierCurve.prototype.get (t)

module algorithms.Graph

function algorithms.Graph.SPFA (graph, s)

function algorithms.Graph.bellmanFord (graph, startNode)

function algorithms.Graph.bfsShortestPath (graph, source)

function algorithms.Graph.breadthFirstSearch (graph, startVertex, callbacks)

function algorithms.Graph.depthFirstSearch (graph, startVertex, callbacks)

function algorithms.Graph.dijkstra (graph, s)

function algorithms.Graph.eulerPath (graph)

function algorithms.Graph.floydWarshall (graph)

function algorithms.Graph.kruskal (graph)

function algorithms.Graph.prim (graph)

function algorithms.Graph.topologicalSort (graph)

module algorithms.Math

function algorithms.Math.extendedEuclidean (a, b)

function algorithms.Math.fastPower (base, power, mul, identity)

function algorithms.Math.fibonacci (n)

function algorithms.Math.fisherYates (a)

function algorithms.Math.gcd (a, b)

function algorithms.Math.greatestDifference (numbers)

function algorithms.Math.lcm ()

function algorithms.Math.newtonSqrt (n, tolerance, maxIterations)

function algorithms.Math.nextPermutation (array, compareFn)

function algorithms.Math.powerSet (array)

function algorithms.Math.reservoirSampling (array, sampleSize)

function algorithms.Math.shannonEntropy (arr)

module algorithms.Math.collatzConjecture

function algorithms.Math.collatzConjecture.calculate (number)

function algorithms.Math.collatzConjecture.generate (number)

module algorithms.Math.fibonacci

function algorithms.Math.fibonacci (n)

function algorithms.Math.fibonacci.direct (number)

function algorithms.Math.fibonacci.exponential (n)

function algorithms.Math.fibonacci.logarithmic (number)

function algorithms.Math.fibonacci.withMemoization (n)

module algorithms.Math.gcd

function algorithms.Math.gcd (a, b)

function algorithms.Math.gcd.binary (a, b)

module algorithms.Math.lcm

function algorithms.Math.lcm ()

function algorithms.Math.lcm.binary ()

module algorithms.Math.powerSet

function algorithms.Math.powerSet (array)

function algorithms.Math.powerSet.recursive (array)

module algorithms.Math.primalityTests

function algorithms.Math.primalityTests.naiveTest ()

function algorithms.Math.primalityTests.trialDivisionTest ()

module algorithms.Search

function algorithms.Search.bfs (root, callback)

function algorithms.Search.binarySearch (sortedArray, element)

function algorithms.Search.dfs (node, callback)

function algorithms.Search.ternarySearch (fn, left, right, precision)

module algorithms.Search.dfs

function algorithms.Search.dfs (node, callback)

function algorithms.Search.dfs.postOrder (node, callback)

function algorithms.Search.dfs.preOrder (node, callback)

module algorithms.Sorting

function algorithms.Sorting.bubbleSort (a, comparatorFn)

function algorithms.Sorting.countingSort (array)

function algorithms.Sorting.heapSort (array, comparatorFn)

function algorithms.Sorting.insertionSort (vector, comparatorFn)

function algorithms.Sorting.mergeSort (a, compareFn)

function algorithms.Sorting.quicksort (array, comparatorFn)

function algorithms.Sorting.radixSort (array)

function algorithms.Sorting.selectionSort (a, comparatorFn)

function algorithms.Sorting.shellSort (array, comparatorFn)

function algorithms.Sorting.shortBubbleSort (array, comparatorFn)

module algorithms.String

function algorithms.String.hamming (a, b)

function algorithms.String.knuthMorrisPratt (text, pattern)

function algorithms.String.levenshtein (a, b)

function algorithms.String.longestCommonSubsequence (s1, s2)

function algorithms.String.longestCommonSubstring (s1, s2)

function algorithms.String.rabinKarp (s, pattern)

module algorithms.String.huffman

function algorithms.String.huffman.decode (encoding, encodedString)

function algorithms.String.huffman.encode (string, compressed)

module algorithms.comparator

function algorithms.comparator (compareFn)

module algorithms.comparator.prototype

function algorithms.comparator.prototype.compare (a, b)

function algorithms.comparator.prototype.equal (a, b)

function algorithms.comparator.prototype.greaterThan (a, b)

function algorithms.comparator.prototype.greaterThanOrEqual (a, b)

function algorithms.comparator.prototype.lessThan (a, b)

function algorithms.comparator.prototype.lessThanOrEqual (a, b)

function algorithms.comparator.prototype.reverse ()

[ this document was created with utility2 ]