Examples of addAll()


Examples of org.apache.ldap.common.name.LdapName.addAll()

    {
        Name[] childRdns = new Name[children.length];
        for ( int ii = 0; ii < children.length && count[0] < sizeLimit; ii++ )
        {
            Name childRdn = new LdapName();
            childRdn.addAll( parent );
            childRdn.add( "ou=" + ii );
            childRdns[ii] = childRdn;
            sysRoot.createSubcontext( childRdn, children[ii] );
            count[0]++;
        }
View Full Code Here

Examples of org.apache.lenya.cms.publication.util.DocumentSet.addAll()

            List nodes = new ArrayList();
            DocumentSet set = new DocumentSet();

            Document doc = getSourceDocument();
            NodeSet subsite = SiteUtil.getSubSite(this.manager, doc.getLink().getNode());
            set.addAll(new DocumentSet(subsite.getDocuments()));

            Document[] documents = set.getDocuments();
            for (int i = 0; i < documents.length; i++) {
                nodes.add(documents[i].getRepositoryNode());
            }
View Full Code Here

Examples of org.apache.logging.log4j.spi.DefaultThreadContextStack.addAll()

        } catch (IOException e) {
            throw new PersistenceException("Failed to convert JSON string to list for stack.", e);
        }

        DefaultThreadContextStack result = new DefaultThreadContextStack(true);
        result.addAll(list);
        return result;
    }
}
View Full Code Here

Examples of org.apache.lucene.analysis.CharArraySet.addAll()

      // big to start
      words = new CharArraySet(luceneMatchVersion,
          files.size() * 10, ignoreCase);
      for (String file : files) {
        List<String> wlist = loader.getLines(file.trim());
        words.addAll(StopFilter.makeStopSet(luceneMatchVersion, wlist,
            ignoreCase));
      }
    }
    return words;
  }
View Full Code Here

Examples of org.apache.lucene.analysis.util.CharArraySet.addAll()

   * @param ignoreCase If true, all words are lower cased first. 
   * @return a Set containing the words
   */   
  public static CharArraySet makeStopSet(Version matchVersion, String[] stopWords, boolean ignoreCase) {
    CharArraySet stopSet = new CharArraySet(matchVersion, stopWords.length, ignoreCase);
    stopSet.addAll(Arrays.asList(stopWords));
    return stopSet;
  }
 
  /**
   * Creates a stopword set from the given stopword list.
View Full Code Here

Examples of org.apache.lucene.index.SegmentInfos.addAll()

    MergeSpecification spec = null;

    if (numLargeSegs < numSegs) {
      List<SegmentInfoPerCommit> smallSegmentList = infos.asList().subList(numLargeSegs, numSegs);
      SegmentInfos smallSegments = new SegmentInfos();
      smallSegments.addAll(smallSegmentList);
      spec = super.findForcedDeletesMerges(smallSegments);
    }

    if (spec == null) spec = new MergeSpecification();
    for (int i = 0; i < numLargeSegs; i++) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.impl.common.FastIDSet.addAll()

    FastIDSet userIDs = preferenceForItems.get(itemIDs[0]);
    if (userIDs == null) {
      throw new NoSuchItemException();
    }
    FastIDSet intersection = new FastIDSet(userIDs.size());
    intersection.addAll(userIDs);
    int i = 1;
    while (!intersection.isEmpty() && (i < itemIDs.length)) {
      userIDs = preferenceForItems.get(itemIDs[i]);
      if (userIDs == null) {
        throw new NoSuchItemException();
View Full Code Here

Examples of org.apache.mahout.knn.search.BruteSearch.addAll()

    System.out.printf("Generated query matrix.\n");

    for (int threads : new int[]{1, 2, 3, 4, 5, 6, 10, 20, 50}) {
      for (int block : new int[]{1, 10, 50}) {
        BruteSearch search = new BruteSearch(new EuclideanDistanceMeasure());
        search.addAll(referenceVectors);
        long t0 = System.nanoTime();
        search.search(queryVectors, block, threads);
        long t1 = System.nanoTime();
        System.out.printf("%d\t%d\t%.2f\n", threads, block, (t1 - t0) / 1e9);
      }
View Full Code Here

Examples of org.apache.mahout.math.DenseVector.addAll()

                                                                                conf)) {
        Vector v = value.get();
        if (result == null) {
          result = new DenseVector(v);
        } else {
          result.addAll(v);
        }
      }
    }

    if (result == null) {
View Full Code Here

Examples of org.apache.mahout.math.neighborhood.BruteSearch.addAll()

   * @return the minimum distance between the first sampleLimit points
   * @see org.apache.mahout.clustering.streaming.cluster.StreamingKMeans#clusterInternal(Iterable, boolean)
   */
  public static double estimateDistanceCutoff(List<? extends Vector> data, DistanceMeasure distanceMeasure) {
    BruteSearch searcher = new BruteSearch(distanceMeasure);
    searcher.addAll(data);
    double minDistance = Double.POSITIVE_INFINITY;
    for (Vector vector : data) {
      double closest = searcher.searchFirst(vector, true).getWeight();
      if (minDistance > 0 && closest < minDistance) {
        minDistance = closest;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.