public long tracking_evidenceActive() { return id.size(); } public int tracking_kmerCount() {
public int size() { return this.uniqueStrings.size(); }
/** * @return the union of two sets. The maxSize is the larger of the two. If one * of them allow for unbounded size (maxSize = 0) then so does the union. */ DistinctStrings union(final DistinctStrings otherSet) { ObjectOpenHashSet<String> hash = new ObjectOpenHashSet<String>( Math.max(this.uniqueStrings.size(), otherSet.uniqueStrings.size())); hash.addAll(this.uniqueStrings); hash.addAll(otherSet.uniqueStrings); return new DistinctStrings(hash); }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
@Override public boolean addAll(Collection<? extends K> c) { // The resulting collection will be at least c.size() big if (f <= .5) ensureCapacity(c.size()); // The resulting collection will be sized for c.size() elements else tryCapacity(size() + c.size()); // The resulting collection will be tentatively sized for size() + c.size() // elements return super.addAll(c); } @Override
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
/** Creates a new multi-term node. * * @param query a vector of nodes representing distinct terms; they must be either instances * of {@link Term}, or instances of {@link Weight} containing instances of {@link Term}. * @throws IllegalArgumentException if some term appears twice in <code>query</code>, or if * the specification is not followed. */ public MultiTerm( final Query... query ) { super( query ); final ObjectOpenHashSet<MutableString> s = new ObjectOpenHashSet<MutableString>( query.length ); for( Query q : query ) { if ( ! ( q instanceof Term ) && ! ( ( q instanceof Weight ) && ( ((Weight)q).query instanceof Term ) ) ) throw new IllegalArgumentException(); s.add( new MutableString( q instanceof Term ? ((Term)q).term : ((Term)((Weight)q).query ).term ) ); } if ( s.size() != query.length ) throw new IllegalArgumentException( "Multiterm nodes require distinct terms" ); }
/** Creates a new multi-term node. * * @param query a vector of nodes representing distinct terms; they must be either instances * of {@link Term}, or instances of {@link Weight} containing instances of {@link Term}. * @throws IllegalArgumentException if some term appears twice in <code>query</code>, or if * the specification is not followed. */ public MultiTerm( final Query... query ) { super( query ); final ObjectOpenHashSet<MutableString> s = new ObjectOpenHashSet<MutableString>( query.length ); for( Query q : query ) { if ( ! ( q instanceof Term ) && ! ( ( q instanceof Weight ) && ( ((Weight)q).query instanceof Term ) ) ) throw new IllegalArgumentException(); s.add( new MutableString( q instanceof Term ? ((Term)q).term : ((Term)((Weight)q).query ).term ) ); } if ( s.size() != query.length ) throw new IllegalArgumentException( "Multiterm nodes require distinct terms" ); }
/** Creates a new multi-term node. * * @param query a vector of nodes representing distinct terms; they must be either instances * of {@link Term}, or instances of {@link Weight} containing instances of {@link Term}. * @throws IllegalArgumentException if some term appears twice in <code>query</code>, or if * the specification is not followed. */ public MultiTerm( final Query... query ) { super( query ); final ObjectOpenHashSet<MutableString> s = new ObjectOpenHashSet<MutableString>( query.length ); for( Query q : query ) { if ( ! ( q instanceof Term ) && ! ( ( q instanceof Weight ) && ( ((Weight)q).query instanceof Term ) ) ) throw new IllegalArgumentException(); s.add( new MutableString( q instanceof Term ? ((Term)q).term : ((Term)((Weight)q).query ).term ) ); } if ( s.size() != query.length ) throw new IllegalArgumentException( "Multiterm nodes require distinct terms" ); }
/** Creates a new multi-term node. * * @param query a vector of nodes representing distinct terms; they must be either instances * of {@link Term}, or instances of {@link Weight} containing instances of {@link Term}. * @throws IllegalArgumentException if some term appears twice in <code>query</code>, or if * the specification is not followed. */ public MultiTerm( final Query... query ) { super( query ); final ObjectOpenHashSet<MutableString> s = new ObjectOpenHashSet<MutableString>( query.length ); for( Query q : query ) { if ( ! ( q instanceof Term ) && ! ( ( q instanceof Weight ) && ( ((Weight)q).query instanceof Term ) ) ) throw new IllegalArgumentException(); s.add( new MutableString( q instanceof Term ? ((Term)q).term : ((Term)((Weight)q).query ).term ) ); } if ( s.size() != query.length ) throw new IllegalArgumentException( "Multiterm nodes require distinct terms" ); }
LongArrayBitVector[] rankerArray = rankers.toArray(new LongArrayBitVector[rankers.size()]); rankers = null; Arrays.sort(rankerArray);