libeigen/eigen!2509 Closes #2868 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
18 lines
422 B
C++
18 lines
422 B
C++
// SPDX-FileCopyrightText: The Eigen Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
#include <iostream>
|
|
#include <Eigen/Dense>
|
|
|
|
using Eigen::MatrixXd;
|
|
using Eigen::VectorXd;
|
|
|
|
int main() {
|
|
MatrixXd m = MatrixXd::Random(3, 3);
|
|
m = (m + MatrixXd::Constant(3, 3, 1.2)) * 50;
|
|
std::cout << "m =" << std::endl << m << std::endl;
|
|
VectorXd v(3);
|
|
v << 1, 2, 3;
|
|
std::cout << "m * v =" << std::endl << m * v << std::endl;
|
|
}
|