|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjebl.evolution.trees.ClusteringTreeBuilder<Tree>
jebl.evolution.trees.NeighborJoiningTreeBuilder
public class NeighborJoiningTreeBuilder
Constructs an unrooted tree by neighbor-joining using pairwise distances. Adapted from BEAST code.
| Field Summary |
|---|
| Fields inherited from class jebl.evolution.trees.ClusteringTreeBuilder |
|---|
alias, besti, bestj, clusters, distance, distanceMatrix, minimumTaxa, newCluster, numClusters, tipCount |
| Constructor Summary | |
|---|---|
NeighborJoiningTreeBuilder(DistanceMatrix distanceMatrix)
construct NJ tree |
|
| Method Summary | |
|---|---|
protected Node |
createExternalNode(Taxon taxon)
|
protected Node |
createInternalNode(Node[] nodes,
double[] distances)
Creates a new internal node that will have the specified nodes as its children |
protected void |
findNextPair()
Find next two clusters to join. |
protected void |
finish()
|
protected Tree |
getTree()
|
protected double[] |
joinClusters()
Inform derived class that clusters besti,bestj are being joinded into a new cluster. |
protected double |
updatedDistance(int k)
compute updated distance between the new cluster (besti,bestj) to any other cluster k. |
| Methods inherited from class jebl.evolution.trees.ClusteringTreeBuilder |
|---|
addProgressListener, build, fireSetProgress, getBuilder, getDist, init, newCluster, removeProgressListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NeighborJoiningTreeBuilder(DistanceMatrix distanceMatrix)
distanceMatrix - distance matrix| Method Detail |
|---|
protected void findNextPair()
ClusteringTreeBuilder
findNextPair in class ClusteringTreeBuilder<Tree>protected Tree getTree()
getTree in class ClusteringTreeBuilder<Tree>protected Node createExternalNode(Taxon taxon)
createExternalNode in class ClusteringTreeBuilder<Tree>
protected Node createInternalNode(Node[] nodes,
double[] distances)
createInternalNode in class ClusteringTreeBuilder<Tree>nodes - Nodes whose parent is about to be createddistances - Distances of those nodes to the parent. distances.length == nodes.length
must hold.
protected void finish()
finish in class ClusteringTreeBuilder<Tree>protected double[] joinClusters()
ClusteringTreeBuilder
joinClusters in class ClusteringTreeBuilder<Tree>protected double updatedDistance(int k)
ClusteringTreeBuilder
updatedDistance in class ClusteringTreeBuilder<Tree>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||