本文整理汇总了C++中Sequence::find方法的典型用法代码示例。如果您正苦于以下问题:C++ Sequence::find方法的具体用法?C++ Sequence::find怎么用?C++ Sequence::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sequence
的用法示例。
在下文中一共展示了Sequence::find方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(void) {
ios::sync_with_stdio(false);
string s;
int t;
while (cin >> s >> t, s != "0") {
State begin = s.begin();
Sequence *tree = expr(begin);
cout << tree->find(t) << endl;
delete tree;
}
return 0;
}
示例2: selectPoints
void Sculptor::selectPoints(const Ray * incident)
{
m_active->reset();
m_active->incidentRay = *incident;
Sequence<Coord3> added;
BoundingBox touchedBox;
if(!m_march.begin(*incident)) return;
while(!m_march.end()) {
const std::deque<Vector3F> coords = m_march.touched(selectRadius(), touchedBox);
std::deque<Vector3F>::const_iterator it = coords.begin();
for(; it != coords.end(); ++it) {
const Coord3 c = m_tree->gridCoord((const float *)&(*it));
/// already tested
if(added.find(c)) continue;
added.insert(c);
Pair<Entity *, Entity> sr = m_tree->findEntity(c);
if(sr.index) {
Array<int, VertexP> * pl = static_cast<Array<int, VertexP> * >(sr.index);
intersect(pl, *incident);
}
}
float tmin, tmax;
touchedBox.intersect(*incident, &tmin, &tmax);
/// std::cout<<" tmin "<<tmin<<" "<<m_active->meanDepth();
if((tmin - m_active->minDepth() ) > selectRadius() ) {
break;
}
m_march.step();
}
m_active->finish();
}