Tutorial_BlockOperations_vector.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 6 of file Tutorial_BlockOperations_vector.cpp.

7 {
8  Eigen::ArrayXf v(6);
9  v << 1, 2, 3, 4, 5, 6;
10  cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
11  cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
12  v.segment(1,4) *= 2;
13  cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
14 }
Array< int, Dynamic, 1 > v
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:49