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

Simple math classes (improvements needed) #65

Merged
merged 7 commits into from
Oct 26, 2023

Conversation

imgolem
Copy link
Contributor

@imgolem imgolem commented Oct 24, 2023

#12

package de.edux.math;

/**
* @author ImGolem?
Copy link
Owner

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?
Copy link
Owner

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

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?
Copy link
Owner

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

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

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

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

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 {
Copy link
Owner

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 {
Copy link
Owner

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

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 {
Copy link
Owner

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> {
Copy link
Owner

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?

@Samyssmile Samyssmile merged commit 24363ad into Samyssmile:main Oct 26, 2023
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.

2 participants