This repository has been archived by the owner on Jul 10, 2022. It is now read-only.
forked from rodolfoams/set-theory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f4cb87
commit 15761dc
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
equivalence-relation/projeto-logica-unifacisa/BinaryRelation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#coding: utf-8 | ||
|
||
|
||
class BinaryRelation(object): | ||
"""Template class for classes representing a Binary Relation.""" | ||
|
||
def contains_ordered_pair(self, x, y): | ||
""" | ||
This method returns a boolean value indicating if a given ordered pair belongs to the binary relation. | ||
Arguments: | ||
x - The first element of the ordered pair. | ||
y - The second element of the ordered pair. | ||
Return True if the ordered pair belongs to the binary relation, otherwise, return False. | ||
""" | ||
pass | ||
|
||
def relation(self, S): | ||
""" | ||
This method returns a set of pairs in SxS (a.k.a. S²) that belong to the binary relation. | ||
Arguments: | ||
S - The input set. | ||
Return a set of pairs in SxS (a.k.a. S²) that belong to the binary relation. | ||
""" | ||
pass |