コード例 #1
0
ファイル: CData.cpp プロジェクト: Mageric0412/Myspace
bool CData::AddData(vector<double> &data, vector<double> New)
{
	//check that the size is correct
	

	//add the name
	m_Vecout.push_back(New);

	//add the data
	m_vecPatterns.push_back(data);

	//keep a track of number of patterns
	++m_iNumPatterns;

	//create the new training set
	CreateTrainingSetFromData();

	return true; 
}
コード例 #2
0
ファイル: CData.cpp プロジェクト: per4u3e/Snap
//------------------------- AddData -------------------------------------
//
//  adds a new pattern to data
//-----------------------------------------------------------------------
bool CData::AddData(vector<double> &data, string NewName)
{
    //check that the size is correct
    if (data.size() != m_iVectorSize*2)
    {
        MessageBox(NULL, "Incorrect Data Size", "Error", MB_OK);

        return false;
    }

    //add the name
    m_vecNames.push_back(NewName);

    //add the data
    m_vecPatterns.push_back(data);

    //keep a track of number of patterns
    ++m_iNumPatterns;

    //create the new training set
    CreateTrainingSetFromData();

    return true;
}