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; }
//------------------------- 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; }