mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
b0bd1cfa05
Use \verbinclude for output text to disable syntax highlighting. Give tables consistent look.
15 lines
348 B
C++
15 lines
348 B
C++
#include <Eigen/Dense>
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
Eigen::ArrayXf v(6);
|
|
v << 1, 2, 3, 4, 5, 6;
|
|
cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
|
|
cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
|
|
v.segment(1,4) *= 2;
|
|
cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
|
|
}
|