validated matrix multiplication

This commit is contained in:
Hartmut Seichter 2018-04-04 11:33:19 +02:00
parent 75fb4c27f7
commit d33a00721a
2 changed files with 21 additions and 7 deletions

View file

@ -33,5 +33,19 @@ int main(int argc,char **argv) {
std::cout << "mscale = " << pw::serialize::matrix(mscale) << std::endl;
pw::matrix44d a;
for (int r = 0; r < m.rows(); r++) {
for (int c = 0; c < m.cols(); c++) {
a.at(r,c) = r * m.cols() + c;
}
}
std::cout << "a = " << pw::serialize::matrix(a) << std::endl;
pw::matrix44d r = a * mscale;
std::cout << "a * mscale = " << pw::serialize::matrix(r) << std::endl;
return 0;
}