Function solve

Solve one or more systems of n linear equations in n variables.

Real[] solve(MatrixViewA, Real) (
  const MatrixViewA a,
  const Real[] b,
  Real[] buffer = null
)
if (isMatrixView!MatrixViewA && isFortranType!Real);

MatrixViewB solve(MatrixViewA, MatrixViewB) (
  const MatrixViewA a,
  const MatrixViewB b
)
if (isMatrixView!MatrixViewA && isMatrixView!(MatrixViewB, Storage.General));

The set of equations is given on the form AX=B, where A is an n-by-n matrix and X and B are either vectors of length n (one system of n equations in n variables) or n-by-m matrices (m systems of n equations in n variables). Given A and B as input, this function returns X.

Examples

Solving a system of equations:

MatrixView!double a = ...
double[] b = ...
double[] x = solve(a, b);

Solving several systems of equations:

MatrixView!double a = ...
MatrixView!double b = ...
MatrixView!double x = solve(a, b);