本文整理了Java中org.ujmp.core.Matrix.clone()
方法的一些代码示例,展示了Matrix.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.clone()
方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:clone
暂无
代码示例来源:origin: jdmp/java-data-mining-package
public Map<String, Object> calculateObjects(Map<String, Object> input) {
Map<String, Object> result = new HashMap<String, Object>();
Matrix source = MathUtil.getMatrix(input.get(SOURCE));
Matrix target = source.clone();
result.put(TARGET, target);
return result;
}
代码示例来源:origin: jdmp/java-data-mining-package
public Map<String, Object> calculateObjects(Map<String, Object> input) {
Map<String, Object> result = new HashMap<String, Object>();
Matrix output = MathUtil.getMatrix(input.get(SOURCE1));
Matrix outputdeviation = MathUtil.getMatrix(input.get(SOURCE2));
Matrix target = outputdeviation.clone();
result.put(TARGET, target);
return result;
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public Object call() {
Matrix m = getMatrixObject().getMatrix().clone();
return m;
}
代码示例来源:origin: jdmp/java-data-mining-package
public Variable clone() {
Variable v = Variable.Factory.labeledVariable(getLabel());
for (Matrix m : this) {
v.add(m.clone());
}
return v;
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public void testCopy() {
Matrix matrix1 = Matrix.Factory.zeros(M1ROWS, M1COLS);
setValues(matrix1);
Matrix matrix2 = matrix1.clone();
assertTrue(matrix1.equals(matrix2));
}
代码示例来源:origin: jdmp/java-data-mining-package
public Sample clone(Sample s) {
Sample ret = Sample.Factory.emptySample();
ret.setLabel(s.getLabel());
ret.setDescription(s.getDescription());
for (String k : s.keySet()) {
Matrix v = s.getAsMatrix(k);
if (v != null) {
ret.put(k, v.clone());
}
}
return ret;
}
代码示例来源:origin: ujmp/universal-java-matrix-package
Object o = m.getMetaData(key);
if (o instanceof Matrix) {
annotation.put(key, ((Matrix) o).clone());
} else {
annotation.put(key, o);
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public final void testClone() throws Exception {
Matrix m = createMatrixWithAnnotation(2, 2);
m.setAsDouble(1.0, 0, 0);
m.setAsDouble(2.0, 0, 1);
m.setAsDouble(3.0, 1, 0);
m.setAsDouble(4.0, 1, 1);
Matrix m2 = m.clone();
assertTrue(getLabel(), m.equalsContent(m2));
assertTrue(getLabel(), m.equalsAnnotation(m2));
if (m instanceof Erasable) {
((Erasable) m).erase();
}
}
内容来源于网络,如有侵权,请联系作者删除!