当前位置: 首页>>代码示例>>C++>>正文


C++ typenameAbstractCellPopulation::Kill方法代码示例

本文整理汇总了C++中typenameAbstractCellPopulation::Kill方法的典型用法代码示例。如果您正苦于以下问题:C++ typenameAbstractCellPopulation::Kill方法的具体用法?C++ typenameAbstractCellPopulation::Kill怎么用?C++ typenameAbstractCellPopulation::Kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在typenameAbstractCellPopulation的用法示例。


在下文中一共展示了typenameAbstractCellPopulation::Kill方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: switch

void SloughingCellKiller<DIM>::CheckAndLabelCellsForApoptosisOrDeath()
{
    switch (DIM)
    {
        case 1:
        {
            for (typename AbstractCellPopulation<DIM>::Iterator cell_iter = this->mpCellPopulation->Begin();
                 cell_iter != this->mpCellPopulation->End();
                 ++cell_iter)
            {
                double x = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter)[0];

                if (x > mSloughHeight)
                {
                    cell_iter->Kill();
                }
            }
            break;
        }
        case 2:
        {
            for (typename AbstractCellPopulation<DIM>::Iterator cell_iter = this->mpCellPopulation->Begin();
                 cell_iter != this->mpCellPopulation->End();
                 ++cell_iter)
            {
                c_vector<double, 2> location;
                location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);
                double x = location[0];
                double y = location[1];

                if ((y>mSloughHeight) || (mSloughSides && ((x<0.0) || (x>mSloughWidth))))
                {
                    cell_iter->Kill();
                }
            }
            break;
        }
        case 3:
        {
            EXCEPTION("SloughingCellKiller is not yet implemented in 3D");
            break;
        }
        default:
            // This can't happen
            NEVER_REACHED;
    }
}
开发者ID:Chaste,项目名称:Chaste,代码行数:47,代码来源:SloughingCellKiller.cpp

示例2:

void PlaneBasedCellKiller<DIM>::CheckAndLabelCellsForApoptosisOrDeath()
{
    for (typename AbstractCellPopulation<DIM>::Iterator cell_iter = this->mpCellPopulation->Begin();
         cell_iter != this->mpCellPopulation->End();
         ++cell_iter)
    {
        c_vector<double, DIM> cell_location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);

        if (inner_prod(cell_location - mPointOnPlane, mNormalToPlane) > 0.0)
        {
            cell_iter->Kill();
        }
    }
}
开发者ID:getshameer,项目名称:Chaste,代码行数:14,代码来源:PlaneBasedCellKiller.cpp

示例3:

void TimedPlaneBasedCellKiller<DIM>::CheckAndLabelCellsForApoptosisOrDeath()
{
    for (typename AbstractCellPopulation<DIM>::Iterator cell_iter = this->mpCellPopulation->Begin();
         cell_iter != this->mpCellPopulation->End();
         ++cell_iter)
    {
        c_vector<double, DIM> cell_location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);

        if (inner_prod(cell_location - mPointOnPlane, mNormalToPlane) > 0.0 && SimulationTime::Instance()->GetTime()>=mStartTime)
        {
        	 OUTPUT<<SimulationTime::Instance()->GetTime()<<"	"<<(*cell_iter)->GetCellId()<<std::endl;
            cell_iter->Kill();
        }
    }
}
开发者ID:KathrynA,项目名称:ChasteElegansProject,代码行数:15,代码来源:TimedPlaneBasedCellKiller.cpp

示例4:

void IsolatedLabelledCellKiller<DIM>::CheckAndLabelCellsForApoptosisOrDeath()
{
    MutableVertexMesh<DIM, DIM>& vertex_mesh = static_cast<VertexBasedCellPopulation<DIM>*>(this->mpCellPopulation)->rGetMesh();

    unsigned num_labelled_cells = this->mpCellPopulation->GetCellPropertyRegistry()->template Get<CellLabel>()->GetCellCount();

    // If there is more than one labelled cell...
    if (num_labelled_cells > 1)
    {
        // Iterate over cell population
        for (typename AbstractCellPopulation<DIM>::Iterator cell_iter = this->mpCellPopulation->Begin();
             cell_iter != this->mpCellPopulation->End();
             ++cell_iter)
        {
            // Only consider cells with the CellLabel property
            if (cell_iter->template HasCellProperty<CellLabel>())
            {
                // Get the element index corresponding to this cell
                unsigned elem_index = this->mpCellPopulation->GetLocationIndexUsingCell(*cell_iter);

                // Get the set of neighbouring element indices
                std::set<unsigned> neighbouring_elem_indices = vertex_mesh.GetNeighbouringElementIndices(elem_index);

                // Check if any of the corresponding cells have the CellLabel property...
                unsigned num_labelled_neighbours = 0;
                for (std::set<unsigned>::iterator elem_iter = neighbouring_elem_indices.begin();
                     elem_iter != neighbouring_elem_indices.end();
                     ++elem_iter)
                {
                    if (this->mpCellPopulation->GetCellUsingLocationIndex(*elem_iter)->template HasCellProperty<CellLabel>())
                    {
                        num_labelled_neighbours++;
                    }
                }

                // ...and if none do, then kill this cell
                if (num_labelled_neighbours == 0)
                {
                    cell_iter->Kill();
                }
            }
        }
    }
}
开发者ID:Chaste,项目名称:Old-Chaste-svn-mirror,代码行数:44,代码来源:IsolatedLabelledCellKiller.cpp


注:本文中的typenameAbstractCellPopulation::Kill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。