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)
  2. MatrixViewB solve_(MatrixViewA a, MatrixViewB b)
    MatrixViewB
    solve_
    (
    MatrixViewA
    MatrixViewB
    )
    (
    MatrixViewA a
    ,
    MatrixViewB b
    )
    if (
    isMatrixView!(MatrixViewA) &&
    )

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