Package jebl.evolution.trees
Class SplitUtils
- java.lang.Object
-
- jebl.evolution.trees.SplitUtils
-
public class SplitUtils extends java.lang.Object
utilities for split systems- Version:
- $Id: SplitUtils.java 849 2007-12-06 00:10:14Z twobeers $
- Author:
- Korbinian Strimmer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
getSplit(java.util.List<Taxon> taxa, Tree tree, Edge edge, boolean[] split)
get split for branch associated with internal nodestatic SplitSystem
getSplits(java.util.List<Taxon> taxa, Tree tree)
creates a split system from a tree (using a pre-specified order of sequences)static SplitSystem
getSplits(Tree tree)
creates a split system from a tree (using tree-induced order of sequences)static boolean
isSame(boolean[] s1, boolean[] s2)
Checks two splits for identity.
-
-
-
Method Detail
-
getSplits
public static SplitSystem getSplits(Tree tree)
creates a split system from a tree (using tree-induced order of sequences)- Parameters:
tree
-
-
getSplits
public static SplitSystem getSplits(java.util.List<Taxon> taxa, Tree tree)
creates a split system from a tree (using a pre-specified order of sequences)- Parameters:
taxa
- the list of taxa (order is important)tree
-
-
getSplit
public static void getSplit(java.util.List<Taxon> taxa, Tree tree, Edge edge, boolean[] split)
get split for branch associated with internal node- Parameters:
taxa
- order of labelstree
- Treeedge
- Edgesplit
-
-
isSame
public static boolean isSame(boolean[] s1, boolean[] s2)
Checks two splits for identity. This method assumes that the two splits are of the same length and use the same leaf order/- Parameters:
s1
- split 1s2
- split 2- Returns:
- true if the two splits are identical
- Throws:
java.lang.IllegalArgumentException
- if splits don't have the same length
-
-