detdet() computes the determinant of a matrix of Math::Symbolic trees (or strings that can be parsed as
such). First argument must be a literal array: "det @matrix", where @matrix is an n x n matrix.
Please note that calculating determinants of matrices using the straightforward Laplace algorithm is a
slow (O(n!)) operation. This implementation cannot make use of the various optimizations resulting from
the determinant properties since we are dealing with symbolic matrix elements. If you have a matrix of
reals, it is strongly suggested that you use Math::MatrixReal or Math::Pari to get the determinant which
can be calculated using LR decomposition much faster.
On a related note: Calculating the determinant of a 20x20 matrix would take over 77146 years if your Perl
could do 1 million calculations per second. Given that we're talking about several method calls per
calculation, that's much more than todays computers could do. On the other hand, if you'd be using this
straightforward algorithm with numbers only and in C, you might be done in 26 years alright, so please go
for the smarter route (better algorithm) instead if you have numbers only.
linear_solve
Calculates the solutions x (vector) of a linear equation system of the form "Ax = b" with "A" being a
matrix, "b" a vector and the solution "x" a vector. Due to implementation limitations, "A" must be a
quadratic matrix and "b" must have a dimension that is equivalent to that of "A". Furthermore, the
determinant of "A" must be non-zero. The algorithm used is devised from Cramer's Rule and thus
inefficient. The preferred algorithm for this task is Gaussian Elimination. If you have a matrix and a
vector of real numbers, please consider using either Math::MatrixReal or Math::Pari instead.
First argument must be a reference to a matrix (array of arrays) of symbolic terms, second argument must
be a reference to a vector (array) of symbolic terms. Strings will be automatically converted to
Math::Symbolic trees. Returns a reference to the solution vector.
bell_polynomial
This functions returns the nth Bell Polynomial. It uses memoization for speed increase.
First argument is the n. Second (optional) argument is the variable or variable name to use in the
polynomial. Defaults to 'x'.
The Bell Polynomial is defined as follows:
phi_0 (x) = 1
phi_n+1(x) = x * ( phi_n(x) + partial_derivative( phi_n(x), x ) )
Bell Polynomials are Exponential Polynimals with phi_n(1) = the nth bell number. Please refer to the
bell_number() function in the Math::Symbolic::AuxFunctions module for a method of generating these
numbers.