org.ujmp.core.Matrix.getRMS()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.ujmp.core.Matrix.getRMS()方法的一些代码示例,展示了Matrix.getRMS()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.getRMS()方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:getRMS

Matrix.getRMS介绍

暂无

代码示例

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeLargeSquare() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 101);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeSmallSquare() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(10, 10);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeLargeTall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeSmallTall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(15, 10);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeSmallWide() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(10, 15);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTransposeLargeWide() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(100, 101);
  Matrix ref2 = ref1.transpose(Ret.LINK);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = m1.transpose();
    assertEquals(mclass.toString(), 0.0, ref2.minus(m2).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testMinusScalarSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.minus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.minus(ref2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testPlusScalarSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.plus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.plus(ref2);
    Matrix delta = ref3.minus(m3);
    assertEquals(mclass.toString(), 0.0, delta.getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTimesScalarSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.times(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.times(ref2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testPlusScalarLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.plus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.plus(ref2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testDivideScalarSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.divide(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.divide(ref2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testDivideScalarLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  double ref2 = MathUtil.nextDouble();
  Matrix ref3 = ref1.divide(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m3 = m1.divide(ref2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testDivideMatrixSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref3 = ref1.divide(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.divide(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testMinusMatrixSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref3 = ref1.minus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.minus(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testPlusMatrixSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref3 = ref1.plus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.plus(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testMinusMatrixLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref3 = ref1.minus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.minus(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testPlusMatrixLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref3 = ref1.plus(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.plus(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTimesMatrixSmall() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(11, 10);
  Matrix ref3 = ref1.times(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.times(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testTimesMatrixLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref3 = ref1.times(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.times(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

代码示例来源:origin: ujmp/universal-java-matrix-package

@Test
public void testDivideMatrixLarge() throws Exception {
  Matrix ref1 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref2 = DenseDoubleMatrix2D.Factory.randn(101, 100);
  Matrix ref3 = ref1.divide(Ret.LINK, true, ref2);
  for (Class<? extends Matrix> mclass : ALLFLOATMATRIXCLASSES) {
    Matrix m1 = getMatrix(mclass, ref1);
    Matrix m2 = getMatrix(mclass, ref2);
    Matrix m3 = m1.divide(m2);
    assertEquals(mclass.toString(), 0.0, ref3.minus(m3).getRMS(), TOLERANCE);
  }
}

相关文章

Matrix类方法