bool DatabaseCorrelation::GetCorrelatedTimeStates(int state, intVector &states) const { bool retval = false; if(state >= 0 && state < numStates) { states.clear(); int index = state; for(size_t i = 0; i < databaseNames.size(); ++i) { states.push_back(indices[index]); index += numStates; } retval = true; } return retval; }
// compute the distribution of correspondence statuses in this order: // connected, paused, observed, expected, blacklisted, alternate, silent void SM_ComputeDistribution( intVector &dist ) { // reset the distribution dist.clear(); for (int i=0; i<3; i++) dist.push_back( 0 ); // populate the distribution for ( corresVector::iterator iter = cq.begin(); iter != cq.end(); iter++ ) { switch ( iter->status() ) { case _CONNECTED: dist[0]++; break; case _EXPECTED: dist[1]++; break; case _BLACKLISTED: dist[2]++; break; default: assert( false ); } } }