Skip to content

Commit 8f5b4b0

Browse files
Removed System.out and print matching result method
1 parent 663bdb5 commit 8f5b4b0

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/main/java/com/thealgorithms/datastructures/graphs/EdmondsBlossomAlgorithm.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,6 @@ private static void contractBlossom(BlossomData blossomData) {
211211
}
212212
}
213213

214-
/**
215-
* Helper method to print the matching results in a readable format.
216-
*
217-
* @param testCase The name of the test case being executed.
218-
* @param matching The list of matched pairs of vertices.
219-
*/
220-
private static void printMatchingResult(String testCase, List<int[]> matching) {
221-
System.out.print(testCase + " Matching: ");
222-
for (int[] pair : matching) {
223-
System.out.print("(" + pair[0] + ", " + pair[1] + ") ");
224-
}
225-
System.out.println();
226-
}
227-
228214
/**
229215
* Auxiliary data class to encapsulate common parameters for the blossom operations.
230216
*/
@@ -262,25 +248,4 @@ static class BlossomData {
262248
this.lca = lca;
263249
}
264250
}
265-
266-
/**
267-
* Method to run multiple test cases for the algorithm.
268-
*/
269-
public static void runTests() {
270-
// Define test cases
271-
List<int[]> edges1 = Arrays.asList(new int[] {0, 1}, new int[] {1, 2}, new int[] {2, 0});
272-
List<int[]> edges2 = Arrays.asList(new int[] {0, 1}, new int[] {1, 2}, new int[] {3, 4});
273-
List<int[]> edges3 = Arrays.asList(new int[] {0, 1}, new int[] {1, 2}, new int[] {2, 3}, new int[] {3, 0}, new int[] {4, 5});
274-
275-
// Create an instance of the algorithm
276-
277-
// Run the test cases
278-
List<List<int[]>> testCases = Arrays.asList(edges1, edges2, edges3);
279-
int vertexCount = 6; // Adjust based on the number of vertices in the test cases
280-
281-
for (int i = 0; i < testCases.size(); i++) {
282-
List<int[]> matching = maximumMatching(testCases.get(i), vertexCount);
283-
printMatchingResult("Test Case " + (i + 1), matching);
284-
}
285-
}
286251
}

0 commit comments

Comments
 (0)