lib/plexus/undirected_graph/algorithms.rb in plexus-0.5.8 vs lib/plexus/undirected_graph/algorithms.rb in plexus-0.5.10
- old
+ new
@@ -63,14 +63,15 @@
# lines and n straight line segments matchin the points. The intersection
# graph of the line segments is called a permutation graph.
def permutation?() comparability? and complement.comparability?; end
# An undirected graph is defined to be split if there is a partition
- # V = S + K of its vertex set into a stable set S and a complete set K.
+ # V = S + K of its vertex set into a stable set S and a complete set K.
def split?() triangulated? and complement.triangulated?; end
private
+
# Implementation taken from Golumbic's, "Algorithmic Graph Theory and
# Perfect Graphs" pg. 99
def triangulated_chromatic_number
chi = 1; s= Hash.new {|h,k| h[k]=0}
sigma=lexicograph_bfs
@@ -83,8 +84,8 @@
chi = [chi, x.size+1].max if s[v] < x.size
end
end; chi
end
- end # UndirectedGraphAlgorithms
- end # UndirectedGraphBuilder
-end # Plexus
+ end
+ end
+end