1 pnkfelix 1.1.2.1 // UncolorableGraphException.java, created Wed Jan 13 14:22:42 1999 by pnkfelix
 2 cananian 1.1.2.4 // Copyright (C) 1998 Felix S. Klock II <pnkfelix@mit.edu>
 3 pnkfelix 1.1.2.1 // Licensed under the terms of the GNU GPL; see COPYING for details.
 4 pnkfelix 1.1.2.1 package harpoon.Analysis.GraphColoring;
 5 pnkfelix 1.1.2.1 
 6 pnkfelix 1.1.2.2 import java.util.Collections;
 7 pnkfelix 1.1.2.2 import java.util.Collection;
 8 pnkfelix 1.1.2.2 
 9 pnkfelix 1.1.2.1 /**
10 pnkfelix 1.1.2.1  * <code>UnableToColorGraph</code> is a control-flow construct for
11 pnkfelix 1.1.2.1  * indicating the provided Graph Coloring algorithm failed to color a 
12 pnkfelix 1.1.2.1  * given graph.
13 pnkfelix 1.1.2.1  * 
14 cananian 1.1.2.4  * @author  Felix S. Klock II <pnkfelix@mit.edu>
15 cananian 1.2      * @version $Id: UnableToColorGraph.java,v 1.2 2002/02/25 20:57:17 cananian Exp $
16 pnkfelix 1.1.2.1  */
17 pnkfelix 1.1.2.1 
18 pnkfelix 1.1.2.1 public class UnableToColorGraph extends Throwable {
19 pnkfelix 1.1.2.3     Collection rmvSuggsLarge;
20 pnkfelix 1.1.2.2     Collection rmvSuggs;
21 pnkfelix 1.1.2.2 
22 pnkfelix 1.1.2.2     /** returns a Collection of nodes that are suggested for
23 pnkfelix 1.1.2.2         removal to make some external graph colorable.
24 pnkfelix 1.1.2.2         No guarantees are made about the colorability of the graph
25 pnkfelix 1.1.2.2         after any nodes are removed; these are merely
26 pnkfelix 1.1.2.2         heuristically-driven hints to the catcher on how to recover. 
27 pnkfelix 1.1.2.2      */
28 pnkfelix 1.1.2.2     public Collection getRemovalSuggestions() {
29 pnkfelix 1.1.2.2         return Collections.unmodifiableCollection(rmvSuggs);
30 pnkfelix 1.1.2.2     }
31 pnkfelix 1.1.2.2 
32 pnkfelix 1.1.2.3     /** returns a Collection of nodes that are suggested for
33 pnkfelix 1.1.2.3         removal to make some external graph colorable.
34 pnkfelix 1.1.2.3         No guarantees are made about the colorability of the graph
35 pnkfelix 1.1.2.3         after any nodes are removed; these are merely
36 pnkfelix 1.1.2.3         heuristically-driven hints to the catcher on how to recover. 
37 pnkfelix 1.1.2.3      */
38 pnkfelix 1.1.2.3     public Collection getRemovalSuggestionsBackup() {
39 pnkfelix 1.1.2.3         return Collections.unmodifiableCollection(rmvSuggsLarge);
40 pnkfelix 1.1.2.3     }
41 pnkfelix 1.1.2.1     /** Creates a <code>UncolorableGraphException</code>. */
42 pnkfelix 1.1.2.1     public UnableToColorGraph() {
43 pnkfelix 1.1.2.1         super();
44 pnkfelix 1.1.2.3         rmvSuggsLarge = rmvSuggs = Collections.EMPTY_SET;
45 pnkfelix 1.1.2.1     }
46 pnkfelix 1.1.2.1 
47 pnkfelix 1.1.2.1     /** Creates a <code>UncolorableGraphException</code>. */
48 pnkfelix 1.1.2.1     public UnableToColorGraph(String s) {
49 pnkfelix 1.1.2.1         super(s);
50 pnkfelix 1.1.2.3         rmvSuggsLarge = rmvSuggs = Collections.EMPTY_SET;
51 pnkfelix 1.1.2.1     }
52 pnkfelix 1.1.2.1     
53 cananian 1.2     }