mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 17:49:36 +08:00
16 lines
321 B
C++
16 lines
321 B
C++
#include <iostream>
|
|
#include <Eigen/Dense>
|
|
|
|
using Eigen::Matrix3d;
|
|
using Eigen::Vector3d;
|
|
|
|
int main()
|
|
{
|
|
Matrix3d m = Matrix3d::Random();
|
|
m = (m + Matrix3d::Constant(1.2)) * 50;
|
|
std::cout << "m =" << std::endl << m << std::endl;
|
|
Vector3d v(1,2,3);
|
|
|
|
std::cout << "m * v =" << std::endl << m * v << std::endl;
|
|
}
|