本文整理汇总了C++中CellPtr::GetMutationState方法的典型用法代码示例。如果您正苦于以下问题:C++ CellPtr::GetMutationState方法的具体用法?C++ CellPtr::GetMutationState怎么用?C++ CellPtr::GetMutationState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CellPtr
的用法示例。
在下文中一共展示了CellPtr::GetMutationState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
double CellMutationStatesWriter<ELEMENT_DIM, SPACE_DIM>::GetCellDataForVtkOutput(CellPtr pCell, AbstractCellPopulation<ELEMENT_DIM, SPACE_DIM>* pCellPopulation)
{
double mutation_state = pCell->GetMutationState()->GetColour();
CellPropertyCollection collection = pCell->rGetCellPropertyCollection();
CellPropertyCollection label_collection = collection.GetProperties<CellLabel>();
if (label_collection.GetSize() == 1)
{
boost::shared_ptr<CellLabel> p_label = boost::static_pointer_cast<CellLabel>(label_collection.GetProperty());
mutation_state = p_label->GetColour();
}
return mutation_state;
}
示例2:
void CellMutationStatesWriter<ELEMENT_DIM, SPACE_DIM>::VisitCell(CellPtr pCell, AbstractCellPopulation<ELEMENT_DIM, SPACE_DIM>* pCellPopulation)
{
double mutation_state = pCell->GetMutationState()->GetColour();
CellPropertyCollection collection = pCell->rGetCellPropertyCollection();
CellPropertyCollection label_collection = collection.GetProperties<CellLabel>();
if (label_collection.GetSize() == 1)
{
boost::shared_ptr<CellLabel> p_label = boost::static_pointer_cast<CellLabel>(label_collection.GetProperty());
mutation_state = p_label->GetColour();
}
*this->mpOutStream << mutation_state << " ";
}