本文整理了Java中org.ujmp.core.Matrix.lu()
方法的一些代码示例,展示了Matrix.lu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.lu()
方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:lu
暂无
代码示例来源:origin: ujmp/universal-java-matrix-package
public Object call() {
Matrix[] result = getMatrixObject().getMatrix().lu();
result[0].showGUI();
result[1].showGUI();
return result;
}
代码示例来源:origin: ujmp/universal-java-matrix-package
continue;
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
代码示例来源:origin: ujmp/universal-java-matrix-package
Matrix[] luDecomposition = dense.lu();
Matrix[] qrDecomposition = dense.qr();
Matrix choleskyDecomposition = dense.chol();
代码示例来源:origin: org.ujmp/ujmp-examples
Matrix[] luDecomposition = dense.lu();
Matrix[] qrDecomposition = dense.qr();
Matrix choleskyDecomposition = dense.chol();
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUFatFixedSmall() throws Exception {
Matrix a = createMatrixWithAnnotation(4, 6);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.FAT, Size.SMALL, null)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUTallFixedSmall() throws Exception {
Matrix a = createMatrixWithAnnotation(6, 4);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.TALL, Size.SMALL, null)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUSquareSingularSmall() throws Exception {
Matrix a = createMatrixWithAnnotation(5, 5);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.SQUARE, Size.SMALL, EntryType.SINGULAR)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(getLabel(), 0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUFatFixedLarge() throws Exception {
if (!isTestLarge()) {
return;
}
Matrix a = createMatrixWithAnnotation(141, 162);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.FAT, Size.LARGE, null)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUTallFixedLarge() throws Exception {
if (!isTestLarge()) {
return;
}
Matrix a = createMatrixWithAnnotation(161, 142);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.TALL, Size.LARGE, null)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUSquareRandLarge() throws Exception {
if (!isTestLarge()) {
return;
}
Matrix a = createMatrixWithAnnotation(112, 112);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.SQUARE, Size.LARGE, EntryType.RANDN)) {
return;
}
a.randn(Ret.ORIG);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(getLabel(), 0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUSquareSingularLarge() throws Exception {
if (!isTestLarge()) {
return;
}
Matrix a = createMatrixWithAnnotation(116, 116);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.SQUARE, Size.LARGE, EntryType.SINGULAR)) {
return;
}
setAscending(a);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(getLabel(), 0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testLUSquareRandSmall() throws Exception {
Matrix a = createMatrixWithAnnotation(10, 10);
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.SQUARE, Size.SMALL, EntryType.RANDN)) {
return;
}
if (!isSupported(a, MatrixLibraries.LU, MatrixLayout.SQUARE, Size.SMALL, EntryType.SINGULAR)) {
return;
}
a.randn(Ret.ORIG);
Matrix[] lu = a.lu();
Matrix prod = lu[0].mtimes(lu[1]);
Matrix aperm = lu[2].mtimes(a);
assertEquals(getLabel(), 0.0, prod.minus(aperm).getRMS(), TOLERANCE);
if (a instanceof Erasable) {
((Erasable) a).erase();
}
if (prod instanceof Erasable) {
((Erasable) prod).erase();
}
if (aperm instanceof Erasable) {
((Erasable) aperm).erase();
}
}
内容来源于网络,如有侵权,请联系作者删除!