Class SaitouNei

java.lang.Object
All Implemented Interfaces:
ICommand<Matrix,​Tree>

public final class SaitouNei
extends NeighbourJoining
Responsible for calculating a phylogenetic tree from a distance matrix using the Neighbour Joining algorithm by Saitou and Nei.
  • Constructor Details

  • Method Details

    • weight

      protected int weight​(NeighbourJoining.Cluster i)
      Description copied from class: NeighbourJoining
      Gets the weight of a given cluster.
      Specified by:
      weight in class NeighbourJoining
      Parameters:
      i - the cluster to get the weight from
      Returns:
      the weight of the cluster
    • lambda

      protected double lambda​(NeighbourJoining.Cluster ci, NeighbourJoining.Cluster cj)
      Description copied from class: NeighbourJoining
      Gets the proportion of a given cluster according to another.
      Specified by:
      lambda in class NeighbourJoining
      Parameters:
      ci - the cluster to get the proportion of
      cj - the cluster to take into account in the proportion
      Returns:
      the proportion of the cluster according to the other
    • length

      protected double length​(double distance)
      Description copied from class: NeighbourJoining
      Gets the length corresponding to the given distance.
      Specified by:
      length in class NeighbourJoining
      Parameters:
      distance - the distance to get the length of
      Returns:
      the length corresponding to the distance