Package pal.tree
Class CladeSystem
java.lang.Object
pal.tree.CladeSystem
data 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcalculateCladeProbabilities(Tree tree, CladeSystem[] cladeSystems) boolean[]getClade(int i) get cladestatic voidget clade for internal nodeboolean[][]get clade arrayintget number of cladesstatic CladeSystemcreates a clade system from a tree (using a pre-specified order of sequences)static CladeSystemcreates a clade system from a tree (using tree-induced order of sequences)static CladeSystem[]getCladeSystems(Tree[] trees) get idGroupintget 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)toString()print clade system
-
Constructor Details
-
CladeSystem
- Parameters:
idGroup- sequence labelssize- number of clades
-
-
Method Details
-
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
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
print clade system -
getCladeSystems
- Returns:
- all clade systems for a group of trees.
-
calculateCladeProbabilities
-
getClades
creates a clade system from a tree (using a pre-specified order of sequences)- Parameters:
idGroup- sequence order for the matrixtree-
-
getClades
creates a clade system from a tree (using tree-induced order of sequences)- Parameters:
tree-
-
getClade
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
-