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 nilMemo[@specialized(Int) K, @specialized(Int, Long, Double) V]: Memo[K, V]

Deprecated methods

@deprecated("removed in scalaz 7.3: not efficient", since = "7.2.19")
def immutableListMapMemo[K, V]: Memo[K, V]

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

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

Deprecated
[Since version 7.2.19]
@deprecated("removed in scalaz 7.3: not thread safe, relies on Object", since = "7.2.19")
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.

Deprecated
[Since version 7.2.19]
@deprecated("removed in scalaz 7.3: leaks mutable state, not thread safe", since = "7.2.19")
def mutableMapMemo[K, V](a: Map[K, V]): Memo[K, V]
Deprecated
[Since version 7.2.19]
@deprecated("removed in scalaz 7.3: not thread safe, relies on Object, not efficient", since = "7.2.19")
def weakHashMapMemo[K, V]: Memo[K, V]

As with mutableHashMapMemo, but forget elements according to GC pressure.

As with mutableHashMapMemo, but forget elements according to GC pressure.

Deprecated
[Since version 7.2.19]