-
Notifications
You must be signed in to change notification settings - Fork 54.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eugenp:master' into master
- Loading branch information
Showing
470 changed files
with
10,953 additions
and
2,263 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
16 changes: 9 additions & 7 deletions
16
...netic/src/test/java/com/baeldung/algorithms/AntColonyOptimizationLongRunningUnitTest.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 |
---|---|---|
@@ -1,22 +1,24 @@ | ||
package com.baeldung.algorithms; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.baeldung.algorithms.ga.ant_colony.AntColonyOptimization; | ||
|
||
public class AntColonyOptimizationLongRunningUnitTest { | ||
class AntColonyOptimizationLongRunningUnitTest { | ||
|
||
@Test | ||
public void testGenerateRandomMatrix() { | ||
void testGenerateRandomMatrix() { | ||
AntColonyOptimization antTSP = new AntColonyOptimization(5); | ||
Assert.assertNotNull(antTSP.generateRandomMatrix(5)); | ||
assertNotNull(antTSP.generateRandomMatrix(5)); | ||
} | ||
|
||
@Test | ||
public void testStartAntOptimization() { | ||
void testStartAntOptimization() { | ||
AntColonyOptimization antTSP = new AntColonyOptimization(5); | ||
Assert.assertNotNull(antTSP.solve()); | ||
assertNotNull(antTSP.solve()); | ||
} | ||
|
||
} |
13 changes: 8 additions & 5 deletions
13
...etic/src/test/java/com/baeldung/algorithms/BinaryGeneticAlgorithmLongRunningUnitTest.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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package com.baeldung.algorithms; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.baeldung.algorithms.ga.binary.SimpleGeneticAlgorithm; | ||
|
||
public class BinaryGeneticAlgorithmLongRunningUnitTest { | ||
class BinaryGeneticAlgorithmLongRunningUnitTest { | ||
|
||
@Test | ||
public void testGA() { | ||
void testGA() { | ||
SimpleGeneticAlgorithm ga = new SimpleGeneticAlgorithm(); | ||
Assert.assertTrue(ga.runAlgorithm(50, "1011000100000100010000100000100111001000000100000100000000001111")); | ||
assertTrue(ga.runAlgorithm(50, "1011000100000100010000100000100111001000000100000100000000001111")); | ||
} | ||
|
||
} |
12 changes: 7 additions & 5 deletions
12
...-genetic/src/test/java/com/baeldung/algorithms/SimulatedAnnealingLongRunningUnitTest.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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
package com.baeldung.algorithms; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.baeldung.algorithms.ga.annealing.SimulatedAnnealing; | ||
|
||
public class SimulatedAnnealingLongRunningUnitTest { | ||
class SimulatedAnnealingLongRunningUnitTest { | ||
|
||
@Test | ||
public void testSimulateAnnealing() { | ||
Assert.assertTrue(SimulatedAnnealing.simulateAnnealing(10, 1000, 0.9) > 0); | ||
void testSimulateAnnealing() { | ||
assertTrue(SimulatedAnnealing.simulateAnnealing(10, 1000, 0.9) > 0); | ||
} | ||
|
||
} |
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
22 changes: 11 additions & 11 deletions
22
...cellaneous-1/src/test/java/com/baeldung/algorithms/kthlargest/FindKthLargestUnitTest.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
19 changes: 10 additions & 9 deletions
19
...rithms-miscellaneous-1/src/test/java/com/baeldung/algorithms/minimax/MinimaxUnitTest.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
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
Oops, something went wrong.