class bitmatrix implemented as derived from bitvector

This commit is contained in:
2024-09-09 17:12:04 +02:00
parent 7a0b49c2b8
commit 4cf7dbb8c7
3 changed files with 67 additions and 1 deletions

21
t.cc
View File

@@ -3412,7 +3412,7 @@ cout <<e;
cout <<eu;
}
if(1)
if(0)
{
NRVec<double> a({1.,10.,100.});
NRVec<double> b({1.,2.,3.});
@@ -3421,4 +3421,23 @@ Tensor<double> bb(b);
cout << aa*bb;
}
if(1)
{
int seed;
int f=open("/dev/random",O_RDONLY);
if(sizeof(int)!=read(f,&seed,sizeof(int))) laerror("cannot read /dev/random");
close(f);
srand(seed);
bitmatrix a(4,4);
a.randomize();
a.reset(0,0);
a.set(3,3);
bitmatrix b(a);
bitmatrix c=a;
cout <<a;
cout <<b;
cout <<c;
}
}