Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,3 @@ java_binary(
main_class = "com.williamfiset.algorithms.graphtheory.treealgorithms.TreeIsomorphism",
runtime_deps = [":treealgorithms"],
)

# bazel run //src/main/java/com/williamfiset/algorithms/graphtheory/treealgorithms:TreeIsomorphismWithBfs
java_binary(
name = "TreeIsomorphismWithBfs",
main_class = "com.williamfiset.algorithms.graphtheory.treealgorithms.TreeIsomorphismWithBfs",
runtime_deps = [":treealgorithms"],
)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,5 @@ java_test(
deps = TEST_DEPS,
)

# bazel test //src/test/java/com/williamfiset/algorithms/graphtheory/treealgorithms:TreeIsomorphismWithBfsTest
java_test(
name = "TreeIsomorphismWithBfsTest",
srcs = ["TreeIsomorphismWithBfsTest.java"],
main_class = "org.junit.platform.console.ConsoleLauncher",
use_testrunner = False,
args = ["--select-class=com.williamfiset.algorithms.graphtheory.treealgorithms.TreeIsomorphismWithBfsTest"],
runtime_deps = JUNIT5_RUNTIME_DEPS,
deps = TEST_DEPS,
)

# Run all tests
# bazel test //src/test/java/com/williamfiset/algorithms/graphtheory/treealgorithms:all
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,6 @@ public void differentNumberOfNodes() {
assertThat(treesAreIsomorphic(tree1, tree2)).isEqualTo(false);
}

@Test
public void testIsomorphismEquivilanceAgainstOtherImpl() {
for (int n = 1; n < 50; n++) {
for (int loops = 0; loops < 1000; loops++) {
List<List<Integer>> tree1 = generateRandomTree(n);
List<List<Integer>> tree2 = generateRandomTree(n);

boolean impl1 = treesAreIsomorphic(tree1, tree2);
boolean impl2 =
com.williamfiset.algorithms.graphtheory.treealgorithms.TreeIsomorphismWithBfs
.treesAreIsomorphic(tree1, tree2);
if (impl1 != impl2) {
System.err.println("TreeIsomorphism algorithms disagree!");
System.err.println(tree1);
System.err.println(tree2);
}
assertThat(impl1).isEqualTo(impl2);
}
}
}

// ==================== Encoding tests ====================

@Test
Expand Down
Loading
Loading