Examples of TCharArrayList


Examples of gnu.trove.list.array.TCharArrayList

     * specified capacity.
     *
     * @param capacity the initial depth of the stack
     */
    public TCharArrayStack( int capacity ) {
        _list = new TCharArrayList( capacity );
    }
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

     *
     * @param capacity the initial depth of the stack
     * @param no_entry_value value that represents null
     */
    public TCharArrayStack( int capacity, char no_entry_value ) {
        _list = new TCharArrayList( capacity, no_entry_value );
    }
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

     * @param stack the instance to copy
     */
    public TCharArrayStack( TCharStack stack ) {
        if ( stack instanceof TCharArrayStack ) {
            TCharArrayStack array_stack = ( TCharArrayStack ) stack;
            this._list = new TCharArrayList( array_stack._list );
        } else {
            throw new UnsupportedOperationException( "Only support TCharArrayStack" );
        }
    }
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

  private double normFactor = 1;

  public AffineGapGlobalSequenceAlignment(String str1, String str2,
      AlphabetUtils alphabet, AffineGapScoringMatrix matrix) {
    this.str1 = new TCharArrayList();
    this.str2 = new TCharArrayList();
    this.scoringMatrix = matrix;
    this.alphabet = alphabet;
    this.dpTable = new double[0][0];
    this.dpTableE = new double[0][0];
    this.dpTableF = new double[0][0];
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

    this.setSequences(str1, str2);
  }

  public AffineGapGlobalSequenceAlignment(int size1, int size2,
      AlphabetUtils alphabet, AffineGapScoringMatrix matrix) {
    this.str1 = new TCharArrayList();
    this.str2 = new TCharArrayList();
    this.scoringMatrix = matrix;
    this.alphabet = alphabet;
    length1 = size1;
    length2 = size2;
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

  }

  public StemStructure(String header, String sequence, String structure) {
    innerStructureMap = new TIntObjectHashMap<InnerStructure>();

    init(header, new TCharArrayList(sequence.toCharArray()),
        new TCharArrayList(structure.toCharArray()));
  }
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

    innerStructureMap = new TIntObjectHashMap<InnerStructure>();
    init(header, charBuffer2List(sequence), charBuffer2List(structure));
  }

  private TCharArrayList charBuffer2List(CharBuffer cb) {
    TCharArrayList lst = new TCharArrayList();
    for (int i = 0; i < cb.length(); i++) {
      lst.add(cb.charAt(i));
    }
    return lst;
  }
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

  private void init(String header, TCharArrayList sequence, TCharArrayList structure) {

    this.header = header;
    if (this.originalSequence == null) {
      this.originalSequence = new TCharArrayList();
      this.originalStructure = new TCharArrayList();
    } else {
      this.originalSequence.resetQuick();
      this.originalStructure.resetQuick();
    }
    for (int i = 0; i < sequence.size(); i++) {
      this.originalSequence.add(sequence.getQuick(i));
      this.originalStructure.add(structure.getQuick(i));
    }
    this.innerStructureMap.clear();

    // init only if needed
    if (this.backbone != null) {
      this.backbone.resetQuick();
      this.stemLoopSequence.resetQuick();
      this.danglingLeft.resetQuick();
      this.danglingRight.resetQuick();
    } else {
      this.backbone = new TCharArrayList();
      this.stemLoopSequence = new TCharArrayList();
      this.danglingLeft = new TCharArrayList();
      this.danglingRight = new TCharArrayList();
    }

    // get the root information
    final int rootStart = structure.lastIndexOf('(') + 1;
    final int rootEnd = structure.indexOf(rootStart, ')') - 1;
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

      if (structureAlphabet.isSpecial(this.backbone.get(i))) {
        /*
         * in case of a inner structure add the information according to each sequence
         */
        InnerStructure in = innerStructureMap.get(i);
        TCharArrayList left = in.getSequenceLeft();
        for (int l = 0; l < left.size(); l++) {
          sbLeftSequence.append(left.get(l));
          sbLeftStructure.append('.');
        }
        TCharArrayList right = in.getSequenceRight();
        for (int r = 0; r < right.size(); r++) {
          sbRightSequence.append(right.get(r));
          sbRightStructure.append('.');
        }
      } else {
        /* in case of a pair add the information directly */
        char[] pair = structureAlphabet.decodePair(this.backbone.get(i));
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList

    TCharArrayList[] sequences2 = new TCharArrayList[amount];
    double[] answers = new double[amount];
    boolean[] shouldBeCached = new boolean[amount];

    for (int i = 0; i < amount; i++) {
      TCharArrayList seq1 = new TCharArrayList();
      TCharArrayList seq2 = new TCharArrayList();

      int s = rand.nextInt(size * 2) + 1;
      for (int x = 0; x < s; x++) {
        seq1.add(letters[rand.nextInt(letters.length)]);
      }

      s = rand.nextInt(size * 2) + 1;
      for (int x = 0; x < s; x++) {
        seq2.add(letters[rand.nextInt(letters.length)]);
      }

      cache.setSequences(seq1, seq2);
      cache.buildMatrix();

      answers[i] = cache.getAlignmentScore();

      shouldBeCached[i] = seq1.size() <= size && seq2.size() <= size;
      sequences1[i] = seq1;
      sequences2[i] = seq2;
    }

    for (int i = 0; i < amount; i++) {
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.