mesquite.cont.lib
Class ContinuousStates

java.lang.Object
  extended by mesquite.lib.characters.CharacterStates
      extended by mesquite.cont.lib.ContinuousStates
All Implemented Interfaces:
ItemContainer, CharacterStatesHolder, Listable, Renamable, WithStringDetails
Direct Known Subclasses:
ContinuousDistribution, GeographicStates

public abstract class ContinuousStates
extends CharacterStates
implements ItemContainer

Contains an array of continuous character states for one character, at each of the taxa or nodes See notes under ContinuousData regarding items


Field Summary
 
Fields inherited from class mesquite.lib.characters.CharacterStates
characterNumber, data, totalCreated
 
Constructor Summary
ContinuousStates(Taxa taxa)
           
 
Method Summary
 boolean firstIsGreater(int N, int M)
          Is the first state greater than second? This uses only the first item!
 java.lang.Class getCharacterDataClass()
          returns the corresponding CharacterData subclass
 CharacterState getCharacterState()
          returns blank CharacterState object
 CharacterState getCharacterState(CharacterState cs, int N)
          get CharacterState at node N
 java.lang.String getDataTypeName()
          returns the name of the type of data stored
 CharacterModel getDefaultModel(MesquiteProject file, java.lang.String paradigm)
          passed the file, finds the default character model.
abstract  java.lang.String getItemName(int index)
           
abstract  int getItemNumber(NameReference nr)
           
abstract  NameReference getItemReference(int index)
           
abstract  NameReference getItemReference(java.lang.String name)
           
abstract  int getNumItems()
           
abstract  double getState(int N)
           
abstract  double getState(int N, int item)
           
 java.lang.Class getStateClass()
          Indicates the type of character stored
 boolean isInapplicable(int N)
          returns whether the character is inapplicable at node/taxon N
 boolean isUnassigned(int N)
          returns whether the state of character is missing in node/taxon N
 boolean isUncertain(int N)
          returns whether the state of character has uncertainty in node/taxon N
 void logStates()
          output to log a list of the states.
 boolean statesEqual(int N, int M)
          returns whether states at nodes n and m are equal
 java.lang.String toString(int node, java.lang.String lineEnding)
          get string describing character states at terminal taxon.
 int userQueryItem(java.lang.String message, MesquiteModule module)
           
 
Methods inherited from class mesquite.lib.characters.CharacterStates
checkIllegalNode, getName, getParentCharacter, getParentData, getTaxa, makeCharacterState, setName, setParentCharacter, setParentData, setTaxa, toExternal, toInternal, toStringWithDetails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface mesquite.lib.characters.CharacterStatesHolder
getNumNodes, getNumTaxa
 

Constructor Detail

ContinuousStates

public ContinuousStates(Taxa taxa)
Method Detail

getCharacterState

public CharacterState getCharacterState()
returns blank CharacterState object

Specified by:
getCharacterState in interface CharacterStatesHolder

getStateClass

public java.lang.Class getStateClass()
Indicates the type of character stored

Specified by:
getStateClass in interface CharacterStatesHolder

getCharacterDataClass

public java.lang.Class getCharacterDataClass()
returns the corresponding CharacterData subclass

Specified by:
getCharacterDataClass in interface CharacterStatesHolder

getDataTypeName

public java.lang.String getDataTypeName()
returns the name of the type of data stored


getNumItems

public abstract int getNumItems()
Specified by:
getNumItems in interface ItemContainer

getItemName

public abstract java.lang.String getItemName(int index)
Specified by:
getItemName in interface ItemContainer

getItemReference

public abstract NameReference getItemReference(java.lang.String name)
Specified by:
getItemReference in interface ItemContainer

getItemReference

public abstract NameReference getItemReference(int index)
Specified by:
getItemReference in interface ItemContainer

getItemNumber

public abstract int getItemNumber(NameReference nr)
Specified by:
getItemNumber in interface ItemContainer

getDefaultModel

public CharacterModel getDefaultModel(MesquiteProject file,
                                      java.lang.String paradigm)
Description copied from interface: CharacterStatesHolder
passed the file, finds the default character model. This is not done well yet. Should be passed the paradigm. Is passed the so the CharacterModel object can be looked up

Specified by:
getDefaultModel in interface CharacterStatesHolder

logStates

public void logStates()
Description copied from interface: CharacterStatesHolder
output to log a list of the states. for debugging purposes

Specified by:
logStates in interface CharacterStatesHolder

getState

public abstract double getState(int N,
                                int item)

getState

public abstract double getState(int N)

isInapplicable

public boolean isInapplicable(int N)
Description copied from interface: CharacterStatesHolder
returns whether the character is inapplicable at node/taxon N

Specified by:
isInapplicable in interface CharacterStatesHolder

isUnassigned

public boolean isUnassigned(int N)
Description copied from interface: CharacterStatesHolder
returns whether the state of character is missing in node/taxon N

Specified by:
isUnassigned in interface CharacterStatesHolder

isUncertain

public boolean isUncertain(int N)
returns whether the state of character has uncertainty in node/taxon N

Specified by:
isUncertain in interface CharacterStatesHolder

userQueryItem

public int userQueryItem(java.lang.String message,
                         MesquiteModule module)

getCharacterState

public CharacterState getCharacterState(CharacterState cs,
                                        int N)
Description copied from interface: CharacterStatesHolder
get CharacterState at node N

Specified by:
getCharacterState in interface CharacterStatesHolder

firstIsGreater

public boolean firstIsGreater(int N,
                              int M)
Is the first state greater than second? This uses only the first item!

Specified by:
firstIsGreater in interface CharacterStatesHolder

statesEqual

public boolean statesEqual(int N,
                           int M)
Description copied from interface: CharacterStatesHolder
returns whether states at nodes n and m are equal

Specified by:
statesEqual in interface CharacterStatesHolder

toString

public java.lang.String toString(int node,
                                 java.lang.String lineEnding)
Description copied from interface: CharacterStatesHolder
get string describing character states at terminal taxon.

Specified by:
toString in interface CharacterStatesHolder