louvian_ruby 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/louvian.rb +4 -3
  2. metadata +2 -1
data/lib/louvian.rb CHANGED
@@ -91,9 +91,6 @@ module Louvian
91
91
  neighbour_communities = @@communities.find_all {|i| node_to_comms_links.include? i.id}
92
92
 
93
93
  orig_community.remove node, node_to_comms_links[orig_community_id]
94
- if orig_community.nodes_ids.empty?
95
- @@communities.delete orig_community
96
- end
97
94
 
98
95
 
99
96
  best_community_id = orig_community_id
@@ -116,6 +113,10 @@ module Louvian
116
113
 
117
114
  best_community.insert node, node_to_comms_links[best_community.id]
118
115
  @@n2c[node] = best_community_id
116
+
117
+ if orig_community.nodes_ids.empty?
118
+ @@communities.delete orig_community
119
+ end
119
120
  end
120
121
  display_communities
121
122
  puts "modularity is #{self.modularity}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: louvian_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -44,3 +44,4 @@ signing_key:
44
44
  specification_version: 3
45
45
  summary: Louvian wrapper
46
46
  test_files: []
47
+ has_rdoc: