Package pal.tree
Class CladeSystem
- java.lang.Object
-
- pal.tree.CladeSystem
-
public class CladeSystem extends java.lang.Objectdata structure for a set of splits- Version:
- $Id: CladeSystem.java,v 1.1 2002/06/03 09:17:52 alexi Exp $
- Author:
- Alexei Drummond
-
-
Constructor Summary
Constructors Constructor Description CladeSystem(IdGroup idGroup, int size)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcalculateCladeProbabilities(Tree tree, CladeSystem[] cladeSystems)boolean[]getClade(int i)get cladestatic voidgetClade(IdGroup idGroup, Node internalNode, boolean[] clade)get clade for internal nodeboolean[][]getCladeArray()get clade arrayintgetCladeCount()get number of cladesstatic CladeSystemgetClades(IdGroup idGroup, Tree tree)creates a clade system from a tree (using a pre-specified order of sequences)static CladeSystemgetClades(Tree tree)creates a clade system from a tree (using tree-induced order of sequences)static CladeSystem[]getCladeSystems(Tree[] trees)IdGroupgetIdGroup()get idGroupintgetLabelCount()get number of labelsbooleanhasClade(boolean[] clade)+ test whether a clade is contained in this clade system (assuming the same leaf order)static booleanisSame(boolean[] s1, boolean[] s2)checks whether two clades are identical (assuming they are of the same length and use the same leaf order)java.lang.StringtoString()print clade system
-
-
-
Constructor Detail
-
CladeSystem
public CladeSystem(IdGroup idGroup, int size)
- Parameters:
idGroup- sequence labelssize- number of clades
-
-
Method Detail
-
getCladeCount
public int getCladeCount()
get number of clades
-
getLabelCount
public int getLabelCount()
get number of labels
-
getCladeArray
public boolean[][] getCladeArray()
get clade array
-
getClade
public boolean[] getClade(int i)
get clade
-
getIdGroup
public IdGroup getIdGroup()
get idGroup
-
hasClade
public boolean hasClade(boolean[] clade)
+ test whether a clade is contained in this clade system (assuming the same leaf order)- Parameters:
clade- clade
-
toString
public java.lang.String toString()
print clade system- Overrides:
toStringin classjava.lang.Object
-
getCladeSystems
public static CladeSystem[] getCladeSystems(Tree[] trees)
- Returns:
- all clade systems for a group of trees.
-
calculateCladeProbabilities
public static void calculateCladeProbabilities(Tree tree, CladeSystem[] cladeSystems)
-
getClades
public static CladeSystem getClades(IdGroup idGroup, Tree tree)
creates a clade system from a tree (using a pre-specified order of sequences)- Parameters:
idGroup- sequence order for the matrixtree-
-
getClades
public static CladeSystem getClades(Tree tree)
creates a clade system from a tree (using tree-induced order of sequences)- Parameters:
tree-
-
getClade
public static void getClade(IdGroup idGroup, Node internalNode, boolean[] clade)
get clade for internal node- Parameters:
idGroup- order of labelsinternalNode- Nodeboolean- [] clade
-
isSame
public static boolean isSame(boolean[] s1, boolean[] s2)checks whether two clades are identical (assuming they are of the same length and use the same leaf order)- Parameters:
s1- clade 1s2- clade 2
-
-