Sha256: 89ae9ecb9c908a5d4a2c5d6f6ebc1d07b89434af1d2e5d7de00d64da74f5f30c
Contents?: true
Size: 519 Bytes
Versions: 34
Compression:
Stored size: 519 Bytes
Contents
module Pacer::Graph class HashIndex attr_reader :name, :type def initialize(element_type, name) @type = type @name = name @data = Hash.new do |h, k| h[k] = Hash.new { |h, k| h[k] = Set[] } end end def get(key, value) Pacer::Pipes::EnumerablePipe.new data[key][value] end def put(key, value, element) data[key][value] << element end def count(key, value) data[key][value].count end private attr_reader :data end end
Version data entries
34 entries across 34 versions & 1 rubygems