|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object spec.benchmarks.scimark.lu.LU
public class LU
LU matrix factorization. (Based on TNT implementation.) Decomposes a matrix A into a triangular lower triangular factor (L) and an upper triangular factor (U) such that A = L*U. By convnetion, the main diagonal of L consists of 1's so that L and U can be stored compactly in a NxN matrix.
Constructor Summary | |
---|---|
LU(int id)
|
Method Summary | |
---|---|
int |
factor(double[][] A,
int[] pivot)
LU factorization (in place). |
double[][] |
getLU()
|
int[] |
getPivot()
Returns a copy of the pivot vector. |
protected static void |
insert_copy(double[][] B,
double[][] A)
|
static void |
main(int id)
Returns a copy of the compact LU factorization. |
double |
measureLU(int N,
double min_time,
Random R)
|
protected static double[] |
new_copy(double[] x)
|
protected static double[][] |
new_copy(double[][] A)
|
static int[] |
new_copy(int[] x)
|
static double |
num_flops(int N)
|
void |
run()
|
double[] |
solve(double[] b)
Solve a linear system, with pre-computed factorization. |
void |
solve(double[][] LU,
int[] pvt,
double[] b)
Solve a linear system, using a prefactored matrix in LU form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LU(int id)
Method Detail |
---|
public static void main(int id)
public static final double num_flops(int N)
protected static double[] new_copy(double[] x)
protected static double[][] new_copy(double[][] A)
public static int[] new_copy(int[] x)
protected static final void insert_copy(double[][] B, double[][] A)
public double[][] getLU()
public int[] getPivot()
public double[] solve(double[] b)
b
- (in) the right-hand side.
public int factor(double[][] A, int[] pivot)
A
- (in/out) On input, the matrix to be factored.
On output, the compact LU factorization.pivot
- (out) The pivot vector records the
reordering of the rows of A during factorization.
public void solve(double[][] LU, int[] pvt, double[] b)
LU
- (in) the factored matrix in LU form.pvt
- (in) the pivot vector which lists
the reordering used during the factorization
stage.b
- (in/out) On input, the right-hand side.
On output, the solution vector.public double measureLU(int N, double min_time, Random R)
public void run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |