bool CUserQueryUpdate::VectorIsEqual(std::vector<std::string> srcVector,std::vector<std::string> destVector) 
{
	std::vector<std::string>::iterator itrSrcVec;
	std::vector<std::string>::iterator itrDestVec;
	std::vector<std::string>::iterator itr2;

	if( srcVector.size() != srcVector.size())
	{
		return false;
	}
	for(itrSrcVec=srcVector.begin();itrSrcVec!=srcVector.end();itrSrcVec++)
	{
		itrDestVec = destVector.find(*itrSrcVec);
		if(itrDestVec !=itrDestVec.end())
		{
			continue;
		}
		else
		{
			return false;
		}

	}
	
return true;
}
Example #2
0
			std::vector<CountT> GetCounts(const std::vector<std::basic_string<CharT>> & grams) const
			{
				std::map<std::basic_string<CharT>, CountT>::iterator gramIter;
				std::vector<CountT> counts;
				counts.reserve(grams.size());
				for (std::vector<std::basic_string<CharT>>::const_iterator iter = grams.begin(); iter != grams.end(); ++iter)
				{
					gramIter = grams.find(*iter);
					if (iter == grams.end()) counts.push_back(0);
					else counts.push_back(iter->second);
				}
				return counts;
			}
Example #3
0
		bool InSet( c el )
		{
			return members.find( el ) != members.end();
		}