Advertisement
Guest User

Untitled

a guest
May 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. ostream & operator<<(std::ostream & os, const SecuenciasKmer & i){
  2.     os << i._nKmer << endl;
  3.    
  4.     for(int j=0; j< i.getSize(); j++){
  5.         i._conjunto[j].writeKmer();
  6.         os << endl;
  7.     }
  8.    
  9.     return os;
  10. }
  11.  
  12.  
  13. istream & operator>>(std::istream & is, SecuenciasKmer & i){
  14.     int total_datos, kmer_frec;
  15.     string kmer_chain;
  16.    
  17.     is >> total_datos;
  18.    
  19.     if(total_datos > 0){
  20.         i.reservarMemoria(total_datos);
  21.        
  22.         for(int j=0; j<total_datos; j++){
  23.             is >> kmer_chain >> kmer_frec;
  24.            
  25.             i._conjunto[j].setCadena(kmer_chain);
  26.             i._conjunto[j].setFrecuencia(kmer_frec);
  27.         }
  28.     }
  29.    
  30.     return is;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement