Interface DistanceMatrix

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getDistance​(int row, int column)
      Gets the distance at a particular row and column
      double getDistance​(Taxon taxonRow, Taxon taxonColumn)
      Gets the distance between 2 taxa
      double[][] getDistances()
      Gets a 2-dimensional array containing the distances
      int getSize()
      Gets the size of the matrix (which is square), i.e., number of rows or columns.
      DistanceMatrix getSubmatrix​(java.util.Collection<Taxon> taxa)
      Gets a sub-matrix for only those taxa in the collection (all of which should be present in this matrix).
      java.util.List<Taxon> getTaxa()  
    • Method Detail

      • getSize

        int getSize()
        Gets the size of the matrix (which is square), i.e., number of rows or columns.
        Returns:
        the size
      • getTaxa

        java.util.List<Taxon> getTaxa()
        Returns:
        the list of taxa that the state values correspond to.
      • getDistance

        double getDistance​(int row,
                           int column)
        Gets the distance at a particular row and column
        Parameters:
        row - the row index
        column - the column index
        Returns:
        the distance
      • getDistance

        double getDistance​(Taxon taxonRow,
                           Taxon taxonColumn)
        Gets the distance between 2 taxa
        Parameters:
        taxonRow -
        taxonColumn -
        Returns:
        the distance
      • getSubmatrix

        DistanceMatrix getSubmatrix​(java.util.Collection<Taxon> taxa)
        Gets a sub-matrix for only those taxa in the collection (all of which should be present in this matrix).
        Parameters:
        taxa -
        Returns:
        the new submatrix
      • getDistances

        double[][] getDistances()
        Gets a 2-dimensional array containing the distances
        Returns:
        the distances