*** empty log message ***

This commit is contained in:
jiri
2006-04-01 04:48:01 +00:00
parent 5ea385fc30
commit 1844f777ed
15 changed files with 419 additions and 24 deletions

28
test.cc
View File

@@ -1,8 +1,28 @@
#include "vec.h"
#include "bitvector.h"
int main(void)
{
NRVec<double> *p = new NRVec<double>[1000];
NRVec<double> q(10); q=1.;
p[500]|=q;
bitvector v(100);
v.fill();
bitvector x(50); x=v;
v.copyonwrite();
for(unsigned int i=0; i<100; i+=2) v.reset(i);
x.fill();
x= ~x;
for(unsigned int i=0; i<100; ++i) x.assign(i,i&1);
cout <<v<< endl;
cout <<x<< endl;
cout <<"TEST "<<(x==v)<< " "<<x.population()<<endl;
v.clear(); x.clear();
v.set(31); x.set(32);
cout <<" TEST < "<< (x<v)<<endl;
NRVec<int> t(10);
for(int i=0; i<10; ++i) t[i]=i;
cout <<t;
t.sort(1);
cout <<t;
t.sort(0);
cout<<t;
}