From 3c2ec9002e17cd99d835f8594fac2bcbb63f0518 Mon Sep 17 00:00:00 2001 From: eugenefischer <66030419+eugenefischer@users.noreply.github.com> Date: Sat, 22 Oct 2022 14:13:31 -0500 Subject: [PATCH] Add field for algorithm type, methods to set algorithm type --- src/main/java/BiGpairSEQ.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/BiGpairSEQ.java b/src/main/java/BiGpairSEQ.java index 6b64f50..8485e0d 100644 --- a/src/main/java/BiGpairSEQ.java +++ b/src/main/java/BiGpairSEQ.java @@ -13,6 +13,7 @@ public class BiGpairSEQ { private static boolean cacheCells = false; private static boolean cachePlate = false; private static boolean cacheGraph = false; + private static AlgorithmType matchingAlgoritmType = AlgorithmType.HUNGARIAN; private static HeapType priorityQueueHeapType = HeapType.FIBONACCI; private static boolean outputBinary = true; private static boolean outputGraphML = false; @@ -108,7 +109,6 @@ public class BiGpairSEQ { return graphFilename; } - public static boolean cacheCells() { return cacheCells; } @@ -157,10 +157,16 @@ public class BiGpairSEQ { BiGpairSEQ.cacheGraph = cacheGraph; } - public static String getPriorityQueueHeapType() { - return priorityQueueHeapType.name(); + public static HeapType getPriorityQueueHeapType() { + return priorityQueueHeapType; } + public static AlgorithmType getMatchingAlgoritmType() { return matchingAlgoritmType; } + + public static void setHungarianAlgorithm() { matchingAlgoritmType = AlgorithmType.HUNGARIAN; } + + public static void setAuctionAlgorithm() { matchingAlgoritmType = AlgorithmType.AUCTION; } + public static void setPairingHeap() { priorityQueueHeapType = HeapType.PAIRING; }