@Test public void testSparseRowMatrixWritable() throws Exception { Matrix m = new SparseRowMatrix(5, 5); m.set(1, 2, 3.0); m.set(3, 4, 5.0); Map<String, Integer> bindings = Maps.newHashMap(); bindings.put("A", 0); bindings.put("B", 1); bindings.put("C", 2); bindings.put("D", 3); bindings.put("default", 4); m.setRowLabelBindings(bindings); m.setColumnLabelBindings(bindings); doTestMatrixWritableEquals(m); }
public void set(Matrix matrix) { this.matrix = matrix; }
MatrixWritable implements Writable { public void set(Matrix matrix) { this.matrix = matrix; } }
MatrixWritable implements Writable { public void set(Matrix matrix) { this.matrix = matrix; } MatrixWritable();  MatrixWritable(Matrix m); }
MatrixWritable implements Writable { public void set(Matrix matrix) { this.matrix = matrix; } MatrixWritable();  MatrixWritable(Matrix m); Matrix get(); void set(Matrix matrix); @Override void write(DataOutput out); @Override void readFields(DataInput in); static void readLabels(DataInput in,
                                Map<String, Integer> columnLabelBindings,
                                Map<String, Integer> rowLabelBindings); static void writeLabelBindings(DataOutput out,
                                        Map<String, Integer> columnLabelBindings,
                                        Map<String, Integer> rowLabelBindings); static Matrix readMatrix(DataInput in); static void writeMatrix(final DataOutput out, Matrix matrix); }
MatrixWritable implements Writable { public void set(Matrix matrix) { this.matrix = matrix; } MatrixWritable();  MatrixWritable(Matrix m); Matrix get(); void set(Matrix matrix); @Override void write(DataOutput out); @Override void readFields(DataInput in); static void readLabels(DataInput in,
                                Map<String, Integer> columnLabelBindings,
                                Map<String, Integer> rowLabelBindings); static void writeLabelBindings(DataOutput out,
                                        Map<String, Integer> columnLabelBindings,
                                        Map<String, Integer> rowLabelBindings); static Matrix readMatrix(DataInput in); static void writeMatrix(final DataOutput out, Matrix matrix);  }