?? sample3_10.java
字號:
/*
* 示例程序Sample3_10: Matrix類的矩陣的三角分解
*/
package javaalgorithm.sample;
import javaalgorithm.algorithm.Matrix;
public class Sample3_10
{
public static void main(String[] args)
{
// 矩陣數據
double[] mtxData11 = {
2.0,4.0,4.0,2.0,
3.0,3.0,12.0,6.0,
2.0,4.0,-1.0,2.0,
4.0,2.0,1.0,1.0};
// 構造矩陣
Matrix mtx11 = new Matrix(4, mtxData11);
// 矩陣的三角分解
Matrix mtxL = new Matrix();
Matrix mtxU = new Matrix();
if (mtx11.splitLU(mtxL, mtxU))
{
System.out.println("分解后的L矩陣=");
System.out.println(mtxL);
System.out.println("-------------------------------");
System.out.println("分解后的U矩陣=");
System.out.println(mtxU);
}
else
{
System.out.println("失敗");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -