Memo

object Memo extends MemoInstances
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def arrayMemo[V >: Null : ClassTag](n: Int): Memo[Int, V]

Cache results in an n-long array.

Cache results in an n-long array.

def doubleArrayMemo(n: Int, sentinel: Double): Memo[Int, Double]

As with arrayMemo, but memoizing double results != sentinel.

As with arrayMemo, but memoizing double results != sentinel.

def immutableHashMapMemo[K, V]: Memo[K, V]

Cache results in a hash map. Nonsensical unless K has a meaningful hashCode and java.lang.Object.equals. As this memo uses a single var, it's thread-safe.

Cache results in a hash map. Nonsensical unless K has a meaningful hashCode and java.lang.Object.equals. As this memo uses a single var, it's thread-safe.

def immutableMapMemo[K, V](m: Map[K, V]): Memo[K, V]
def immutableTreeMapMemo[K : Ordering, V]: Memo[K, V]

Cache results in a tree map. As this memo uses a single var, it's thread-safe.

Cache results in a tree map. As this memo uses a single var, it's thread-safe.

def memo[@specialized(Int) K, @specialized(Int, Long, Double) V](f: K => V => K => V): Memo[K, V]
def mutableHashMapMemo[K, V]: Memo[K, V]

Cache results in a scala.collection.mutable.HashMap. Nonsensical if K lacks a meaningful hashCode and java.lang.Object.equals.

Cache results in a scala.collection.mutable.HashMap. Nonsensical if K lacks a meaningful hashCode and java.lang.Object.equals.

def nilMemo[@specialized(Int) K, @specialized(Int, Long, Double) V]: Memo[K, V]