summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
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.