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 rank() method #10

Merged
merged 2 commits into from
Jan 25, 2013
Merged

added rank() method #10

merged 2 commits into from
Jan 25, 2013

Conversation

jakrin
Copy link
Contributor

@jakrin jakrin commented Jan 22, 2013

Vova, hi! I added rank() method and tests for it.

@vkostyukov
Copy link
Owner

Hi! This is an awsome contribution! Thank you. Please follow my comments. You can just commit to your la4j fork. All changes will be avaliable here.

@@ -216,6 +216,53 @@ public double determinant() {
}

@Override
public int rank() {
if ((columns == 0) || (rows == 0)) return 0;
Matrix m = this;
Copy link
Owner

Choose a reason for hiding this comment

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

I guess we can use direct call get()/set() instead of this field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I use rows()/columns() methods instead of fields?

Copy link
Owner

Choose a reason for hiding this comment

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

No, no. Filelds are OK.

@vkostyukov
Copy link
Owner

Also, don't forget to add yourself to "Contributors" section in the header of AbstractMatrix and Matrix interface.

@vkostyukov
Copy link
Owner

My point is there are always should be a brackets arround of operators. For example:

if (condition1) {
    doOne();
} else if (condition2) {
    doTwo();
} else {
    doThree();
}

Another example:

Wrong statement:

if (option) break;

Correct statement:

if (option) {
    break;
}

@aash
Copy link
Contributor

aash commented Jan 22, 2013

I see a lots of comments concerning coding style/standard. So I would like to see coding standard for such a project, especially since this is common practice for any project where collaboration take place. Can I try to drop a draft of this document? If you agree, could you please create a ticket?
-- Thank you,
Alexey.

@vkostyukov
Copy link
Owner

Sure!

The common practice for Java developers is to use Java Code Convention document written in 1997. I gues 99% of all Java projects uses this code conventions.

@aash
Copy link
Contributor

aash commented Jan 22, 2013

Since there's already industry wide standard for code style, there's no need to invent a bicycle. May be just put a link on front page? For example Apache made it different, they are using Oracle Java Coding Standard with several exceptions.

@vkostyukov
Copy link
Owner

Good point. I wiil put this information into README.md file.

@vkostyukov
Copy link
Owner

Thank you, @jakrin! You've done an awesome job!

vkostyukov added a commit that referenced this pull request Jan 25, 2013
@vkostyukov vkostyukov merged commit 5b4f59c into vkostyukov:master Jan 25, 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.

3 participants