Module: Algorithmable::Cache

Defined in:
lib/algorithmable/cache.rb,
lib/algorithmable/cache/imp.rb,
lib/algorithmable/cache/primitive_max_heap.rb,
lib/algorithmable/cache/primitive_min_heap.rb

Defined Under Namespace

Classes: Imp

Instance Method Summary collapse

Instance Method Details

#new_lru_cache(size, heap = PrimitiveMaxHeap.new) ⇒ Object



7
8
9
# File 'lib/algorithmable/cache.rb', line 7

def new_lru_cache(size, heap = PrimitiveMaxHeap.new)
  Imp.new size, heap
end

#new_mru_cache(size, heap = PrimitiveMinHeap.new) ⇒ Object



11
12
13
# File 'lib/algorithmable/cache.rb', line 11

def new_mru_cache(size, heap = PrimitiveMinHeap.new)
  Imp.new size, heap
end