示例#1
0
文件: area.c 项目: brayc0/nlfetdb
static Area
getUnionArea(Area a, Area b)
{ Area c;

  c = answerObject(ClassArea, a->x, a->y, a->w, a->h, EAV);
  unionArea(c, b);
  answer(c);
}
示例#2
0
void multiQuery::unionArea(int v, int e, int threshold, vector<string> &vr)
{
	int lx, rx, ly, ry;
	unionArea(v, e, lx, rx, ly, ry, threshold);

	for (int i = lx; i <= rx; i++)
	{
		for (int j = ly; j <= ry; j++)
		{
			string path = common::inToString(prefix, i, j);
			vr.push_back(path);
		}
	}
}
示例#3
0
void multiQuery::queryGraph(graph g, __int64 &io, int threshold, vector<int> &vr)
{
	vr.clear();
	vector<string> queryArea;
	unionArea(g.v, g.e, threshold, queryArea);

	map<string, int> ::iterator iter;
	for (int i = 0; i < queryArea.size(); i++)
	{
		iter = fp.find(queryArea[i]);
		if (iter != fp.end())
		{
#ifdef WIN32
			assert(_access(queryArea[i].c_str(), 0) != -1);
#else
			assert(access(queryArea[i].c_str(), F_OK | R_OK) != -1);
#endif
			singleQuery *sg = new singleQuery(queryArea[i], hp, iter->second);
			sg->queryGraph(g, io, threshold, vr);
			if (sg) delete sg;
		}
	}
}