Package pal.tree
Class Local
- java.lang.Object
-
- pal.tree.Local
-
public class Local extends java.lang.Object
Implements LOCAL (Larget and Simon, 1999) and stochastic NNI moves for unrooted trees.- Version:
- $Id: Local.java,v 1.1 2002/01/08 02:09:53 alexi Exp $
- Author:
- Alexei Drummond
-
-
Constructor Summary
Constructors Constructor Description Local()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
displayLabel(java.io.PrintWriter out, java.lang.String label, int width, boolean center)
print label with a prespecified length (label will be shortened or spaces will introduced, if necessary)static Tree
local(Tree tree)
static Tree
local(Tree tree, double scaleFactor)
This method does a local interchange on the given tree: Note the original tree is modified.static void
main(java.lang.String[] args)
static void
print4TaxonTree(Tree tree, java.io.PrintWriter out)
static Tree
stochasticNNI(Tree tree)
-
-
-
Method Detail
-
local
public static Tree local(Tree tree, double scaleFactor)
This method does a local interchange on the given tree: Note the original tree is modified. If this behaviour is inappropriate then pass new SimpleTree(tree) to this method.Actual Logical 2 1 4 /|\ \ / / | \ \ / / | \ \ / 1 A 3 2----3 / \ / \ / \ / \ / \ / \ B 4 A B
A random internal edge (2,3) is selected and extended in both directions to create a back bone (1,2,3,4). One of the two internal nodes (2,3) is moved to a new random position on backbone and the backbone is scale in size.- Parameters:
scale
- determines whether or not the backbone is scaled- Returns:
- a perturbation of given tree.
-
print4TaxonTree
public static void print4TaxonTree(Tree tree, java.io.PrintWriter out)
-
displayLabel
public static void displayLabel(java.io.PrintWriter out, java.lang.String label, int width, boolean center)
print label with a prespecified length (label will be shortened or spaces will introduced, if necessary)- Parameters:
out
- output streamlabel
- label to be printedwidth
- desired length
-
main
public static final void main(java.lang.String[] args)
-
-