-
Notifications
You must be signed in to change notification settings - Fork 108
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
Conversation
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; |
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.
I guess we can use direct call get()/set()
instead of this field.
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 I use rows()/columns() methods instead of fields?
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.
No, no. Filelds are OK.
Also, don't forget to add yourself to "Contributors" section in the header of AbstractMatrix and Matrix interface. |
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;
} |
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? |
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. |
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. |
Good point. I wiil put this information into README.md file. |
Thank you, @jakrin! You've done an awesome job! |
Vova, hi! I added rank() method and tests for it.