本文整理了Java中org.ujmp.core.Matrix.getLabelObject()
方法的一些代码示例,展示了Matrix.getLabelObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.getLabelObject()
方法的具体详情如下:
包路径:org.ujmp.core.Matrix
类名称:Matrix
方法名:getLabelObject
暂无
代码示例来源:origin: ujmp/universal-java-matrix-package
public final Object getLabelObject() {
return matrix.getLabelObject();
}
代码示例来源:origin: ujmp/universal-java-matrix-package
writer.write("\\centering" + EOL);
if (matrix.getLabelObject() != null) {
writer.write("\\caption{"
+ UJMPFormat.getSingleLineInstance().format(matrix.getLabelObject()) + "}"
+ EOL);
代码示例来源:origin: ujmp/universal-java-matrix-package
public IncludeAnnotation(Matrix m, int dim) {
super(dim, m);
size = Coordinates.copyOf(m.getSize());
size[dim]++;
setMetaData(new DefaultMapMatrix<String, Object>(new TreeMap<String, Object>()));
getMetaData().put(Matrix.LABEL, m.getLabelObject());
}
代码示例来源:origin: ujmp/universal-java-matrix-package
if (matrix.getLabelObject() != null) {
writer.write(String.valueOf(matrix.getLabelObject()));
代码示例来源:origin: ujmp/universal-java-matrix-package
public ExtractAnnotation(Matrix m, int dim) {
super(dim, m);
size = Coordinates.copyOf(m.getSize());
size[dim]--;
setMetaData(new DefaultMapMatrix<String, Object>(new TreeMap<String, Object>()));
getMetaData().put(Matrix.LABEL, m.getLabelObject());
if (dim == ROW) {
MapMatrix<String, Object> a = m.getMetaData();
if (a != null) {
Matrix ai = (Matrix) a.get(Matrix.DIMENSIONMETADATA + COLUMN);
if (ai != null) {
ai = ai.deleteRows(Ret.NEW, 0);
getMetaData().put(Matrix.DIMENSIONMETADATA + COLUMN, ai);
}
}
getMetaData().put(Matrix.DIMENSIONMETADATA + ROW, m.selectRows(Ret.NEW, 0));
} else if (dim == COLUMN) {
MapMatrix<String, Object> a = m.getMetaData();
if (a != null) {
Matrix ai = (Matrix) a.get(Matrix.DIMENSIONMETADATA + ROW);
if (ai != null) {
ai = ai.selectColumns(Ret.NEW, 0);
getMetaData().put(Matrix.DIMENSIONMETADATA + ROW, ai);
}
}
getMetaData().put(Matrix.DIMENSIONMETADATA + COLUMN, m.selectColumns(Ret.NEW, 0));
} else {
throw new RuntimeException("only supported for 2D matrices");
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
if (matrices[0].getLabelObject() != null) {
MapMatrix<String, Object> annotation = new DefaultMapMatrix<String, Object>(
new TreeMap<String, Object>());
setMetaData(annotation);
annotation.put(Matrix.LABEL, matrices[0].getLabelObject());
for (int d = 0; d < matrices[0].getDimensionCount(); d++) {
if (d == dimension) {
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public void testRows() {
Matrix m1 = Matrix.Factory.zeros(1, 2);
m1.setLabel("label");
m1.setRowLabel(0, "row1");
Matrix m2 = m1.appendVertically(Ret.NEW, Matrix.Factory.zeros(1, 2));
m2.setRowLabel(1, "row2");
assertEquals("label", m2.getLabelObject());
assertEquals("row1", m2.getRowLabel(0));
assertEquals("row2", m2.getRowLabel(1));
}
代码示例来源:origin: ujmp/universal-java-matrix-package
@Test
public void testCols() {
Matrix m1 = Matrix.Factory.zeros(2, 1);
m1.setLabel("label");
m1.setColumnLabel(0, "col1");
Matrix m2 = m1.appendHorizontally(Ret.NEW, Matrix.Factory.zeros(2, 1));
m2.setColumnLabel(1, "col2");
assertEquals("label", m2.getLabelObject());
assertEquals("col1", m2.getColumnLabel(0));
assertEquals("col2", m2.getColumnLabel(1));
}
内容来源于网络,如有侵权,请联系作者删除!