I am starting to learn graphs, even though I get a general what they are I can't understand the details of equivalence classes implantation and the role they contribute to building a graph.I have an assignment with very unclear and vague instructions to implement the following methods to complete an equivalence class add_singleton, compress_to_root, in_same_class, merge_classes_of, and classes. I am hoping to understand the general function of an equivalence class so I can try to figure out what each method does in details.
Any help would be appreciated, Thank you.