summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expression/impl.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/polymatrix/expression/impl.py b/polymatrix/expression/impl.py
index 0a60fb8..a185802 100644
--- a/polymatrix/expression/impl.py
+++ b/polymatrix/expression/impl.py
@@ -249,6 +249,10 @@ class HalfNewtonPolytopeExprImpl(HalfNewtonPolytopeExprMixin):
variables: ExpressionBaseMixin
filter: ExpressionBaseMixin | None
+ def __str__(self):
+ # FIXME: what does filter do?
+ return f"halfnewton({self.monomials}, {self.variables})"
+
@dataclassabc.dataclassabc(frozen=True)
class IntegrateExprImpl(IntegrateExprMixin):
@@ -270,6 +274,9 @@ class LinearInExprImpl(LinearInExprMixin):
variables: ExpressionBaseMixin
ignore_unmatched: bool
+ def __str__(self):
+ return f"linear_in({self.underlying}, {self.monomials})"
+
@dataclassabc.dataclassabc(frozen=True)
class LinearMatrixInExprImpl(LinearMatrixInExprMixin):
@@ -282,6 +289,9 @@ class LinearMonomialsExprImpl(LinearMonomialsExprMixin):
underlying: ExpressionBaseMixin
variables: tuple
+ def __str__(self):
+ return f"linear_monomials({self.underlying})"
+
@dataclassabc.dataclassabc(frozen=True)
class LowerTriangularExprImpl(LowerTriangularExprMixin):
@@ -334,6 +344,9 @@ class DegreeExprImpl(DegreeExprMixin):
class MaxExprImpl(MaxExprMixin):
underlying: ExpressionBaseMixin
+ def __str__(self):
+ return f"max({self.underlying})"
+
@dataclassabc.dataclassabc(frozen=True)
class NamedExprImpl(NamedExprMixin):
@@ -405,7 +418,7 @@ class QuadraticInExprImpl(QuadraticInExprMixin):
def __str__(self):
- return f"QuadraticIn({str(self.underlying)}, {str(self.variables)})"
+ return f"quadratic_in({str(self.underlying)}, {str(self.variables)})"
@dataclassabc.dataclassabc(frozen=True)
@@ -414,7 +427,7 @@ class QuadraticMonomialsExprImpl(QuadraticMonomialsExprMixin):
variables: tuple
def __str__(self):
- return f"QuadraticMonomials({str(self.underlying)}, {str(self.variables)})"
+ return f"quadratic_monomials({str(self.underlying)})"
@dataclassabc.dataclassabc(frozen=True)