accomplish adj matrix graph classes