forked from moditect/deptective
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bfae73
commit b46f323
Showing
6 changed files
with
5 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ | |
import org.moditect.deptective.internal.graph.impl.Tarjan; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public class GraphUtils { | ||
|
@@ -40,7 +39,8 @@ public class GraphUtils { | |
* | ||
* @param nodes the collection of nodes (the directed graph) | ||
* @return a list of strongly connected components (SCCs). Note that the result also contains components that | ||
* contain just a single node. If you want to detect 'real' cycle (size > 1) please use {@link GraphUtils#detectCycles(Collection)}. | ||
* contain just a single node. If you want to detect 'real' cycle (size > 1) please use | ||
* {@link GraphUtils#detectCycles(Collection)}. | ||
*/ | ||
public static List<List<Node>> detectStronglyConnectedComponents(Collection<Node> nodes) { | ||
return new Tarjan<Node>().detectStronglyConnectedComponents(Objects.requireNonNull(nodes)); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
import org.junit.Test; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public class CyclesTest { | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
import org.junit.Test; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public class DependencyStructureMatrixTest { | ||
|
@@ -41,7 +40,7 @@ public void detectCycle() { | |
nodes.get(0), nodes.get(1), nodes.get(2), | ||
nodes.get(3) | ||
); | ||
|
||
// assert upward dependencies | ||
assertThat(dsm.getUpwardDependencies()).hasSize(1) | ||
.containsExactly(nodes.get(3).getOutgoingDependencyTo(nodes.get(2))); | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
import org.junit.Test; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public class StronglyConnectedComponentsTest { | ||
|
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 |
---|---|---|
|
@@ -23,13 +23,11 @@ | |
import org.moditect.deptective.internal.graph.Node; | ||
|
||
/** | ||
* | ||
* @author Gerd Wütherich ([email protected]) | ||
*/ | ||
public class TestModelCreator { | ||
|
||
/** | ||
* | ||
* @return | ||
*/ | ||
public static List<Node> createDummyModel() { | ||
|