added general connected components class and factories for different edges
(adj_matrix) types (edges, solution)