本文整理汇总了C++中Segments::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Segments::end方法的具体用法?C++ Segments::end怎么用?C++ Segments::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Segments
的用法示例。
在下文中一共展示了Segments::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: popFrame
Segments ReceiveBuffer::popFrame()
{
Segments frame;
for( SourceBufferMap::iterator it = _sourceBuffers.begin();
it != _sourceBuffers.end(); ++it )
{
SourceBuffer& buffer = it->second;
frame.insert( frame.end(), buffer.segments.front().begin(),
buffer.segments.front().end( ));
buffer.pop();
}
++_lastFrameComplete;
return frame;
}
示例2: main
int main(int argc, const char* argv[])
{
/*
* Build 48 Index with Links
*/
// Load Circuit
Experiment experiment;
experiment.open(blue_config_filename);
Microcircuit & microcircuit = experiment.microcircuit();
const Targets & targets = experiment.targets();
const Cell_Target target = targets.cell_target("Column");
microcircuit.load(target, NEURONS | MORPHOLOGIES);
//Make Neuron Rtrees
ISpatialIndex *neuronTrees[MORPHOLOGIES_COUNT];
string *morphologyLabels[MORPHOLOGIES_COUNT];
int cm=0;
Morphologies & myMorphologies = microcircuit.morphologies();
Morphologies::iterator myMorphologiesEnd = myMorphologies.end();
for (Morphologies::iterator i = myMorphologies.begin(); i != myMorphologiesEnd; ++i)
{
morphologyLabels[cm] = i->label();
neuronTrees[cm] = RTree::createNewRTree (createNewMemoryStorageManager(), 0.7, 127, 127, 3,RTree::RV_RSTAR,indexIdentifier);
cm++;
}
Neurons & myNeurons = microcircuit.neurons();
Neurons::iterator myNeuronsEnd = myNeurons.end();
for (Neurons::iterator i = myNeurons.begin(); i != myNeuronsEnd; ++i)
{
cm=0;
for (cm=0;cm<MORPHOLOGIES_COUNT;cm++)
if (strcmp(i->morphology().label(),morphologyLabels[cm])==0) break;
Transform_3D<Micron> trafo = i->global_transform();
Sections mySections = i->morphology().all_sections();
Sections::iterator mySectionsEnd = mySections.end();
for (Sections::iterator s = mySections.begin(); s != mySectionsEnd; ++s)
{
Segments segments = s->segments();
Segments::const_iterator segments_end = segments.end();
for (Segments::const_iterator j = segments.begin(); j != segments_end ; ++j)
{
vect plow, phigh;
get_segment_mbr (*j, trafo, &plow, &phigh);
SpatialIndex::Region mbr = SpatialIndex::Region(plow.data(),phigh.data(),3);
std::stringstream strStream;
strStream << i->gid() <<"-"<< s->id()<< "-" << j->id();
neuronTrees[cm]->insertData (strStream.str().length(), (byte*)(strStream.str().c_str()), mbr, segmentid);
}
}
}
// Make Morphology Rtrees
Morphologies & myMorphologies = microcircuit.morphologies();
Morphologies::iterator myMorphologiesEnd = myMorphologies.end();
for (Morphologies::iterator i = myMorphologies.begin(); i != myMorphologiesEnd; ++i)
{
cout << "Indexing Morphology: " << i->label();
string baseName = i->label();
IStorageManager* diskfile = StorageManager::createNewDiskStorageManager(baseName, 4096);
ISpatialIndex *tree = RTree::createNewRTree (*diskfile, 0.7, 127, 127, 3,RTree::RV_RSTAR,indexIdentifier);
indexIdentifier++; segmentid=0;
Sections mySections = i->all_sections();
Sections::iterator mySectionsEnd = mySections.end();
for (Sections::iterator s = mySections.begin(); s != mySectionsEnd; ++s)
{
Segments segments = s->segments();
Segments::const_iterator segments_end = segments.end();
for (Segments::const_iterator j = segments.begin(); j != segments_end ; ++j)
{
Box<bbp::Micron> Mbr = AABBCylinder::calculateAABBForCylinder(j->begin().center(),
j->begin().radius(),j->end().center(),j->begin().radius());
vect plow, phigh;
plow[0] = Mbr.center().x() - Mbr.dimensions().x() / 2;
phigh[0] = Mbr.center().x() + Mbr.dimensions().x() / 2;
plow[1] = Mbr.center().y() - Mbr.dimensions().y() / 2;
phigh[1] = Mbr.center().y() + Mbr.dimensions().y() / 2;
plow[2] = Mbr.center().z() - Mbr.dimensions().z() / 2;
phigh[2] = Mbr.center().z() + Mbr.dimensions().z() / 2;
SpatialIndex::Region mbr = SpatialIndex::Region(plow.data(),phigh.data(),3);
std::stringstream strStream;
strStream << s->id()<< "-" << j->id();
tree->insertData (strStream.str().length(), (byte*)(strStream.str().c_str()), mbr, segmentid);
segmentid++;
}
}
cout << ".. Total Segments: " << segmentid << "\n";
tree->~ISpatialIndex();
//.........这里部分代码省略.........
示例3: apply
void apply( ScannerPtr scanner )
{
for ( Segments::const_iterator pos = segments.begin(); pos != segments.end(); ++pos )
(*pos)->apply( scanner );
}
示例4: reset
void reset()
{
for ( Segments::const_iterator pos = segments.begin(); pos != segments.end(); ++pos )
(*pos)->reset();
}