Package lupos.datastructures.patriciatrie.diskseq

Examples of lupos.datastructures.patriciatrie.diskseq.DBSeqTrieBag


    trie2.add("bus");
    trie2.add("p");
   
    System.out.println("\nTrie2:\n"+trie2);
   
    DBSeqTrieBag testSeq = new DBSeqTrieBag("d:/test3");

    LinkedList<TrieBag> listOfTries = new LinkedList<TrieBag>();
   
    listOfTries.add(trie);
    listOfTries.add(trie2);
   
    try {
      testSeq.merge(listOfTries);
    } catch (TrieNotMergeableException e) {
      e.printStackTrace();
    }
    System.out.println("\nResult of merging:\n"+testSeq);
    Iterator<String> it = testSeq.keyIterator();
    while(it.hasNext()){
      System.out.println(it.next());
    }
   
    RBTrieMap<Float> trieF = new RBTrieMap<Float>();
View Full Code Here


  public Run merge(List<Run> runs, final boolean inmemory) {
    ArrayList<TrieBag> triestoBeMerged = new ArrayList<TrieBag>(runs.size());
    for(Run run: runs){
      triestoBeMerged.add(((TrieBagRun)run).getTrie());
    }
    TrieBag result = (inmemory)? new RBTrieBag() : new DBSeqTrieBag(Run.getFilenameForNewRun());
    try {
      result.merge(triestoBeMerged);
    } catch (TrieNotMergeableException e) {
      System.err.println(e);
      e.printStackTrace();
View Full Code Here

    return this.trie.add(toBeAdded);
  }

  @Override
  public Run swapRun() {
    TrieBag diskbasedTrie = new DBSeqTrieBag(Run.getFilenameForNewRun());
    try {
      diskbasedTrie.copy(this.trie);
    } catch (TrieNotCopyableException e) {
      System.err.println(e);
      e.printStackTrace();
    }
    return new TrieBagRun(diskbasedTrie);
View Full Code Here

TOP

Related Classes of lupos.datastructures.patriciatrie.diskseq.DBSeqTrieBag

Copyright © 2018 www.massapicom. 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.