Skip to content
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

Merged
merged 4 commits into from Aug 3, 2013
Merged

Added Vector.eachNonZero method and implementations (issue #57) #76

merged 4 commits into from Aug 3, 2013

Conversation

SamoylovMD
Copy link
Contributor

No description provided.

@@ -235,6 +235,13 @@ public void each(VectorProcedure procedure) {
}

@Override
public void eachNonZero(VectorProcedure procedure) {
Copy link
Owner

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);
Copy link
Owner

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).

@vkostyukov
Copy link
Owner

Looks good! Just one thing's left (see my comments below).

@vkostyukov
Copy link
Owner

Nice job Maxim @SamoylovMD!

vkostyukov added a commit that referenced this pull request Aug 3, 2013
Added Vector.eachNonZero method and implementations (issue #57)
@vkostyukov vkostyukov merged commit f2294b5 into vkostyukov:master Aug 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants