Gael Guennebaud | c10f069 | 2008-07-21 00:34:46 +0000 | [diff] [blame^] | 1 | Matrix3i m = Matrix3i::Random(); |
Benoit Jacob | 486fdb2 | 2008-05-29 03:12:30 +0000 | [diff] [blame] | 2 | cout << "Here is the matrix m:" << endl << m << endl; |
| 3 | cout << "Here is the upper-triangular matrix extracted from m:" << endl |
Gael Guennebaud | c10f069 | 2008-07-21 00:34:46 +0000 | [diff] [blame^] | 4 | << m.part<Eigen::Upper>() << endl; |
Benoit Jacob | 486fdb2 | 2008-05-29 03:12:30 +0000 | [diff] [blame] | 5 | cout << "Here is the strictly-upper-triangular matrix extracted from m:" << endl |
Gael Guennebaud | c10f069 | 2008-07-21 00:34:46 +0000 | [diff] [blame^] | 6 | << m.part<Eigen::StrictlyUpper>() << endl; |
Benoit Jacob | 486fdb2 | 2008-05-29 03:12:30 +0000 | [diff] [blame] | 7 | cout << "Here is the unit-lower-triangular matrix extracted from m:" << endl |
Gael Guennebaud | c10f069 | 2008-07-21 00:34:46 +0000 | [diff] [blame^] | 8 | << m.part<Eigen::UnitLower>() << endl; |