All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class linear_algebra.Triangular

java.lang.Object
   |
   +----linear_algebra.Triangular

public class Triangular
extends Object

This class contains:

  1. methods to solve Ly = b and Ux = y where L is a full rank lower triangular matrix and U is a full rank upper triangular matrix.
  2. methods to invert upper and lower triangular full rank matrices.

This class was written by a statistician rather than a numerical analyst. When public domain Java numerical analysis routines become available from numerical analysts (e.g., the people who produce LAPACK), then the code produced by the numerical analysts should be used.

Meanwhile, if you have suggestions for improving this code, please contact Steve Verrill at steve@ws10.fpl.fs.fed.us.


Constructor Index

 o Triangular()

Method Index

 o invertLower(double[][], int)
This method obtains the inverse of a lower triangular n by n matrix L.
 o invertUpper(double[][], int)
This method obtains the inverse of an upper triangular n by n matrix U.
 o solveLower(double[][], double[], double[], int)

This method obtains the solution, y, of the equation Ly = b where L is a known full rank lower triangular n by n matrix, and b is a known vector of length n.

 o solveUpper(double[][], double[], double[], int)
This method obtains the solution, x, of the equation Ux = y where U is a known full rank upper triangular n by n matrix, and y is a known vector of length n.

Constructors

 o Triangular
 public Triangular()

Methods

 o solveLower
 public void solveLower(double l[][],
                        double y[],
                        double b[],
                        int n) throws NotFullRankException

This method obtains the solution, y, of the equation Ly = b where L is a known full rank lower triangular n by n matrix, and b is a known vector of length n.

Parameters:
l[ ][ ] - The lower triangular matrix.
y - The solution vector.
b - The right hand side of the equation.
n - The order of l, y, and b.
 o solveUpper
 public void solveUpper(double u[][],
                        double x[],
                        double y[],
                        int n) throws NotFullRankException
This method obtains the solution, x, of the equation Ux = y where U is a known full rank upper triangular n by n matrix, and y is a known vector of length n.

Parameters:
u[ ][ ] - The upper triangular matrix.
x - The solution vector.
y - The right hand side of the equation.
n - The order of u, x, and y.
 o invertLower
 public void invertLower(double l[][],
                         int n) throws NotFullRankException
This method obtains the inverse of a lower triangular n by n matrix L. L must have non-zero diagonal elements. On exit L is replaced by its inverse.

Parameters:
l[ ][ ] - The lower triangular matrix.
n - The order of l.
 o invertUpper
 public void invertUpper(double u[][],
                         int n) throws NotFullRankException
This method obtains the inverse of an upper triangular n by n matrix U. U must have non-zero diagonal elements. On exit U is replaced by its inverse.

Parameters:
u[ ][ ] - The upper triangular matrix.
n - The order of u.

All Packages  Class Hierarchy  This Package  Previous  Next  Index