LA_library/bitvector.cc

18 lines
304 B
C++
Raw Normal View History

2006-03-30 21:16:40 +02:00
#include "bitvector.h"
//inefficient I/O operators
ostream & operator<<(ostream &s, const bitvector &x)
{
for(unsigned int i=0; i<x.size(); ++i) s<< x[i];
return s;
}
istream & operator>>(istream &s, bitvector &x)
{
bool a;
for(unsigned int i=0; i<x.size(); ++i) {s >>a; x.assign(i,a);}
return s;
}