Tutorial_BlockOperations_vector.cpp File Reference
#include <Eigen/Dense>
#include <iostream>

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
6  {
7  Eigen::ArrayXf v(6);
8  v << 1, 2, 3, 4, 5, 6;
9  cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
10  cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
11  v.segment(1, 4) *= 2;
12  cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
13 }
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1

References v.