#include <iostream>
static void
Construct();
static void
Multiply();
int
main(int, char *[])
{
Construct();
Multiply();
return EXIT_SUCCESS;
}
void
Construct()
{
MatrixType M;
M(0, 0) = 1.0;
M(0, 1) = 2.0;
M(0, 2) = 3.0;
M(1, 0) = 4.0;
M(1, 1) = 5.0;
M(1, 2) = 6.0;
M(2, 0) = 7.0;
M(2, 1) = 8.0;
M(2, 2) = 9.0;
std::cout << "M: " << M << std::endl;
}
void
Multiply()
{
MatrixType M;
M(0, 0) = 1.0;
M(0, 1) = 2.0;
M(0, 2) = 3.0;
M(1, 0) = 4.0;
M(1, 1) = 5.0;
M(1, 2) = 6.0;
M(2, 0) = 7.0;
M(2, 1) = 8.0;
M(2, 2) = 9.0;
std::cout << "M: " << M << std::endl;
V[0] = 1.0;
V[1] = 2.0;
V[2] = 3.0;
std::cout << "V: " << V << std::endl;
std::cout << "MV: " << M * V << std::endl;
}