本文整理汇总了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;
}