1 Linear Expression Module
2 ========================
4 This class implements linear expressions.
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 .. py:method:: constant(self)
19 Return the constant value of an expression.
21 .. py:method:: symbols(self)
23 Return a list of symbols in an expression.
25 .. py:method:: dimension(self)
27 Return the number of vriables in an expression.
29 .. py:method:: __sub__(self, other)
31 Return the difference between two expressions.
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