edu.stanford.rsl.konrad.numerics
Class Solvers

java.lang.Object
  extended by edu.stanford.rsl.konrad.numerics.Solvers

public abstract class Solvers
extends java.lang.Object


Constructor Summary
Solvers()
           
 
Method Summary
static SimpleVector solveLinearLeastSquares(SimpleMatrix A, SimpleVector b)
          Solves the linear least squares problem $\min_{\mathbf{x}} \| \mathbf{A} \cdot \mathbf{x} - \mathbf{b} \|^2$ with a matrix A (with as least as much rows as columns).
static SimpleVector solveLinearSysytemOfEquations(SimpleMatrix A, SimpleVector b)
          Solves the linear system of equations $\mathbf{A} \cdot \mathbf{x} = \mathbf{b}$ with a square matrix A.
static SimpleVector solveLowerTriangular(SimpleMatrix L, SimpleVector b)
          Solves the linear system of equations L*x = b with a square, lower-triangular matrix L using forward substitution.
static SimpleVector solveUpperTriangular(SimpleMatrix U, SimpleVector b)
          Solves the linear system of equations U*x = b with a square, upper-triangular matrix U using backward substitution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Solvers

public Solvers()
Method Detail

solveUpperTriangular

public static SimpleVector solveUpperTriangular(SimpleMatrix U,
                                                SimpleVector b)
Solves the linear system of equations U*x = b with a square, upper-triangular matrix U using backward substitution.

Parameters:
U - Square, upper-triangular, non-singular matrix.
b - Right-hand side of the equation.
Returns:
The solution vector x.

solveLowerTriangular

public static SimpleVector solveLowerTriangular(SimpleMatrix L,
                                                SimpleVector b)
Solves the linear system of equations L*x = b with a square, lower-triangular matrix L using forward substitution.

Parameters:
L - Square, lower-triangular, non-singular matrix.
b - Right-hand side of the equation.
Returns:
The solution vector x.

solveLinearSysytemOfEquations

public static SimpleVector solveLinearSysytemOfEquations(SimpleMatrix A,
                                                         SimpleVector b)
Solves the linear system of equations $\mathbf{A} \cdot \mathbf{x} = \mathbf{b}$ with a square matrix A.

Parameters:
A - Square, non-singular matrix.
b - Vector of matching dimension.
Returns:
The solution x to $\mathbf{A} \cdot \mathbf{x} = \mathbf{b}$.

solveLinearLeastSquares

public static SimpleVector solveLinearLeastSquares(SimpleMatrix A,
                                                   SimpleVector b)
Solves the linear least squares problem $\min_{\mathbf{x}} \| \mathbf{A} \cdot \mathbf{x} - \mathbf{b} \|^2$ with a matrix A (with as least as much rows as columns).

Parameters:
A - Square, "standing" matrix.
b - Vector of matching dimension.
Returns:
The optimal solution $\mathbf{x}^*$ minimizing $\| \mathbf{A} \cdot \mathbf{x} - \mathbf{b} \|^2$.