aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdpoly/__init__.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/mdpoly/__init__.py b/mdpoly/__init__.py
index b08f191..3f56b27 100644
--- a/mdpoly/__init__.py
+++ b/mdpoly/__init__.py
@@ -2,8 +2,9 @@
A Library to represent multivariate polynomials
"""
-# internal classes imported with underscore because they should not be exposed
-# to the end users
+# internal classes imported with underscore because
+# they should not be exposed to the end users
+
from .abc import (Shape as _Shape)
from .algebra import (PolyRingAlgebra as _PolyRingAlgebra,
@@ -13,12 +14,23 @@ from .leaves import (Const as _Const,
Var as _Var,
Param as _Param)
+from .state import State as _State
+
from typing import Self, Sequence
+# ┏━╸╻ ╻┏━┓┏━┓┏━┓╺┳╸ ┏━┓┏━┓ ╻┏━┓
+# ┣╸ ┏╋┛┣━┛┃ ┃┣┳┛ ┃ ┣━┫┗━┓╺━╸┃┗━┓
+# ┗━╸╹ ╹╹ ┗━┛╹┗╸ ╹ ╹ ╹┗━┛ ╹┗━┛
+
Shape = _Shape
+State = _State
+# ╻ ╻┏━┓┏━┓┏━┓┏━┓┏━╸┏━┓┏━┓
+# ┃╻┃┣┳┛┣━┫┣━┛┣━┛┣╸ ┣┳┛┗━┓
+# ┗┻┛╹┗╸╹ ╹╹ ╹ ┗━╸╹┗╸┗━┛
+
class _FromHelpers:
@classmethod
def from_names(cls, comma_separated_names: str, strip: bool =True) -> Sequence[Self]:
@@ -28,7 +40,6 @@ class _FromHelpers:
names = map(str.strip, names)
yield from map(cls, names)
-
class Constant(_Const, _PolyRingAlgebra, _FromHelpers):
""" Constant values """