Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`private int` | `count`
`private static BranchLengthsScaler` | `sharedInstance`
`private double` | `sum`

Constructor Summary
`BranchLengthsScaler()`

Method Summary
`private void` | `calculateAverage(Node root)`
`static BranchLengthsScaler` | `getSharedInstance()`
`void` | `setAverageScale(Tree tree, double averageLength)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sharedInstance

    private static BranchLengthsScaler sharedInstance

### count

    private int count

### sum

    private double sum

Constructor Detail

### BranchLengthsScaler

    public BranchLengthsScaler()

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD