Tutorial_ArrayClass_accessors.cpp
Go to the documentation of this file.
00001 #include <Eigen/Dense>
00002 #include <iostream>
00003 
00004 using namespace Eigen;
00005 using namespace std;
00006 
00007 int main()
00008 {
00009   ArrayXXf  m(2,2);
00010   
00011   // assign some values coefficient by coefficient
00012   m(0,0) = 1.0; m(0,1) = 2.0;
00013   m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0);
00014   
00015   // print values to standard output
00016   cout << m << endl << endl;
00017  
00018   // using the comma-initializer is also allowed
00019   m << 1.0,2.0,
00020        3.0,4.0;
00021      
00022   // print values to standard output
00023   cout << m << endl;
00024 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:55