Interface DistanceMatrix
- All Known Implementing Classes:
BasicDistanceMatrix, F84DistanceMatrix, HKYDistanceMatrix, JukesCantorDistanceMatrix, SequenceAlignmentsDistanceMatrix, TamuraNeiDistanceMatrix
public interface DistanceMatrix
- Version:
- $Id: DistanceMatrix.java 186 2006-01-24 00:41:22Z pepster $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistance(int row, int column) Gets the distance at a particular row and columndoublegetDistance(Taxon taxonRow, Taxon taxonColumn) Gets the distance between 2 taxadouble[][]Gets a 2-dimensional array containing the distancesintgetSize()Gets the size of the matrix (which is square), i.e., number of rows or columns.getSubmatrix(Collection<Taxon> taxa) Gets a sub-matrix for only those taxa in the collection (all of which should be present in this matrix).getTaxa()
-
Method Details
-
getSize
int getSize()Gets the size of the matrix (which is square), i.e., number of rows or columns.- Returns:
- the size
-
getTaxa
-
getDistance
double getDistance(int row, int column) Gets the distance at a particular row and column- Parameters:
row- the row indexcolumn- the column index- Returns:
- the distance
-
getDistance
-
getSubmatrix
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
-