本文整理了Java中org.ujmp.core.Matrix.fill()
方法的一些代码示例,展示了Matrix.fill()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.fill()
方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:fill
暂无
代码示例来源:origin: ujmp/universal-java-matrix-package
public final T fill(Object value, long... size) {
T result = zeros(size);
result.fill(Ret.ORIG, value);
return result;
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public Object call() {
String s = JOptionPane.showInputDialog("Enter value:", initialValue);
return getMatrixObject().getMatrix().fill(getRet(), s);
}
代码示例来源:origin: jdmp/java-data-mining-package
public Object call() {
double value = 0;
String s = JOptionPane.showInputDialog("Enter value:");
try {
value = Double.parseDouble(s);
getVariable().getCoreObject().add(
getVariable().getCoreObject().getLast().fill(Ret.NEW, value));
} catch (Exception ex) {
}
return null;
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testNaN() throws Exception {
Matrix m = createMatrixWithAnnotation(21, 12);
for (long[] c : m.allCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
for (long[] c : m.availableCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
m.fill(Ret.ORIG, Double.NaN);
for (long[] c : m.allCoordinates()) {
assertTrue(getLabel(), Double.isNaN(m.getAsDouble(c)));
}
for (long[] c : m.availableCoordinates()) {
assertTrue(getLabel(), Double.isNaN(m.getAsDouble(c)));
}
if (m instanceof Erasable) {
((Erasable) m).erase();
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testZeros() throws Exception {
Matrix m = createMatrixWithAnnotation(21, 12);
for (long[] c : m.allCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
for (long[] c : m.availableCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
m.fill(Ret.ORIG, 0.0);
for (long[] c : m.allCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
for (long[] c : m.availableCoordinates()) {
assertEquals(getLabel(), 0.0, m.getAsDouble(c), 0.0);
}
if (m instanceof Erasable) {
((Erasable) m).erase();
}
}
内容来源于网络,如有侵权,请联系作者删除!