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

Commit

Permalink
Add BinaryRelationUtils class
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfoams committed Nov 3, 2019
1 parent 7fe07de commit f4255d0
Showing 1 changed file with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#coding: utf-8


class BinaryRelationUtils(object):
"""Class providing utilities to verify properties of a binary relation."""

@staticmethod
def verify_reflexivity(binary_relation, input_set):
"""
This method verifies if a given binary relation is reflexive or not.
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 reflexive
or False if it is not.
"""
pass

@staticmethod
def verify_symmetry(binary_relation, input_set):
"""
This method verifies if a given binary relation is symmetric or not.
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 symmetric
or False if it is not.
"""
pass

@staticmethod
def verify_transitivity(binary_relation, input_set):
"""
This method verifies if a given binary relation is transitive or not.
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 transitive
or False if it is not.
"""
pass

@staticmethod
def verify_antisymmetry(binary_relation, input_set):
"""
This method verifies if a given binary relation is antisymmetric or not.
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
antisymmetric or False if it is not.
"""
pass

0 comments on commit f4255d0

Please sign in to comment.