float NonTermContextProperty::ProbStore::GetProb(size_t contextInd,
			const Factor *factor,
			float smoothConstant) const
{
  float count = GetCount(contextInd, factor, smoothConstant);
  float total = GetTotalCount(contextInd, smoothConstant);
  float ret = count / total;
  return ret;
}
Example #2
0
User* OnlineUser::NewUser(ID_t userID )
{
	User* user = new User( userID );
	if(!user)
		return NULL;
	
	mUserMap.insert(std::make_pair(userID,user));

	m_UserCount++;

	g_pLog->log_debug("%u,%u,NewUser ... OK",userID,0);

	g_pLog->log_debug("%u,%u,OnlineUserCount ... %d",userID,0,GetTotalCount());

	return user;
}