for (VirtualFile file : FilenameIndex.getVirtualFilesByName(project, name, scope)) { if (file.isValid() && MatcherUtil.matchAllParts(parts, file.getPath())) { files.add(file);
/** * insert non relevance docno into non-relevance list * @param docno */ public void insertNonRelDocno(String docno){ this.nonRelDocnos.add(docno); } }
/** Instantiate this object. Terms in skipTokens will be passed to the last term pipeline * object instead of the next. */ public SkipTermPipeline(TermPipeline _next, TermPipeline _last, String[] _skipTokens) { this.next = _next; this.last = _last; for (String st : _skipTokens) { skipTerms.add(st); } }
/** * insert non relevance docno into non-relevance list * @param docno */ public void insertNonRelDocno(String docno){ this.nonRelDocnos.add(docno); } }
public boolean add(Object object, boolean checkSorted) { if (!(object instanceof Variable)) throw new IllegalArgumentException (object.toString ()); if (!verts.contains (object)) { vertsList.add (object); boolean ret = verts.add (object); if (checkSorted) Collections.sort (vertsList); return ret; } else { return false; } }
@Override public Set<java.util.Map.Entry<String, Counter<K>>> entrySet() { THashSet<java.util.Map.Entry<String,Counter<K>>> entries = new THashSet<java.util.Map.Entry<String,Counter<K>>>(); for (int i=0; i<counters.length; i++) { entries.add(new java.util.AbstractMap.SimpleEntry<String,Counter<K>>(counterNames[i], counters[i])); } return entries; }
public Object create() { THashSet map = new THashSet(); for (int i = 0; i < 1000; i++) { Integer x = new Integer(i); map.add(x); } return map; } }
public DelimFieldTermProcessor(String[] _delims, boolean _indexDelimiters, boolean _countDelimiters) { blockDelimiterTerms = new THashSet<String>(); for (String t : _delims) blockDelimiterTerms.add(t); indexDelimiters = _indexDelimiters; countDelimiters = _countDelimiters; }
public DelimTermProcessor(String[] _delims, boolean _indexDelimiters, boolean _countDelimiters) { blockDelimiterTerms = new THashSet<String>(); for (String t : _delims) blockDelimiterTerms.add(t); indexDelimiters = _indexDelimiters; countDelimiters = _countDelimiters; }
public boolean add(Object object, boolean checkSorted) { if (!(object instanceof Variable)) throw new IllegalArgumentException (object.toString ()); if (!verts.contains (object)) { vertsList.add (object); boolean ret = verts.add (object); if (checkSorted) Collections.sort (vertsList); return ret; } else { return false; } }
public boolean add(Object object, boolean checkSorted) { if (!(object instanceof Variable)) throw new IllegalArgumentException (object.toString ()); if (!verts.contains (object)) { vertsList.add (object); boolean ret = verts.add (object); if (checkSorted) Collections.sort (vertsList); return ret; } else { return false; } }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = stream.readInt(); setUp(size); while (size-- > 0) { Object val = stream.readObject(); add(val); } } } // THashSet
public DelimTermProcessor(String[] _delims, boolean _indexDelimiters, boolean _countDelimiters) { blockDelimiterTerms = new THashSet<String>(); for (String t : _delims) blockDelimiterTerms.add(t); indexDelimiters = _indexDelimiters; countDelimiters = _countDelimiters; }
/** Returns a collection of all factors that involve only the given variables. * That is, all factors whose domain is a subset of the given collection. */ public Collection allFactorsContaining (Collection vars) { THashSet factors = new THashSet (); for (Iterator it = factorsIterator (); it.hasNext ();) { Factor ptl = (Factor) it.next (); if (vars.containsAll (ptl.varSet ())) factors.add (ptl); } return factors; }
/** Returns a collection of all factors that involve only the given variables. * That is, all factors whose domain is a subset of the given collection. */ public Collection allFactorsContaining (Collection vars) { THashSet factors = new THashSet (); for (Iterator it = factorsIterator (); it.hasNext ();) { Factor ptl = (Factor) it.next (); if (vars.containsAll (ptl.varSet ())) factors.add (ptl); } return factors; }
private void piPropagation (FactorGraph mdl, Variable var) { logger.finer ("Pi propagation from "+var); marked.add (var); for (Iterator it = mdl.allFactorsContaining (var).iterator(); it.hasNext();) { Factor child = (Factor) it.next(); if (!marked.contains (child)) { // sendPiMessage (mdl, var, child); sendMessage (mdl, var, child); piPropagation (mdl, child); } } }
private void piPropagation (FactorGraph mdl, Variable var) { logger.finer ("Pi propagation from "+var); marked.add (var); for (Iterator it = mdl.allFactorsContaining (var).iterator(); it.hasNext();) { Factor child = (Factor) it.next(); if (!marked.contains (child)) { // sendPiMessage (mdl, var, child); sendMessage (mdl, var, child); piPropagation (mdl, child); } } }
public Set sepsetPotentials() { THashSet set = new THashSet(); TIntObjectIterator it = sepsets.iterator(); while (it.hasNext()) { it.advance(); Factor ptl = ((Sepset) it.value()).ptl; set.add(ptl); } return set; }
public Set sepsetPotentials() { THashSet set = new THashSet(); TIntObjectIterator it = sepsets.iterator(); while (it.hasNext()) { it.advance(); Factor ptl = ((Sepset) it.value()).ptl; set.add(ptl); } return set; }
public Set sepsetPotentials() { THashSet set = new THashSet(); TIntObjectIterator it = sepsets.iterator(); while (it.hasNext()) { it.advance(); Factor ptl = ((Sepset) it.value()).ptl; set.add(ptl); } return set; }