From b2295c50e08d16d42cd8a756b91d8d52307b052c Mon Sep 17 00:00:00 2001 From: Michael Schneeberger Date: Tue, 9 Aug 2022 10:21:42 +0200 Subject: remove latex expressin in README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index b1bad09..d6b8945 100644 --- a/README.md +++ b/README.md @@ -21,19 +21,19 @@ Some aspects of the library: * [`substitute`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/expression/mixins/expressionmixin.py) * [`sum`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/expression/mixins/expressionmixin.py) * [`to_constant`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/expression/mixins/expressionmixin.py) -* an expression is converted to matrix representation using [`polymatrix.to_matrix_repr`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/__init__.py). Again, to get the actual representation the [`apply(state)`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/statemonad/mixins/statemonadmixin.py) method needs to be called. +* an expression is converted to matrix representation using [`polymatrix.to_matrix_repr`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/__init__.py). To get the actual representation, the [`apply(state)`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/statemonad/mixins/statemonadmixin.py) method needs to be called. ## Example In this example, two polynomial expressions are defined using sympy expressions -$\quad f_1(x_1, x_2) = x_1 + x_2$ +f_1(x_1, x_2) = x_1 + x_2 -$\quad f_2(x_1, x_2) = x_1 + x_1 x_2$ +f_2(x_1, x_2) = x_1 + x_1 x_2 -Then, the two expression are combined using the [`__add__`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/expression/mixins/expressionmixin.py) (or equivalently `+`) function +Then, the two expression are combined using the [`__add__`](https://gitlab.nccr-automation.ch/michael.schneeberger/polymatrix/-/blob/main/polymatrix/expression/mixins/expressionmixin.py) (or equivalently `+`) method -$\quad f_3(x_1, x_2) = f_1(x_1, x_2) + f_2(x_1, x_2) = 2 x_1 + x_2 + x_1 x_2$ +f_3(x_1, x_2) = f_1(x_1, x_2) + f_2(x_1, x_2) = 2 x_1 + x_2 + x_1 x_2 Finally, different representations of the polynomial are printed. -- cgit v1.2.1