diff options
author | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2022-08-09 10:21:42 +0200 |
---|---|---|
committer | Michael Schneeberger <michael.schneeberger@fhnw.ch> | 2022-08-09 10:21:42 +0200 |
commit | b2295c50e08d16d42cd8a756b91d8d52307b052c (patch) | |
tree | 8ed78fd47fd5a4bcc48aa0566a3696ff7bc5b9c5 /README.md | |
parent | add expression (diff) | |
download | polymatrix-b2295c50e08d16d42cd8a756b91d8d52307b052c.tar.gz polymatrix-b2295c50e08d16d42cd8a756b91d8d52307b052c.zip |
remove latex expressin in README
Diffstat (limited to '')
-rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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. |