mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-09 07:00:27 +08:00
16 lines
315 B
C++
16 lines
315 B
C++
#include <iostream>
|
|
#include <Eigen/Dense>
|
|
|
|
using Eigen::Matrix3d;
|
|
using Eigen::Vector3d;
|
|
|
|
int main()
|
|
{
|
|
Matrix3d m;
|
|
for (int row = 0; row < 3; ++row)
|
|
for (int column = 0; column < 3; ++column)
|
|
m(row, column) = row + 0.01 * column;
|
|
Vector3d v = Vector3d::Ones();
|
|
std::cout << m * v << std::endl;
|
|
}
|