I am trying to adapt a digital electronics problem to a C++ STL based program.
Originally I have 4 inputs C1, C2, C3, C4. This means I have a total of 16 combinations:
0000
0001
.
.
.
1111
I have a multimap defined by
typedef std::pair<int, int> au_pair; //vertices
typedef std::pair<int, int> acq_pair; //ch qlty
typedef std::multimap<int, acq_pair> au_map;
typedef au_map::iterator It_au;
The no. of simulations depend on the size of the au_map.
For eg: if the au_map.size() = 5 I will have C1, C2, C3, C4, C5. and therefore 2^5 = 32 cases.
For example:
If theau_map.size()=4, I need to simulate my algorithm for 16 cases.
for(It_au it = a_map.begin(); it != a_map.end(); it++)
{
  acq_pair it1 = it->second;
  //case 0:
  //C3 = 0, C2 = 0, C1 = 0, C0 = 0 
  //Update it1.second with corresponding C values
  //simulate algorithm
  //case 1:
  //C3 = 0, C2 = 0, C1 = 0, C0 = 1 
  //simulate
  .........
  //case 15: 
  //C3 = 1, C2 = 1, C1 = 1, C0 = 1 
  //simulate
}