Fix Algorithm Options menu output

This commit is contained in:
2022-02-24 14:59:08 -06:00
parent 8edd89d784
commit d8ba42b801

View File

@@ -508,6 +508,7 @@ public class InteractiveInterface {
case 1 -> BiGpairSEQ.setCacheCells(!BiGpairSEQ.cacheCells());
case 2 -> BiGpairSEQ.setCachePlate(!BiGpairSEQ.cachePlate());
case 3 -> BiGpairSEQ.setCacheGraph(!BiGpairSEQ.cacheGraph());
case 4 -> algorithmOptions();
case 0 -> backToMain = true;
default -> System.out.println("Invalid input");
}
@@ -534,15 +535,23 @@ public class InteractiveInterface {
while(!backToOptions) {
System.out.println("\n---------ALGORITHM OPTIONS----------");
System.out.println("1) Use scaling algorithm by Duan and Su.");
System.out.println("2) Use Hungarian algorithm with Fibonacci heap priority queue");
System.out.println("3) Use Hungarian algorithm with pairing heap priority queue");
System.out.println("2) Use LEDA book algorithm with Fibonacci heap priority queue");
System.out.println("3) Use LEDA book algorithm with pairing heap priority queue");
System.out.println("0) Return to Options menu");
try {
input = sc.nextInt();
switch (input) {
case 1 -> System.out.println("This option is not yet implemented. Choose another.");
case 2 -> BiGpairSEQ.setFibonacciHeap();
case 3 -> BiGpairSEQ.setPairingHeap();
case 2 -> {
BiGpairSEQ.setFibonacciHeap();
System.out.println("MWM algorithm set to LEDA with Fibonacci heap");
backToOptions = true;
}
case 3 -> {
BiGpairSEQ.setPairingHeap();
System.out.println("MWM algorithm set to LEDA with pairing heap");
backToOptions = true;
}
case 0 -> backToOptions = true;
default -> System.out.println("Invalid input");
}