diff options
Diffstat (limited to 'Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java')
-rw-r--r-- | Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java b/Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java index 0da2dc5..ec1506d 100644 --- a/Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java +++ b/Practical1/src/nl/camilstaps/cs/GarbageCollectionHelper.java @@ -17,7 +17,7 @@ class GarbageCollectionHelper { * @param args Command line arguments (are ignored) */ public static void main(String[] args) { - Graph graph = new Graph(); + Graph graph = new Graph<Integer>(); int n_bins = readGraph(new Scanner(System.in), graph); System.out.println(graph.maximumIndependentSetSize() >= n_bins ? "possible" : "impossible"); } @@ -35,13 +35,13 @@ class GarbageCollectionHelper { * @param graph the Graph to build * @return the number of bins */ - private static int readGraph(Scanner sc, Graph graph) { + private static int readGraph(Scanner sc, Graph<Integer> graph) { int n_edges = sc.nextInt(); int n_nodes = sc.nextInt(); int n_bins = sc.nextInt(); for (int i = 1; i <= n_nodes; i++) { - graph.addNode(new Node(i)); + graph.addNode(new Node<>(i)); } for (int i = 0; i < n_edges; i++) { |