本文整理匯總了Java中mesquite.categ.lib.MolecularState類的典型用法代碼示例。如果您正苦於以下問題:Java MolecularState類的具體用法?Java MolecularState怎麽用?Java MolecularState使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MolecularState類屬於mesquite.categ.lib包,在下文中一共展示了MolecularState類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: sequenceLength
import mesquite.categ.lib.MolecularState; //導入依賴的package包/類
int sequenceLength(int it){
CharacterState cs = null;
if (observedStates == null)
return 0;
int count = 0;
for (int ic=0; ic<observedStates.getNumChars(); ic++) {
cs = observedStates.getCharacterState(cs, ic, it);
if (cs == null)
return 0;
if (cs instanceof MolecularState){
if (!cs.isInapplicable()) //if Molecular, then count missing & with state
count++;
}
else
if (!cs.isInapplicable() && !cs.isUnassigned()) //if Molecular, then count missing & with state
count++;
}
return count;
}
示例2: canExportProject
import mesquite.categ.lib.MolecularState; //導入依賴的package包/類
public boolean canExportProject(MesquiteProject project) {
return (project.getNumberCharMatrices( CategoricalState.class) - project.getNumberCharMatrices( MolecularState.class) > 0) ;
}
示例3: startJob
import mesquite.categ.lib.MolecularState; //導入依賴的package包/類
public boolean startJob(String arguments, Object condition, boolean hiredByName) {
matrixSourceTask = (MatrixSourceCoord)hireCompatibleEmployee(MatrixSourceCoord.class, MolecularState.class, "Source of character matrix (for " + getName() + ")");
if (matrixSourceTask==null)
return sorry(getName() + " couldn't start because no source of character matrices was obtained.");
return true;
}
示例4: sequenceLength
import mesquite.categ.lib.MolecularState; //導入依賴的package包/類
int sequenceLength(int it){
CharacterState cs = null;
if (observedStates == null)
return 0;
int count = 0;
for (int ic=0; ic<observedStates.getNumChars(); ic++) {
cs = observedStates.getCharacterState(cs, ic, it);
if (cs == null)
return 0;
if (cs instanceof MolecularState){
if (!cs.isInapplicable()) //if Molecular, then count missing & with state
count++;
}
else
if (!cs.isInapplicable() && !cs.isUnassigned()) //if Molecular, then count missing & with state
count++;
}
return count;
}