1 package Analysis.SSJava;
3 import java.util.HashMap;
4 import java.util.HashSet;
5 import java.util.Iterator;
11 // an element of the family is represented by a pair (basis,set of corresponding nodes)
12 Map<Set<Integer>, Set<HNode>> mapFtoGammaF;
14 Set<Set<Integer>> Fset;
16 public static Set<Integer> EMPTY = new HashSet<Integer>();
19 Fset = new HashSet<Set<Integer>>();
21 mapFtoGammaF = new HashMap<Set<Integer>, Set<HNode>>();
24 public void addFElement(Set<Integer> F) {
28 public Set<HNode> getGamma(Set<Integer> F) {
29 if (!mapFtoGammaF.containsKey(F)) {
30 mapFtoGammaF.put(F, new HashSet<HNode>());
32 return mapFtoGammaF.get(F);
35 public void updateGammaF(Set<Integer> F, Set<HNode> gamma) {
36 getGamma(F).addAll(gamma);
39 public boolean containsF(Set<Integer> F) {
40 return Fset.contains(F);
47 public Iterator<Set<Integer>> FIterator() {
48 return Fset.iterator();
51 public String toString() {
53 return mapFtoGammaF.toString();