I've run the SSVDCLI with "-q 1" parameter, but I've got an
java.lang.ArrayIndexOutOfBoundsException.
I found that it's because when it's not a dense vector, i is the index of an
Vector.Element and this index is an item id,so it exceeds the vector size.
My question is if there is a bug in ABtDenseOutJob?
the following code is in ABtDenseOutJob --> ABtMapper --> map() :
if (vec.isDense()) {
for (int i = 0; i < vecSize; i++) {
extendAColIfNeeded(i, aRowCount + 1);
aCols[i].setQuick(aRowCount, vec.getQuick(i));
}
} else if (vec.size() > 0) {
for (Vector.Element vecEl : vec.nonZeroes()) {
int i = vecEl.index(); // i is item id , so it will exceed the vec.size()
usually, when extendAColIfNeeded(i, aRowCount + 1) is called it will get an
error
extendAColIfNeeded(i, aRowCount + 1);
aCols[i].setQuick(aRowCount, vecEl.get());
}
}
So how to fix this proplem ?