Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -888,14 +888,14 @@ public String toString() {
final int pos = pos(i);
final int len = size(i);
if(pos < pos + len) {
sb.append(String.format("row %0"+rowDigits+"d -- ", i));
sb.append(String.format("%0"+rowDigits+"d ", i));
for(int j = pos; j < pos + len; j++) {
if(_values[j] == (long) _values[j])
sb.append(String.format("%"+rowDigits+"d:%d", _indexes[j], (long)_values[j]));
else
sb.append(String.format("%"+rowDigits+"d:%s", _indexes[j], Double.toString(_values[j])));
if(j + 1 < pos + len)
sb.append(", ");
sb.append(" ");
}
sb.append("\n");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ public SparseBlockMCSR(SparseRow[] rows, boolean deep) {
}
}

public SparseBlockMCSR(int rlen, int clen) {
public SparseBlockMCSR(int rlen){
_rows = new SparseRow[rlen];
}

public SparseBlockMCSR(int rlen, int clen) {
this(rlen);
}

/**
* Get the estimated in-memory size of the sparse block in MCSR
Expand Down Expand Up @@ -436,7 +440,7 @@ public String toString() {
for( int i=0; i<nRow; i++ ) {
if(isEmpty(i))
continue;
sb.append(String.format("row %0"+rowDigits+"d -- %s\n", i, _rows[i].toString()));
sb.append(String.format("%0"+rowDigits+"d %s\n", i, _rows[i].toString()));
}

return sb.toString();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/sysds/runtime/data/SparseRow.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public String toString() {
else
sb.append(String.format("%"+rowDigits+"d:%s", indexes[i], Double.toString(values[i])));
if(i + 1 < s)
sb.append(", ");
sb.append(" ");
}

return sb.toString();
Expand Down