mirror of
https://github.com/Brandon-Rozek/matmod.git
synced 2026-01-30 07:33:38 +00:00
Merge branch 'main' into feat/46
This commit is contained in:
commit
07d7b2fdb1
4 changed files with 37 additions and 20 deletions
14
model.py
14
model.py
|
|
@ -129,6 +129,12 @@ class OrderTable:
|
|||
|
||||
candidates = X.intersection(Y)
|
||||
|
||||
if not candidates:
|
||||
return None
|
||||
|
||||
if len(candidates) == 1:
|
||||
return next(iter(candidates))
|
||||
|
||||
# Grab all elements greater than each of the candidates
|
||||
candidate_ge_maps = (self.ge_map[candidate] for candidate in candidates)
|
||||
common_ge_values = reduce(set.intersection, candidate_ge_maps)
|
||||
|
|
@ -147,6 +153,12 @@ class OrderTable:
|
|||
|
||||
candidates = X.intersection(Y)
|
||||
|
||||
if not candidates:
|
||||
return None
|
||||
|
||||
if len(candidates) == 1:
|
||||
return next(iter(candidates))
|
||||
|
||||
# Grab all elements smaller than each of the candidates
|
||||
candidate_le_maps = (self.le_map[candidate] for candidate in candidates)
|
||||
common_le_values = reduce(set.intersection, candidate_le_maps)
|
||||
|
|
@ -209,7 +221,7 @@ class Model:
|
|||
|
||||
def __str__(self):
|
||||
result = ("=" * 25) + f"""
|
||||
Model Name: {self.name}
|
||||
Matrix Name: {self.name}
|
||||
Carrier Set: {set_to_str(self.carrier_set)}
|
||||
Designated Values: {set_to_str(self.designated_values)}
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue