Package jebl.evolution.alignments
Interface Pattern
public interface Pattern
An interface representing a list of states for a list of taxa
(e.g. an alignment column).
- Version:
- $Id: Pattern.java 658 2007-03-20 03:27:20Z twobeers $
- Author:
- Andrew Rambaut, Alexei Drummond
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the most frequent state in this patterngetMostFrequentState
(boolean includeAmbiguous) Returns the most frequent state in this pattern, optionally including ambiguous statesgetState
(int index) Get the state for the ith taxonint
getStateCount
(State state) Returns the count of the given state in this patterndouble
getStateFrequency
(State state) Returns the frequent of the given state in this patterngetTaxa()
double
Get the weight of this pattern
-
Method Details
-
getSequenceType
SequenceType getSequenceType()- Returns:
- the data type of the states in this pattern.
-
getLength
int getLength() -
getTaxa
- Returns:
- the list of taxa that the state values correspond to.
-
getState
Get the state for the ith taxon- Parameters:
index
-- Returns:
- the state
-
getStates
- Returns:
- the list of state values of this pattern.
-
getStateSet
- Returns:
- the set of state values of this pattern.
-
getWeight
double getWeight()Get the weight of this pattern- Returns:
- the weight
-
getMostFrequentState
State getMostFrequentState()Returns the most frequent state in this pattern- Returns:
- the most frequent state
-
getMostFrequentState
Returns the most frequent state in this pattern, optionally including ambiguous states- Parameters:
includeAmbiguous
- whether to include ambiguous states- Returns:
- the most frequent state
-
getStateFrequency
Returns the frequent of the given state in this pattern- Parameters:
state
-- Returns:
- the frequency
-
getStateCount
Returns the count of the given state in this pattern- Parameters:
state
-- Returns:
- the count
-