mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add second example to QuickStart guide.
Also, some changes suggested by Keir and Benoit on mailing list.
This commit is contained in:
15
doc/examples/QuickStart_example2_fixed.cpp
Normal file
15
doc/examples/QuickStart_example2_fixed.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
using Eigen::Matrix3d;
|
||||
using Eigen::Vector3d;
|
||||
|
||||
int main(int, char *[])
|
||||
{
|
||||
Matrix3d m;
|
||||
for (int rowIndex = 0; rowIndex < 3; ++rowIndex)
|
||||
for (int columnIndex = 0; columnIndex < 3; ++columnIndex)
|
||||
m(rowIndex, columnIndex) = rowIndex + 0.01 * columnIndex;
|
||||
Vector3d v = Vector3d::Ones();
|
||||
std::cout << m * v << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user