make heap type an enum
This commit is contained in:
@@ -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;}
|
||||||
|
|||||||
4
src/main/java/HeapType.java
Normal file
4
src/main/java/HeapType.java
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
public enum HeapType {
|
||||||
|
FIBONACCI,
|
||||||
|
PAIRING
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user