inline void
CertificateCacheTtl::remove(const Name& certificateName)
{
  Name name = certificateName.getPrefix(-1);
  Cache::iterator it = m_cache.find(name);
  if (it != m_cache.end())
    m_cache.erase(it);
}
Exemplo n.º 2
0
Arquivo: main.cpp Projeto: radi9/svm
vector<double> get_Q(int i)
{
	for(vector<double> rows : tempQ)
	{
		if(rows[0] == i)
		{
			rows.erase(rows.begin());
			return rows;
		}
	}


	vector<double> column;
	column.push_back(i);//id
	if(tempQ.size() < 1000)
	{
		for(int j = 0; j < train_num; j++)
		{
			double temp;
			temp = kernel(trainData[j], trainData[i]);
			column.push_back(temp);
		}
		tempQ.push_back(column);
	}
	else
	{
		tempQ.erase(tempQ.begin());
		for(int j = 0; j < train_num; j++)
		{
			double temp;
			temp = kernel(trainData[j], trainData[i]);
			column.push_back(temp);
		}
		tempQ.push_back(column);
	}

	column.erase(column.begin());
	return column;
}