From 33ec443fe1166f9d866c44a1c4261ec027839225 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 7 May 2024 16:41:51 +0200 Subject: Improve docstring --- polymatrix/polymatrix/mixins.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/polymatrix/polymatrix/mixins.py b/polymatrix/polymatrix/mixins.py index c7a1b00..7313a8e 100644 --- a/polymatrix/polymatrix/mixins.py +++ b/polymatrix/polymatrix/mixins.py @@ -378,6 +378,18 @@ class PolyMatrixAsAffineExpressionMixin( Evaluate the affine expression :math:`p(x) = \sum_{\alpha \in \mathcal{E}\langle x \rangle_d} A_\alpha x^\alpha` at a given :math:`x`. + + The code performs the evaluation by computing the matrix product + + .. math:: + p(x) = \begin{bmatrix} + A_{\alpha_1} & A_{\alpha_2} & \cdots & A_{\alpha_N} + \end{bmatrix} (B(x) \otimes I_m) + \quad + + where :math:`B(x)` contains the monomials and :math:`m` is the number + of columns of each :math:`A_\alpha`. See also :py:meth:`monomials_eval` + and :py:meth:`monomials_eval_all`. """ # Get the number of variables involved -- cgit v1.2.1