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