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

Implemented normalizeInPlace. #207

Closed
wants to merge 1 commit into from
Closed

Implemented normalizeInPlace. #207

wants to merge 1 commit into from

Conversation

DWiechert
Copy link
Contributor

Based on the comments on #206, I added a default normalizeInPlace() using the Euclidean accumulator as well as normalizeInPlace(VectorAccumulator acc).


@Override
public void normalizeInPlace(VectorAccumulator acc) {
Vector normalized = normalize(acc);
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 really in-place, since you created a vector here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realize that you wanted no extra object creation done.

I look into removing this extra Vector creation and if I get it I will amend the commit.

@vkostyukov
Copy link
Owner

Hi @DWiechert!

Thanks for the PR.

The la4j is currently in the middle of epic journey that involves this operations concept. The next stop should be implementing in-place operations. So, we don't really need doing it right now.

If you will to contribute more - let me know I will find something that is important right now.

@vkostyukov vkostyukov added this to the la4j-0.5.0 milestone Dec 3, 2014
@DWiechert
Copy link
Contributor Author

Hey there @vkostyukov. I'd be happy to try and tackle some other issues. I only submitted this PR because both this method and Vector normalize() (#206) were mentioned together on #186.

I'm still trying to poke through and learn this library at the moment, but I'll do my best to try and help out.

@vkostyukov
Copy link
Owner

Sure! Here is the issue that doesn't conflict with operations redesign: #202. I will update the description of that ticket to make it clear what to do. Feel free to take it and ask any questions there.

@DWiechert
Copy link
Contributor Author

Ok, thanks.

As for this PR, what should be done? Will it just be left here until that Operations work is done and re-visited, or is there a way to close it out?

@vkostyukov
Copy link
Owner

I think it would be better to close it for now. The in-place operations are part of 0.6.0 milestone (the current one is 0.5.0). So we would probably don't want it handing here for a bunch of months. Let's close it to keep the repository clear.

@vkostyukov vkostyukov closed this Dec 3, 2014
@DWiechert DWiechert deleted the 186-normalizeInPlace branch December 3, 2014 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants