Revision f127e585 htools/Ganeti/HTools/Graph.hs

b/htools/Ganeti/HTools/Graph.hs
138 138
verticesColors :: VertColorMap -> [Graph.Vertex] -> [Color]
139 139
verticesColors cMap = mapMaybe (`IntMap.lookup` cMap)
140 140

  
141
-- | Get the colors of a list of vertices.
141
-- | Get the set of colors of a list of vertices.
142 142
-- Any uncolored vertices are ignored.
143 143
verticesColorSet :: VertColorMap -> [Graph.Vertex] -> IntSet.IntSet
144
verticesColorSet cMap = IntSet.fromList . mapMaybe (`IntMap.lookup` cMap)
144
verticesColorSet cMap = IntSet.fromList . verticesColors cMap
145 145

  
146 146
-- | Get the colors of the neighbors of a vertex.
147 147
neighColors :: Graph.Graph -> VertColorMap -> Graph.Vertex -> [Color]

Also available in: Unified diff