make heap type an enum

This commit is contained in:
2022-02-26 08:15:31 -06:00
parent ab437512e9
commit fb8d8d8785
2 changed files with 10 additions and 6 deletions

View File

@@ -13,9 +13,9 @@ public class BiGpairSEQ {
private static boolean cacheCells = false; private static boolean cacheCells = false;
private static boolean cachePlate = false; private static boolean cachePlate = false;
private static boolean cacheGraph = false; private static boolean cacheGraph = false;
private static String priorityQueueHeapType = "FIBONACCI"; private static HeapType priorityQueueHeapType = HeapType.FIBONACCI;
private static boolean outputBinary = true; private static boolean outputBinary = false;
private static boolean outputGraphML = false; private static boolean outputGraphML = true;
public static void main(String[] args) { public static void main(String[] args) {
if (args.length == 0) { if (args.length == 0) {
@@ -156,15 +156,15 @@ public class BiGpairSEQ {
} }
public static String getPriorityQueueHeapType() { public static String getPriorityQueueHeapType() {
return priorityQueueHeapType; return priorityQueueHeapType.name();
} }
public static void setPairingHeap() { public static void setPairingHeap() {
priorityQueueHeapType = "PAIRING"; priorityQueueHeapType = HeapType.PAIRING;
} }
public static void setFibonacciHeap() { public static void setFibonacciHeap() {
priorityQueueHeapType = "FIBONACCI"; priorityQueueHeapType = HeapType.FIBONACCI;
} }
public static boolean outputBinary() {return outputBinary;} public static boolean outputBinary() {return outputBinary;}

View File

@@ -0,0 +1,4 @@
public enum HeapType {
FIBONACCI,
PAIRING
}