not-that-dumb matrix*vector multiplication
This commit is contained in:
parent
90279968f8
commit
3758f23f44
|
@ -200,11 +200,7 @@ bool matrix::mult_vec_right (const bvector&a, bvector&r)
|
||||||
uint w = width(), h = height();
|
uint w = width(), h = height();
|
||||||
if (a.size() != w) return false;
|
if (a.size() != w) return false;
|
||||||
r.resize (h, 0);
|
r.resize (h, 0);
|
||||||
for (uint i = 0; i < h; ++i) {
|
for (uint i = 0; i < w; ++i)
|
||||||
bool t = 0;
|
if (a[i]) r.add (item (i) );
|
||||||
for (uint j = 0; j < w; ++j)
|
|
||||||
t ^= item (j) [i] & a[j];
|
|
||||||
r[i] = t;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue