Package lupos.datastructures.patriciatrie

Examples of lupos.datastructures.patriciatrie.TrieBag


  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();
    }
    return new TrieBagRun(result);
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.TrieBag

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.