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

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

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

Matrix.isEmpty介绍

暂无

代码示例

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

public static String getAllAsString(Collection<Matrix> collection) {
  StringBuffer s = new StringBuffer();
  int i = 0;
  for (Matrix m : collection) {
    if (m != null && !m.isEmpty()) {
      s.append(StringUtil.format(m.stringValue()));
    }
    if (i < collection.size() - 1) {
      s.append(", ");
    }
    i++;
  }
  return s.toString();
}

代码示例来源:origin: org.ujmp/ujmp-jdbc

if (matrix == null) {
  return;
} else if (matrix.isEmpty()) {
  return;

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

if (matrix == null) {
  return;
} else if (matrix.isEmpty()) {
  return;

代码示例来源:origin: jdmp/java-data-mining-package

@Override
protected Matrix putIntoMap(String key, Object value) {
  Matrix mv;
  if (value instanceof Matrix) {
    mv = (Matrix) value;
  } else {
    mv = Matrix.Factory.linkToValue(value);
  }
  Matrix m = dataSet.getMatrix(key);
  if (m == null || m.isEmpty()) {
    m = Matrix.Factory.zeros(dataSet.size(), mv.getColumnCount());
    dataSet.setMatrix(key, m);
  }
  m.setContent(Ret.ORIG, mv, index, 0);
  return null;
}

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

@Test
public final void test0Times0Matrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  Matrix m3 = m1.times(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

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

@Test
public final void test0Plus0Matrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  Matrix m3 = m1.plus(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

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

@Test
public final void test0Minus0Matrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  Matrix m3 = m1.minus(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

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

@Test
public final void testXTimes0Matrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  m1.randn(Ret.ORIG);
  Matrix m3 = m1.times(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

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

@Test
public final void test0DivideXMatrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  m2.randn(Ret.ORIG);
  Matrix m3 = m1.divide(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

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

@Test
public final void test0TimesXMatrix() throws Exception {
  Matrix m1 = createMatrixWithAnnotation(5, 7);
  Matrix m2 = createMatrixWithAnnotation(5, 7);
  m2.randn(Ret.ORIG);
  Matrix m3 = m1.times(m2);
  assertTrue(getLabel(), m3.isEmpty());
  if (m1 instanceof Erasable) {
    ((Erasable) m1).erase();
  }
  if (m2 instanceof Erasable) {
    ((Erasable) m2).erase();
  }
  if (m3 instanceof Erasable) {
    ((Erasable) m3).erase();
  }
}

相关文章

Matrix类方法