pal.tree
Class Local

java.lang.Object
  extended bypal.tree.Local

public class Local
extends java.lang.Object

Implements LOCAL (Larget and Simon, 1999) and stochastic NNI moves for unrooted trees.


Constructor Summary
Local()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Local

public Local()
Method Detail

local

public static Tree local(Tree tree)

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.

Returns:
a perturbation of given tree.

stochasticNNI

public static Tree stochasticNNI(Tree 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 stream
label - label to be printed
width - desired length

main

public static final void main(java.lang.String[] args)