|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmesquite.lib.characters.CharacterState
mesquite.cont.lib.ContinuousState
public class ContinuousState
This class provides some basic utilities for Continuous characters. It represents the entry for one character and one taxon. Thus, it can contain more than one item (min, max, mean, variance, etc.).
| Field Summary | |
|---|---|
static double |
impossible
The state (MesquiteDouble.impossible) that corresponds to an impossible value. |
static double |
inapplicable
The state (MesquiteDouble.inapplicable) that corresponds to a gap (inapplicable data). |
static double |
infinite
The state (MesquiteDouble.infinite) that corresponds to infinite. |
static int |
MAXITEMS
The maximum allowed number of items |
static double |
unassigned
The state (MesquiteDouble.unassigned) that corresponds to missing data. |
| Constructor Summary | |
|---|---|
ContinuousState()
|
|
ContinuousState(double value)
|
|
| Method Summary | |
|---|---|
static double |
absolute(double d)
|
boolean |
equals(CharacterState s)
returns true iff state sets are same |
boolean |
equals(CharacterState s,
boolean allowMissing)
returns true iff state sets are same |
boolean |
equals(CharacterState s,
boolean allowMissing,
boolean allowNearExact)
returns true iff state sets are same |
java.lang.Class |
getCharacterDataClass()
returns the subclass of CharacterData that is equivalent to this character type (i.e., in which sort of matrix would this character state reside? |
java.lang.Class |
getCharacterDistributionClass()
returns the subclass of CharacterDistribution that is equivalent to this character type (i.e., in which sort of Distribution would this character state reside?. |
java.lang.Class |
getCharacterHistoryClass()
returns the subclass of CharacterHistory that is equivalent to this character type (i.e., in which sort of Distribution would this character state reside? |
java.lang.String |
getDataTypeName()
returns the name of the type of data stored |
java.lang.String |
getItemName(int n)
gets name of item n |
int |
getItemNumber(NameReference nr)
returns which item number has NameReference nr nr |
NameReference |
getItemReference(int n)
gets NameReferece of item n |
NameReference |
getItemReference(java.lang.String name)
gets NameReferece of item n |
java.lang.Class |
getMCharactersDistributionClass()
returns the subclass of MCharactersDistribution that is equivalent to this character type (i.e., in which sort of matrix would this character state reside? |
int |
getNumItems()
returns the number of items (min, max, mean, variance, etc.) in this state |
double |
getValue(int n)
gets the value of item # n |
double |
getValue(NameReference nr)
gets the name value of item with NameReference NR |
boolean |
isCombinable()
returns true if at least one item is combinable (i.e. |
static boolean |
isCombinable(double d)
returns whether value is combinable (i.e. |
boolean |
isImpossible()
returns true if at least one item is invalid |
static boolean |
isImpossible(double s)
returns true if value is invalid |
boolean |
isInapplicable()
returns true if all items are inapplicable |
static boolean |
isInapplicable(double s)
returns true if inapplicable |
boolean |
isUnassigned()
returns true if all items have missing data (unassigned) |
static boolean |
isUnassigned(double s)
returns true if missing data (unassigned) |
AdjustableDistribution |
makeAdjustableDistribution(Taxa taxa,
int numNodes)
returns a AdjustableDistribution that is equivalent to this character type (i.e., in which sort of matrix would this character state reside? |
CharacterHistory |
makeCharacterHistory(Taxa taxa,
int numNodes)
returns a CharacterHistory that is equivalent to this character type (i.e., in which sort of matrix would this character state reside? |
static double |
maximum(double d1,
double d2)
|
static double |
minimum(double d1,
double d2)
|
void |
setItemReference(int n,
NameReference nr)
sets NameReference of item n |
void |
setItemsAs(ItemContainer iCont)
|
void |
setNumItems(int n)
sets the number of items in this state |
void |
setToInapplicable()
sets the value to inapplicable |
void |
setToUnassigned()
sets the value to unassigned |
void |
setValue(CharacterState cs)
sets its value to the value in CharacterState passed to it |
void |
setValue(int n,
double d)
sets value of item n |
void |
setValue(java.lang.String st,
CharacterData parentData)
sets its value to the value given by the String passed to it |
void |
setValue(java.lang.String st,
MesquiteInteger pos)
sets its value to the value given by the String passed to it starting at position pos |
java.lang.String |
toDisplayString()
Returns string as would be displayed to user (not necessarily internal shorthand). |
java.lang.String |
toString()
returns string representation of the character state |
| Methods inherited from class mesquite.lib.characters.CharacterState |
|---|
equals, makeMCharactersDistribution |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final double unassigned
public static final double inapplicable
public static final double infinite
public static final double impossible
public static final int MAXITEMS
| Constructor Detail |
|---|
public ContinuousState()
public ContinuousState(double value)
| Method Detail |
|---|
public java.lang.String getDataTypeName()
getDataTypeName in class CharacterStatepublic int getNumItems()
getNumItems in interface ItemContainerpublic void setNumItems(int n)
public java.lang.String getItemName(int n)
getItemName in interface ItemContainerpublic NameReference getItemReference(java.lang.String name)
getItemReference in interface ItemContainerpublic NameReference getItemReference(int n)
getItemReference in interface ItemContainer
public void setItemReference(int n,
NameReference nr)
public int getItemNumber(NameReference nr)
getItemNumber in interface ItemContainerpublic void setItemsAs(ItemContainer iCont)
public java.lang.Class getCharacterDataClass()
CharacterState
getCharacterDataClass in class CharacterStatepublic java.lang.Class getMCharactersDistributionClass()
CharacterState
getMCharactersDistributionClass in class CharacterStatepublic java.lang.Class getCharacterDistributionClass()
CharacterState
getCharacterDistributionClass in class CharacterStatepublic java.lang.Class getCharacterHistoryClass()
CharacterState
getCharacterHistoryClass in class CharacterState
public AdjustableDistribution makeAdjustableDistribution(Taxa taxa,
int numNodes)
CharacterState
makeAdjustableDistribution in class CharacterState
public CharacterHistory makeCharacterHistory(Taxa taxa,
int numNodes)
CharacterState
makeCharacterHistory in class CharacterStatepublic static boolean isUnassigned(double s)
public boolean isUnassigned()
isUnassigned in class CharacterStatepublic static boolean isInapplicable(double s)
public boolean isInapplicable()
isInapplicable in class CharacterStatepublic static boolean isImpossible(double s)
public boolean isImpossible()
isImpossible in class CharacterStatepublic boolean isCombinable()
isCombinable in class CharacterStatepublic static boolean isCombinable(double d)
public boolean equals(CharacterState s)
equals in class CharacterState
public boolean equals(CharacterState s,
boolean allowMissing)
equals in class CharacterState
public boolean equals(CharacterState s,
boolean allowMissing,
boolean allowNearExact)
equals in class CharacterStatepublic static double absolute(double d)
public static double maximum(double d1,
double d2)
public static double minimum(double d1,
double d2)
public void setToInapplicable()
setToInapplicable in class CharacterStatepublic void setToUnassigned()
setToUnassigned in class CharacterState
public void setValue(int n,
double d)
public void setValue(CharacterState cs)
CharacterState
setValue in class CharacterState
public void setValue(java.lang.String st,
CharacterData parentData)
CharacterState
setValue in class CharacterStatepublic double getValue(int n)
public double getValue(NameReference nr)
public void setValue(java.lang.String st,
MesquiteInteger pos)
CharacterState
setValue in class CharacterStatepublic java.lang.String toString()
CharacterState
toString in class CharacterStatepublic java.lang.String toDisplayString()
toDisplayString in class CharacterState
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||