2aab652b63741020c7c9d3cd7c0676bd4155cba8
[linpy.git] / doc / linexpr.rst
1 Linear Expression Module
2 ========================
3
4 This class implements linear expressions.
5
6 .. py:class:: Expression
7
8
9 .. py:method:: coefficient(self, symbol)
10
11 Return the coefficient value of the given symbol.
12
13 .. py:method:: coefficients(self)
14
15 Return a list of the coefficients of an expression
16
17 .. py:method:: constant(self)
18
19 Return the constant value of an expression.
20
21 .. py:method:: symbols(self)
22
23 Return a list of symbols in an expression.
24
25 .. py:method:: dimension(self)
26
27 Return the number of vriables in an expression.
28
29 .. py:method:: __sub__(self, other)
30
31 Return the difference between two expressions.
32
33 .. py:method:: subs(self, symbol, expression=None)
34
35 Subsitute the given value into an expression and return the resulting expression.
36
37 .. py:method:: fromsympy(self)
38
39 Convert sympy object to an expression.
40
41 .. py:method:: tosympy(self)
42
43 Return an expression as a sympy object.
44
45 .. py:class:: Symbol(Expression)
46
47
48 .. py:class:: Dummy(Symbol)
49
50 This class returns a dummy symbol to ensure that each no variables are repeated in an expression