-
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.
Extend project with the following functions:
+ Object-oriented programming + new properterty-checks on relations v2021.12.1
- Loading branch information
1 parent
6fa0a14
commit fd4eab7
Showing
11 changed files
with
597 additions
and
218 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,19 @@ | ||
# tuple of index, used_vars, priority | ||
UNION = 0, (1, 2), 1 | ||
COMPLEMENT_X = 1, (1, 2), 1 | ||
COMPLEMENT_Y = 2, (2, 1), 1 | ||
INTERSECTION = 3, (1, 2), 2 | ||
COMPOSITION_X = 4, (1, 2), 3 | ||
COMPOSITION_Y = 5, (2, 1), 3 | ||
POWER_SET_X = 6, (1,), 4 | ||
POWER_SET_Y = 7, (2,), 4 | ||
CONVERSE_RELATION_X = 8, (1,), 3 | ||
CONVERSE_RELATION_Y = 9, (2,), 3 | ||
REFLEXIVE_CLOSURE_X = 10, (1,), 2 | ||
REFLEXIVE_CLOSURE_Y = 11, (2,), 2 | ||
TRANSITIVE_CLOSURE_X = 12, (1,), 2 | ||
TRANSITIVE_CLOSURE_Y = 13, (2,), 2 | ||
|
||
CHOOSE_BY_INDEX = (UNION, COMPLEMENT_X, COMPLEMENT_Y, INTERSECTION, COMPOSITION_X, COMPOSITION_Y, POWER_SET_X, | ||
POWER_SET_Y, CONVERSE_RELATION_X, CONVERSE_RELATION_Y, REFLEXIVE_CLOSURE_X, REFLEXIVE_CLOSURE_Y, | ||
TRANSITIVE_CLOSURE_X, TRANSITIVE_CLOSURE_Y) |
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,6 @@ | ||
from enum import Enum | ||
|
||
|
||
class STATUS(Enum): | ||
CONST = 1 | ||
NONE = 2 |
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,16 @@ | ||
from SetSolver1.math_set import TinyMathSet | ||
|
||
|
||
def to_tiny_math_set(set_of_frozenset_s): | ||
""" | ||
helper method to update to 2021.11.3 | ||
:type set_of_frozenset_s: set[frozenset | int | tuple] | frozenset | int | tuple | ||
:rtype: TinyMathSet | int | tuple | ||
""" | ||
if type(set_of_frozenset_s) == frozenset or type(set_of_frozenset_s) == set: | ||
items = list() | ||
for x1 in set_of_frozenset_s: | ||
items.append(to_tiny_math_set(x1)) | ||
# print(items) | ||
return TinyMathSet(items) | ||
return set_of_frozenset_s |
Oops, something went wrong.