-
Notifications
You must be signed in to change notification settings - Fork 17
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
Simple math classes (improvements needed) #65
Conversation
package de.edux.math; | ||
|
||
/** | ||
* @author ImGolem? |
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.
remove
package de.edux.math; | ||
|
||
/** | ||
* @author ImGolem? |
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.
remove
*/ | ||
public final class Validations { | ||
|
||
public static void size(double[] f, double[] s) { |
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.
write what is f and s dont use shortnames
import java.util.NoSuchElementException; | ||
|
||
/** | ||
* @author ImGolem? |
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.
remove
public class Matrix implements Entity<Matrix>, Iterable<Double> { | ||
|
||
/** | ||
* Represents a raw matrix as a default two-dimension array |
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.
remove comment, we dont use java docs on private fields
public class Vector implements Entity<Vector>, Iterable<Double> { | ||
|
||
/** | ||
* Represents a raw vector as a default array |
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.
remove
} | ||
|
||
/** | ||
* @return raw vector (array) |
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.
remove javadoc
} | ||
|
||
/** | ||
* @return length of the vector |
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.
remove javadoc
@@ -0,0 +1,13 @@ | |||
package de.edux.math; | |||
|
|||
public interface EntityTest { |
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.
Remove this interface
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class MatrixTest implements EntityTest { |
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.
remove implements EntityTest
|
||
@Override | ||
@Test | ||
public void testMultiply() { |
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.
remove empty test
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class VectorTest implements EntityTest { |
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.
Do not use interface in a test class
/** | ||
* @author ImGolem? | ||
*/ | ||
public interface Entity<T> { |
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.
Possible to find better Name for this Interface?
#12