app/models/run.rb
# merge all cluster_trees of top level in cluster_hedge
merge all cluster_trees of top level in cluster_hedge
merge all cluster_trees of top level in cluster_hedge
def merge_top_level_clusters(cluster_hedge)      
      first = cluster_hedge.detect{|t| t.parent.nil?}
      cluster_hedge.delete(first)
      top_cluster = cluster_hedge.inject(first) do |sum, cluster_tree|
        (cluster_tree && cluster_tree.parent.nil?) and merge_clusters(sum, cluster_tree, cluster_hedge)
        sum
      end
      cluster_hedge << top_cluster
    end
def merge_top_level_clusters ( cluster_hedge ) first = cluster_hedge . detect { | t | t . parent . nil? } cluster_hedge . delete ( first ) top_cluster = cluster_hedge . inject ( first ) do | sum , cluster_tree | ( cluster_tree && cluster_tree . parent . nil? ) and merge_clusters ( sum , cluster_tree , cluster_hedge ) sum end cluster_hedge << top_cluster end
merge all cluster_trees of top level in cluster_hedge
merge all cluster_trees of top level in cluster_hedge
#        merge_clusters(sum, cluster_tree, cluster_hedge) if cluster_tree && cluster_tree.parent.nil?
cluster_hedge
<not_specific>