rcpi != rmp -> best . end( ); rcpi ++ )
rcpi != rmp -> best . end( ); ++ rcpi )
void PlaceRandom (Mapping_t & mapping){  ReadMap_t * rmp;  vector<ReadAlignChain_t *> places;  vector<ReadMap_t *>::iterator rmpi;  list<ReadAlignChain_t *>::iterator rcpi;  //-- For each read in the mapping  for ( rmpi  = mapping . reads . begin( );	rmpi != mapping . reads . end( ); rmpi ++ )    {      rmp = *rmpi;      //-- If already placed, skip      if ( rmp -> place != NULL )	continue;      //-- Get all of the valid chains      places . clear( );      for ( rcpi  = rmp -> best . begin( );	    rcpi != rmp -> best . end( ); rcpi ++ )	if ( IsValidChain (*rcpi, rmp) )	  places . push_back (*rcpi);      //-- Randomly pick a valid chain      if ( !places . empty( ) )	rmp -> place = places	  [(int)((double)places . size( ) * rand( ) / (RAND_MAX + 1.0))];    }}