info.bioinfweb.treegraph.document.io.newick
Class BranchLengthsScaler
java.lang.Object
info.bioinfweb.treegraph.document.io.newick.BranchLengthsScaler
public class BranchLengthsScaler
- extends java.lang.Object
Sets the branch lengths scale of a tree so that the contained branched have a specific average length.
- Since:
- 2.0.24
- Author:
- Ben Stöver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sharedInstance
private static BranchLengthsScaler sharedInstance
count
private int count
sum
private double sum
BranchLengthsScaler
public BranchLengthsScaler()
getSharedInstance
public static BranchLengthsScaler getSharedInstance()
calculateAverage
private void calculateAverage(Node root)
setAverageScale
public void setAverageScale(Tree tree,
double averageLength)
- Parameters:
tree - averageLength - - the average length in millimeters