This module contains utility functions for symbolic computations,
mostly a thin layer on top of swiginac.
|
is_indexed_type(A)
Checks if the argument is a matrix or lst. |
source code
|
|
|
|
|
as_matrix(A)
Convert A to a swiginac.matrix from a lst or list. |
source code
|
|
|
zeros(m,
n)
Returns a m x n matrix with zeros. |
source code
|
|
|
ones(m,
n)
Returns a m x n matrix with ones. |
source code
|
|
|
|
|
add(A,
B)
Adds two swiginac expressions and calls evalm() on the result before
returning. |
source code
|
|
|
sub(A,
B)
Subtracts two swiginac expressions and calls evalm() on the result
before returning. |
source code
|
|
|
mul(A,
B)
Multiplies two swiginac expressions and calls evalm() on the result
before returning. |
source code
|
|
|
cross(a,
b)
Takes the cross product of two vectors. |
source code
|
|
|
inner(A,
B)
Takes the inner product of A and B: multiplication for scalars, dot
product for vectors and lsts, contraction for matrices. |
source code
|
|
|
|
|
|
|
det(A)
Returns the determinant of the argument. |
source code
|
|
|
abs(x)
Returns the absolute value of the argument. |
source code
|
|
|
transpose(A)
Returns the transpose of the argument. |
source code
|
|
|
trace(A)
Returns the trace of the argument. |
source code
|
|
|
inverse(A)
Returns the inverse of the argument. |
source code
|
|
|
|
|
|
|
diff(f,
x)
Returns df/dx, where x is a symbol or symbolic matrix. |
source code
|
|
|
ddx(f,
i,
GinvT=None)
Returns df/dx_i, where i is the number of the coordinate. |
source code
|
|
|
|
|
|
|
|
|
|