mesquite.genesis.lib
Class CharRatesGamma

java.lang.Object
  extended by mesquite.lib.Listened
      extended by mesquite.lib.Attachable
          extended by mesquite.lib.Associable
              extended by mesquite.lib.AssociableWithSpecs
                  extended by mesquite.lib.FileElement
                      extended by mesquite.lib.characters.CharacterModel
                          extended by mesquite.lib.characters.CharacterSubmodel
                              extended by mesquite.genesis.lib.ProbSubModel
                                  extended by mesquite.genesis.lib.CharRatesModel
                                      extended by mesquite.genesis.lib.CharRatesGamma
All Implemented Interfaces:
Annotatable, Commandable, CompatibilityChecker, Doomable, Explainable, FileDirtier, HNode, HTMLDescribable, Identifiable, Listable, Listenable, MesquiteListener, Renamable, Selectionable, Showable

public class CharRatesGamma
extends CharRatesModel

A class that provides for a site-to-site rate variation model using the gamma distribution.


Field Summary
 
Fields inherited from class mesquite.lib.characters.CharacterModel
MesquiteNEXUSFormat, NEXUSFormat, XMLFormat
 
Fields inherited from class mesquite.lib.FileElement
assignedIDNumber, assignedIDString, classesCreated, classesFinalized, countsOfClasses, countsOfClassesDisposed, DIRTY, doomed, IN_USE, OK, totalCreated, totalDisposed, totalFinalized
 
Fields inherited from class mesquite.lib.AssociableWithSpecs
SPECSSET_CHANGED
 
Fields inherited from class mesquite.lib.Associable
comment, comments, numParts, rememberDefaultOrder, selected, versionNumber
 
Fields inherited from class mesquite.lib.Listened
allListeners, classes, classesNotified, listenersRemaining, notifications
 
Fields inherited from interface mesquite.lib.MesquiteListener
ANNOTATION_ADDED, ANNOTATION_CHANGED, ANNOTATION_DELETED, ASSOCIATED_CHANGED, BRANCHES_REARRANGED, BRANCHLENGTHS_CHANGED, COMMAND_CANCELLED, DATA_CHANGED, ELEMENT_CHANGED, ITEMS_ADDED, NAMES_CHANGED, OBJECT_DESTROYED, PARTS_ADDED, PARTS_CHANGED, PARTS_DELETED, PARTS_MOVED, SELECTION_CHANGED, TAXA_SUBSTITUTED, TEXTFIELD_EDITED, UNKNOWN, VALUE_CHANGED
 
Fields inherited from interface mesquite.lib.HNode
MOUSEDOWN, MOUSEEXIT, MOUSEMOVE
 
Fields inherited from interface mesquite.lib.HTMLDescribable
verbose
 
Constructor Summary
CharRatesGamma()
           
CharRatesGamma(double shape, boolean isDiscrete, int numCategories)
           
 
Method Summary
 void addOptions(ExtensibleDialog dialog)
          adds items to extensible dialog box used for setting parameter values
 void calculateDiscreteRates()
           
 boolean checkOptions()
           
 java.lang.String checkOptionsReport()
           
 CharacterModel cloneModelWithMotherLink(CharacterModel formerClone)
           
 void copyToClone(CharacterModel pm)
           
 void fromString(java.lang.String description, MesquiteInteger stringPos, int format)
          reads parameters from string (same format as written by "toString")
 java.lang.String getNEXUSClassName()
          returns name of model class (e.g.
 java.lang.String getNexusSpecification()
          returns specifications
 java.lang.String getParameters()
          returns parameters of the model.
 double getShape()
           
 void initForNextCharacter()
           
 boolean isFullySpecified()
          Returns whether parameters of model are fully specified.
 double meanRate(double lowerBoundary, double upperBoundary, double increment)
          Calculates mean value for a section of a gamma distribution.
 boolean recoverOptions()
          recovers values from items in extensible dialog box used for setting parameter values
 void setOptions()
          moves parameter values from temporary storage (where they were put from dialog box) into permanent storage.
 void setSeed(long seed)
           
 void setShape(double shape)
           
 
Methods inherited from class mesquite.genesis.lib.CharRatesModel
checkValidityCharRates, getCapitalizedTypeName, getExplanation, getModelTypeName, getParadigm, getRate, getRate, initialize, setRate, taxaSet
 
Methods inherited from class mesquite.genesis.lib.ProbSubModel
addModelOptions, getCharacterDistribution, getDefaultNumChars, getMCharactersStatesHolder, isLineageSpecific, needsEmpirical, recalcAfterSetMCharactersStatesHolder, recoverModelOptions, setCharacterDistribution, setCompositProbCategModel, setDefaultNumChars, setMCharactersStatesHolder, toString
 
Methods inherited from class mesquite.lib.characters.CharacterModel
allowUseOnDataSubclasses, changed, chooseExistingCharacterModel, chooseExistingCharacterModel, chooseNewCharacterModel, completeDaughterClone, dispose, disposing, findCurators, getEditCancel, getMother, getName, getNEXUSCommand, getNEXUSName, getSettingsString, getSnapshot, getStateClass, getStateClassName, getTypeName, isBuiltIn, isCompatible, isDisposed, isReversible, okToDispose, originalChanged, setBuiltIn, setEditCancel, setName
 
Methods inherited from class mesquite.lib.FileElement
addToBrowserPopup, addToFile, deleteMe, doCommand, doom, fileDirtiedByCommand, finalize, getAssignedID, getAssignedIDNumber, getCIPResIDString, getFile, getFileName, getHColor, getHDaughters, getHImage, getHMother, getHShow, getID, getLastModifiedAuthor, getManager, getNexusBlock, getNumSupplements, getProject, getSupplementName, hNodeAction, hSupplementTouched, isDoomed, okToClose, searchData, setAssignedIDNumber, setCIPResIDString, setFile, setManager, setProject, show, showMe, stampLastModifiedAuthor
 
Methods inherited from class mesquite.lib.AssociableWithSpecs
addParts, deleteParts, equalizeParts, getCurrentSpecsSet, getNumSpecsSets, getSpecSetsVector, getSpecSetsVectorVector, getSpecsSet, getSpecsSet, listAssociates, moveParts, prepareSpecsSetVector, removeSpecsSet, setCurrentSpecsSet, storeSpecsSet, swapParts, toHTMLStringDescription
 
Methods inherited from class mesquite.lib.Associable
anyAssociatedObject, anySelected, clearAllAssociatedBits, contiguousSelection, contiguousSelectionOld, copyCurrentToPreviousOrder, deassignAllAssociatedLongs, deassignAssociated, deassignAssociated, deleteJustAdded, deselectAll, equalizeParts, exchangeAssociated, firstSelected, getAnnotation, getAnnotation, getAssociatedBit, getAssociatedBits, getAssociatedDouble, getAssociatedDoubles, getAssociatedLong, getAssociatedLongs, getAssociatedObject, getAssociatedObjects, getDefaultPosition, getDirty, getJustAdded, getNumberAssociatedBits, getNumberAssociatedDoubles, getNumberAssociatedLongs, getNumberAssociatedObjects, getNumberOfParts, getNumberOfSelectableParts, getSelected, getSelectedBits, getVersionNumber, getWhichAssociatedBits, getWhichAssociatedDouble, getWhichAssociatedLong, getWhichAssociatedObject, inBounds, lastSelected, makeAssociatedBits, makeAssociatedDoubles, makeAssociatedLongs, makeAssociatedObjects, numberSelected, numberSelected, readAssociated, recordCurrentOrder, recordDefaultOrder, recordPreviousOrder, removeAssociatedBits, removeAssociatedDoubles, removeAssociatedLongs, removeAssociatedObjects, resetDefaultOrderToCurrent, resetJustAdded, restoreToPreviousOrder, selectAll, setAnnotation, setAnnotation, setAssociatedBit, setAssociatedDouble, setAssociatedLong, setAssociatedObject, setAssociateds, setDefaultPosition, setDirty, setJustAdded, setNumberOfParts, setSelected, transferAssociated, writeAssociated, zeroAllAssociatedDoubles, zeroAllAssociatedLongs, zeroAllAssociatedObjects
 
Methods inherited from class mesquite.lib.Attachable
anyAttachments, attach, attachIfUniqueName, detach, getAttachment, getAttachment, getAttachments, listAttachments, readAttachments, setAttachments, writeAttachments
 
Methods inherited from class mesquite.lib.Listened
addListener, addListenerHighPriority, amIListening, decrementNotifySuppress, doAfterNotify, getRemainingListeners, incrementNotifySuppress, listListeners, notifyDisposing, notifyListeners, notifyListeners, removeListener, reportListeners, setDumpNotified
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mesquite.lib.Annotatable
getAnnotation, setAnnotation
 
Methods inherited from interface mesquite.lib.Listenable
addListener, addListenerHighPriority, amIListening, decrementNotifySuppress, incrementNotifySuppress, listListeners, notifyListeners, removeListener
 

Constructor Detail

CharRatesGamma

public CharRatesGamma(double shape,
                      boolean isDiscrete,
                      int numCategories)

CharRatesGamma

public CharRatesGamma()
Method Detail

cloneModelWithMotherLink

public CharacterModel cloneModelWithMotherLink(CharacterModel formerClone)
Specified by:
cloneModelWithMotherLink in class ProbSubModel

copyToClone

public void copyToClone(CharacterModel pm)
Overrides:
copyToClone in class CharacterModel

getNexusSpecification

public java.lang.String getNexusSpecification()
returns specifications

Overrides:
getNexusSpecification in class CharacterModel

setSeed

public void setSeed(long seed)
Overrides:
setSeed in class ProbSubModel

fromString

public void fromString(java.lang.String description,
                       MesquiteInteger stringPos,
                       int format)
reads parameters from string (same format as written by "toString")

Overrides:
fromString in class CharacterModel

getNEXUSClassName

public java.lang.String getNEXUSClassName()
returns name of model class (e.g. "stepmatrix")

Overrides:
getNEXUSClassName in class CharacterModel

addOptions

public void addOptions(ExtensibleDialog dialog)
adds items to extensible dialog box used for setting parameter values

Specified by:
addOptions in class ProbSubModel

recoverOptions

public boolean recoverOptions()
recovers values from items in extensible dialog box used for setting parameter values

Specified by:
recoverOptions in class ProbSubModel

checkOptions

public boolean checkOptions()
Specified by:
checkOptions in class ProbSubModel

checkOptionsReport

public java.lang.String checkOptionsReport()
Specified by:
checkOptionsReport in class ProbSubModel

setOptions

public void setOptions()
moves parameter values from temporary storage (where they were put from dialog box) into permanent storage.

Specified by:
setOptions in class ProbSubModel

isFullySpecified

public boolean isFullySpecified()
Description copied from class: ProbSubModel
Returns whether parameters of model are fully specified. If so, it can be used for evolving states.

Specified by:
isFullySpecified in class ProbSubModel

meanRate

public double meanRate(double lowerBoundary,
                       double upperBoundary,
                       double increment)
Calculates mean value for a section of a gamma distribution.


calculateDiscreteRates

public void calculateDiscreteRates()

setShape

public void setShape(double shape)

getShape

public double getShape()

initForNextCharacter

public void initForNextCharacter()
Specified by:
initForNextCharacter in class CharRatesModel

getParameters

public java.lang.String getParameters()
returns parameters of the model.

Overrides:
getParameters in class CharRatesModel