Package org.cipres.treebase.domain.matrix

Examples of org.cipres.treebase.domain.matrix.ContinuousMatrixElement


        for (int j = 0; j < numItems; j++) {
          Double2DArray anItem = continuousData.getItem(j);
          double elementValue = anItem.getValue(colIndex, pRowIndex);

          ContinuousMatrixElement anElement = new ContinuousMatrixElement();
          anElement.setValue(elementValue);
          anElement.setColumn(matrixColumn);

          // This can be null, means the default definition 'AVG' is used.
          ItemDefinition definition = getItemDefMap().get(anItem);

          if (definition != null) {
            anElement.setDefinition(definition);
          }

          anElement.appendValue(compoundValues);

          if (j < numItems - 1) {
            compoundValues.append(' ');
          }
        }

        compoundValues.append(')');
        compoundElement.setCompoundValue(compoundValues.toString());

        compoundElement.setElements(elements);
        element = compoundElement;

      } else {
        // single item definition, use single element:
        double elementValue = continuousData.getState(colIndex, pRowIndex, 0);
        ContinuousMatrixElement anElement = new ContinuousMatrixElement();
        anElement.setValue(elementValue);
        anElement.setColumn(matrixColumn);

        element = anElement;
      }
      element.setColumn(matrixColumn);
      pRow.addElement(element);
View Full Code Here


    for ( MatrixRow tbRow : tbMatrix.getRowsReadOnly() ) {     
      List<MatrixElement> elements = tbRow.getElements();
      OTU xmlOTU = getOTUById(xmlOTUs, tbRow.getTaxonLabel().getId());
      if ( characterList.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) {
        for ( int elementIndex = 0; elementIndex < tbMatrix.getnChar(); elementIndex++ ) {
          ContinuousMatrixElement tbCell = (ContinuousMatrixElement)elements.get(elementIndex);
          MatrixCell<Double> xmlCell = xmlMatrix.getCell(xmlOTU, characterList.get(elementIndex));
          xmlCell.setValue(tbCell.getValue());
          attachTreeBaseID((Annotatable)xmlCell,tbCell,DiscreteMatrixElement.class);
        }
      }
      else {
        String seq = tbRow.buildElementAsString();
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.matrix.ContinuousMatrixElement

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.