Tutorial_BlockOperations_vector.cpp
Go to the documentation of this file.
00001 #include <Eigen/Dense>
00002 #include <iostream>
00003 
00004 using namespace std;
00005 
00006 int main()
00007 {
00008   Eigen::ArrayXf v(6);
00009   v << 1, 2, 3, 4, 5, 6;
00010   cout << "v.head(3) =" << endl << v.head(3) << endl << endl;
00011   cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl;
00012   v.segment(1,4) *= 2;
00013   cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl;
00014 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:27