coins/TwelveCoins.cpp
/**
 * @brief: Loads the input file into a vector of type int vector. Each line in the file contains 
 *           12 numbers. Each represents a weight of the coins being weighed against each other.
 *           The inner vector contains all 12 int values. The outer vector contains these 12 int
 *           values for each line in the input file.
 *           Example of a line from inputFile: "10 10 2 10 10 10 10 10 10 10 10 10" 
 * 
 * @return:A vector of int vectors, where each value is an int for each weight of the 12 coins in
 *           each line of the input file.
 */
@brief: Loads the input file into a vector of type int vector. Each line in the file contains
12 numbers. Each represents a weight of the coins being weighed against each other.
The inner vector contains all 12 int values. The outer vector contains these 12 int
values for each line in the input file.

@return:A vector of int vectors, where each value is an int for each weight of the 12 coins in
each line of the input file.
@brief : Loads the input file into a vector of type int vector . Each line in the file contains 12 numbers . Each represents a weight of the coins being weighed against each other . The inner vector contains all 12 int values . The outer vector contains these 12 int values for each line in the input file . @return : A vector of int vectors where each value is an int for each weight of the 12 coins in each line of the input file .
std::vector<std::vector<int>> TwelveCoins::initInput()
{
    std::vector<std::vector<int>> inpVect;
    std::ifstream inpFile(COINSINPUTFILE);
    std::string inpLine;
    while (std::getline(inpFile, inpLine)) {
        if (inpLine[0] == '#') continue;
        if (inpLine[0] == '\n') continue;
        std::stringstream strStream(inpLine);
        std::string temp; 
        std::vector<int> twelveweights; 
        while (!strStream.eof()) { 
            int val = -1;
            strStream >> val;
            if (val != -1)
                twelveweights.push_back(val);
        }
        inpVect.push_back(twelveweights);
    }
    return inpVect;
}
std :: vector < std :: vector < int > > TwelveCoins :: initInput ( ) { std :: vector < std :: vector < int > > inpVect ; std :: ifstream inpFile ( COINSINPUTFILE ) ; std :: string inpLine ; while ( std :: getline ( inpFile , inpLine ) ) { if ( inpLine [ 0 ] == ' ' ) continue ; if ( inpLine [ 0 ] == ' \n ' ) continue ; std :: stringstream strStream ( inpLine ) ; std :: string temp ; std :: vector < int > twelveweights ; while ( ! strStream . eof ( ) ) { int val = -1 ; strStream >> val ; if ( val != -1 ) twelveweights . push_back ( val ) ; } inpVect . push_back ( twelveweights ) ; } return inpVect ; }
@brief: Loads the input file into a vector of type int vector.
@brief : Loads the input file into a vector of type int vector .
// Load Input Values