1 Linear Expression Module
2 ========================
4 This class implements linear expressions. A linear expression is….
6 .. py:class:: Expression
9 .. py:method:: coefficient(self, symbol)
11 Return the coefficient value of the given symbol.
13 .. py:method:: coefficients(self)
15 Return a list of the coefficients of an expression
17 .. attribute:: constant
19 Return the constant value of an expression.
21 .. attribute:: symbols
23 Return a list of symbols in an expression.
25 .. attribute:: dimension
27 Return the number of variables in an expression.
29 .. py:method:: __sub__(self, other)
31 Return the difference between *self* and *other*.
33 .. py:method:: subs(self, symbol, expression=None)
35 Subsitute the given value into an expression and return the resulting expression.
37 .. py:method:: fromsympy(self)
39 Convert sympy object to an expression.
41 .. py:method:: tosympy(self)
43 Return an expression as a sympy object.
45 .. py:class:: Symbol(Expression)
48 .. py:class:: Dummy(Symbol)
50 This class returns a dummy symbol to ensure that each no variables are repeated in an expression