public boolean retainAll(Collection collection) { return verts.retainAll(collection); }
public boolean retainAll(Collection collection) { return verts.retainAll(collection); }
public boolean retainAll(Collection collection) { return verts.retainAll(collection); }
public static VarSet defaultIntersection (VarSet v1, VarSet v2) {// Grossly inefficient implementation THashSet hset = new THashSet (v1); hset.retainAll (v2); Variable[] ret = new Variable [hset.size ()]; int vai = 0; for (int vi = 0; vi < v1.size(); vi++) { Variable var = v1.get (vi); if (hset.contains (var)) { ret[vai++] = var; } } return new HashVarSet (ret); } }
public static VarSet defaultIntersection (VarSet v1, VarSet v2) {// Grossly inefficient implementation THashSet hset = new THashSet (v1); hset.retainAll (v2); Variable[] ret = new Variable [hset.size ()]; int vai = 0; for (int vi = 0; vi < v1.size(); vi++) { Variable var = v1.get (vi); if (hset.contains (var)) { ret[vai++] = var; } } return new HashVarSet (ret); } }
public static VarSet defaultIntersection (VarSet v1, VarSet v2) {// Grossly inefficient implementation THashSet hset = new THashSet (v1); hset.retainAll (v2); Variable[] ret = new Variable [hset.size ()]; int vai = 0; for (int vi = 0; vi < v1.size(); vi++) { Variable var = v1.get (vi); if (hset.contains (var)) { ret[vai++] = var; } } return new HashVarSet (ret); } }