# Class SplitUtils

java.lang.Object
jebl.evolution.trees.SplitUtils

public class SplitUtils extends Object
utilities for split systems

Version:
  $Id: SplitUtils.java 849 2007-12-06 00:10:14Z twobeers $
Author:
  Korbinian Strimmer

## Method Summary

Modifier and Type
Method
Description
`static void`
`getSplit(List<Taxon> taxa, Tree tree, Edge edge, boolean[] split)`
get split for branch associated with internal node
`static SplitSystem`
`getSplits(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.

### Methods inherited from class Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### 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(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(List<Taxon> taxa, Tree tree, Edge edge, boolean[] split)
get split for branch associated with internal node

Parameters:
  `taxa` - order of labels
  `tree` - Tree
  `edge` - Edge
  `split` -

### 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 1
  `s2` - split 2
Returns:
  true if the two splits are identical
Throws:
  `IllegalArgumentException` - if splits don't have the same length