Method: Bio::Pathway#small_world

Defined in:
lib/bio/pathway.rb

#small_worldObject

Returns frequency of the nodes having same number of edges as hash

Calculates the frequency of the nodes having the same number of edges and returns the value as Hash.



406
407
408
409
410
411
412
# File 'lib/bio/pathway.rb', line 406

def small_world
  freq = Hash.new(0)
  @graph.each_value do |v|
    freq[v.size] += 1
  end
  return freq
end