New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Vector.eachNonZero method and implementations (issue #57) #76
Conversation
@@ -235,6 +235,13 @@ public void each(VectorProcedure procedure) { | |||
} | |||
|
|||
@Override | |||
public void eachNonZero(VectorProcedure procedure) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not necessary to check value in compressed vector on zero. It is guaranteed that only non-zero values are store. Which means, that we only need to rename each
to eachNonZero
in CompressedVector
class. Please also make sure that MatrixMarketStream
uses the proper iteration method. TIP: It should be eachNonZero
.
@@ -276,6 +276,11 @@ public void each(VectorProcedure procedure) { | |||
} | |||
|
|||
@Override | |||
public void eachNonZero(VectorProcedure procedure) { | |||
self.each(procedure); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be each.nonZero(procedure)
.
Looks good! Just one thing's left (see my comments below). |
Nice job Maxim @SamoylovMD! |
Added Vector.eachNonZero method and implementations (issue #57)
No description provided.