#include <iostream>
#include <Eigen/Dense>
◆ main()
7 Eigen::Vector2d u(-1, 1),
v(2, 0);
8 std::cout <<
"Here is mat*mat:\n" <<
mat *
mat << std::endl;
9 std::cout <<
"Here is mat*u:\n" <<
mat * u << std::endl;
10 std::cout <<
"Here is u^T*mat:\n" << u.
transpose() *
mat << std::endl;
11 std::cout <<
"Here is u^T*v:\n" << u.
transpose() *
v << std::endl;
12 std::cout <<
"Here is u*v^T:\n" << u *
v.transpose() << std::endl;
13 std::cout <<
"Let's multiply mat by itself" << std::endl;
15 std::cout <<
"Now mat is mat:\n" <<
mat << std::endl;
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Eigen::SparseMatrix< double > mat
Definition: EigenUnitTest.cpp:10
TransposeReturnType transpose()
Definition: SparseMatrixBase.h:358
References Eigen::SparseMatrixBase< Derived >::transpose(), and v.