solve

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

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.

  1. Real[] solve(MatrixViewA a, Real[] b, Real[] buffer)
    Real[]
    solve
    (
    MatrixViewA
    Real
    )
    (
    const MatrixViewA a
    ,
    const Real[] b
    ,
    Real[] buffer = null
    )
    if (
    isMatrixView!MatrixViewA &&
    )
  2. MatrixViewB solve(MatrixViewA a, MatrixViewB b)

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);

Meta