First, thanks for sharing this code. Second, a bug report:
I think this is essentially the same as issue #10. There appears to be a bug in FloatMatrix.get(Range rs, Range cs) (FloatMatrix.class:642) which currently looks like this:
public FloatMatrix get(Range rs, Range cs) {
rs.init(0, rows);
cs.init(0, columns);
FloatMatrix result = new FloatMatrix(rs.length(), cs.length());
for (; rs.hasMore(); rs.next()) {
for (; cs.hasMore(); cs.next()) {
result.put(rs.index(), cs.index(), get(rs.value(), cs.value()));
}
}
return result;
}
The problem is that only first row is actually "got". I think this is because cs needs to be reset for each row. For instance:
public FloatMatrix get(Range rs, Range cs) {
rs.init(0, rows);
cs.init(0, columns);
FloatMatrix result = new FloatMatrix(rs.length(), cs.length());
for (; rs.hasMore(); rs.next()) {
for (; cs.hasMore(); cs.next()) {
cs.init(0,columns) //<--------------- NOTE CHANGE -----
result.put(rs.index(), cs.index(), get(rs.value(), cs.value()));
}
}
return result;
}
I didn't bother to check if the same is present in DoubleMatrix
First, thanks for sharing this code. Second, a bug report:
I think this is essentially the same as issue #10. There appears to be a bug in FloatMatrix.get(Range rs, Range cs) (FloatMatrix.class:642) which currently looks like this:
The problem is that only first row is actually "got". I think this is because cs needs to be reset for each row. For instance:
I didn't bother to check if the same is present in DoubleMatrix