-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fix typo and package name (#834)
* feat: fix typo and package name * test: added main function as test
- Loading branch information
1 parent
d04112a
commit e5aa801
Showing
3 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/neqsim/statistics/dataanalysis/datasmoothing/DataSmootherTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package neqsim.statistics.dataanalysis.datasmoothing; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class DataSmootherTest { | ||
|
||
@Test | ||
void testgetSmoothedNumbers() { | ||
double[] numbers = {10, 11, 12, 13, 14, 15, 15.5, 15, 19, 14, 14, 13, 12, 12, 11, 10, 9, 8}; | ||
DataSmoother test = new DataSmoother(numbers, 3, 3, 0, 4); | ||
Assertions.assertArrayEquals(numbers, test.getSmoothedNumbers()); | ||
|
||
double[] expected = {10.000000, 11.000000, 12.000000, 12.567099567099579, 13.567099567099582, | ||
14.556277056277072, 15.305194805194823, 15.389610389610409, 16.66233766233768, | ||
17.149350649350666, 13.350649350649375, 13.627705627705646, 12.432900432900452, | ||
11.89177489177491, 11.541125541125552, 10.000000, 9.000000, 8.000000}; | ||
test.runSmoothing(); | ||
Assertions.assertArrayEquals(expected, test.getSmoothedNumbers()); | ||
} | ||
} |