Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Commit

Permalink
Add skeleton of verify_equivalency and get_partitioning methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfoams committed Nov 6, 2019
1 parent f4255d0 commit 1f4cb87
Showing 1 changed file with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,33 @@ def verify_antisymmetry(binary_relation, input_set):
Return True if the binary relation in the given input set is
antisymmetric or False if it is not.
"""
pass
pass

@staticmethod
def verify_equivalency(binary_relation, input_set):
"""
This method verifies if a given binary relation is an equivalence relation.
Arguments:
binary_relation - A subclass of the BinaryRelation class.
input_set - A set closed under the binary relation.
Return True if the binary relation in the given input set is
an equivalence relation or False if it is not.
"""
pass

@staticmethod
def get_partitioning(binary_relation, input_set):
"""
This method first verifies if binary relation is an equivalence relation and, if it is, generates a partitioning of the input set using the binary relation. If the binary relation is not an equivalence relation, it returns None.
Arguments:
binary_relation - A subclass of the BinaryRelation class.
input_set - A set closed under the binary relation.
Return None if the binary relation is not an equivalence relation or a partitioning of the input set (e.g.: {{1, 3, 5, ...}, {2, 4, 6, ...}}) if it is an equivalence relation.
"""
pass

0 comments on commit 1f4cb87

Please sign in to comment.