本文整理汇总了C++中NodeMap::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeMap::clear方法的具体用法?C++ NodeMap::clear怎么用?C++ NodeMap::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeMap
的用法示例。
在下文中一共展示了NodeMap::clear方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prepForTree
static void prepForTree() {
#ifndef VL_LEAK_CHECKS
s_nodes.clear();
#endif
for (NodeMap::iterator it = s_nodes.begin(); it != s_nodes.end(); ++it) {
it->second &= ~FLAG_IN_TREE;
it->second &= ~FLAG_LINKABLE;
}
}
示例2: delete
// recursively delete the stmts and subtrees
~TreeNode()
{
for (StmtMap::iterator sit = stmtMap.begin(); sit != stmtMap.end(); ++sit) {
delete sit->second;
}
stmtMap.clear();
for (LoopList::iterator lit = loopList.begin(); lit != loopList.end(); ++lit) {
delete (*lit)->node;
}
loopList.clear();
for (NodeMap::iterator nit = nodeMap.begin(); nit != nodeMap.end(); ++nit) {
delete nit->second;
}
nodeMap.clear();
}
示例3: clear
void clear() {
updates.clear();
nodeMap.clear();
}
示例4: TreeNode
TreeNode()
{
nodeMap.clear();
stmtMap.clear();
loopList.clear();
}
示例5: outfile
//.........这里部分代码省略.........
{
std::cout << "Node not found in node map" << std::endl;
std::cout << *((*it).n[j]) << std::endl;
}
else
{
connData[cnt++] = noit->second+1;
}
}
}
} else {
cnt = 1;
for (int i=0; i<nElts; ++i) {
for (int j=0; j<MYLEN; ++j) {
connData[i*MYLEN+j] = cnt++;
}
}
}
std::cerr << "Final elements built" << endl;
// Invert the map
std::vector<Node> nodeVect(nodeMap.size());
for (NodeMap::const_iterator it=nodeMap.begin(); it!=nodeMap.end(); ++it)
{
if (it->second>=nodeVect.size() || it->second<0)
std::cout << "Bad id: " << it->second << " bad node: " << it->first << std::endl;
BL_ASSERT(it->second>=0);
BL_ASSERT(it->second<nodeVect.size());
nodeVect[it->second] = (*it).first;
}
std::cerr << "Final nodeVect built (" << nodeVect.size() << " nodes)" << endl;
nodeMap.clear();
elements.clear();
nodes.clear();
std::cerr << "Temp nodes, elements cleared" << endl;
PArray<MultiFab> fileData(Nlev);
int ng = nGrowPer;
for (int lev=0; lev<Nlev; ++lev)
{
if (lev!=0)
ng *= amrData.RefRatio()[lev-1];
const BoxArray& ba = gridArray[lev];
fileData.set(lev,new MultiFab(ba,comps.size(),0));
fileData[lev].setVal(1.e30);
std::cerr << "My data set alloc'd at lev=" << lev << endl;
MultiFab pData, pDataNG;
if (ng>0 && geom[lev].isAnyPeriodic())
{
const Box& pd = amrData.ProbDomain()[lev];
//const BoxArray& vba = amrData.boxArray(lev);
Box shrunkenDomain = pd;
for (int i=0; i<BL_SPACEDIM; ++i)
if (geom[lev].isPeriodic(i))
shrunkenDomain.grow(i,-ng);
const BoxArray edgeVBoxes = BoxLib::boxComplement(pd,shrunkenDomain);
pData.define(edgeVBoxes,1,ng,Fab_allocate);
pDataNG.define(BoxArray(edgeVBoxes).grow(ng),1,0,Fab_allocate);
}
for (int i=0; i<comps.size(); ++i)