Sha256: a8888043eb0d0c76ec5d29dcde65d49c2e36341a232c62798ab9371561231d3c
Contents?: true
Size: 885 Bytes
Versions: 1
Compression:
Stored size: 885 Bytes
Contents
module Pacer module Routes::RouteOperations def fast_group_count(hash_map = nil) chain_route :side_effect => :group_count, :hash_map => hash_map end end module SideEffect module GroupCount def hash_map=(hash_map) @hash_map = hash_map end def at_least(n) @min = n self end def to_h c = 0 each { c = c + 1 } puts c h = {} min = @min || 0 side_effect.each do |k,v| h[k] = v if v >= min end h end protected def attach_pipe(end_pipe) if @hash_map @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new @hash_map else @pipe = com.tinkerpop.pipes.sideeffect.GroupCountPipe.new end @pipe.set_starts(end_pipe) if end_pipe @pipe end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pacer-0.9.1.1-java | lib/pacer/side_effect/group_count.rb |