source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/examples/tut_arithmetic_scalar_mul_div.cpp@
136
      
      | Last change on this file since 136 was 136, checked in by , 9 years ago | |
|---|---|
| File size: 353 bytes | |
| Line | |
|---|---|
| 1 | #include <iostream> | 
| 2 | #include <Eigen/Dense> | 
| 3 | |
| 4 | using namespace Eigen; | 
| 5 | |
| 6 | int main() | 
| 7 | { | 
| 8 | Matrix2d a; | 
| 9 | a << 1, 2, | 
| 10 | 3, 4; | 
| 11 | Vector3d v(1,2,3); | 
| 12 | std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; | 
| 13 | std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; | 
| 14 | std::cout << "Doing v *= 2;" << std::endl; | 
| 15 | v *= 2; | 
| 16 | std::cout << "Now v =\n" << v << std::endl; | 
| 17 | } | 
  Note:
 See   TracBrowser
 for help on using the repository browser.
    
