Skip to content

Commit

Permalink
Fix #227
Browse files Browse the repository at this point in the history
  • Loading branch information
vkostyukov committed Dec 25, 2014
1 parent 66dd4fd commit d6ac764
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/la4j/matrix/sparse/CCSMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ public boolean nonZeroAt(int i, int j) {
}

private int searchForRowIndex(int i, int left, int right) {
// TODO: https://github.com/vkostyukov/la4j/issues/227
if (right - left == 0 || i > rowIndices[right - 1]) {
return right;
}

while (left < right) {
int p = (left + right) / 2;
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/la4j/matrix/sparse/CRSMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ public boolean nonZeroAt(int i, int j) {
}

private int searchForColumnIndex(int j, int left, int right) {
// TODO: https://github.com/vkostyukov/la4j/issues/227
if (right - left == 0 || j > columnIndices[right - 1]) {
return right;
}

while (left < right) {
int p = (left + right) / 2;
Expand Down

0 comments on commit d6ac764

Please sign in to comment.