~yade-dev/yade/eigen3

« back to all changes in this revision

Viewing changes to doc/examples/QuickStart_example2_dynamic.cpp

  • Committer: Anton Gladky
  • Date: 2011-12-06 16:25:13 UTC
  • Revision ID: gladky.anton@gmail.com-20111206162513-pnl0n3q3yurpg9p4
Initial import of eigen3, version 3.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <iostream>
 
2
#include <Eigen/Dense>
 
3
 
 
4
using namespace Eigen;
 
5
using namespace std;
 
6
 
 
7
int main()
 
8
{
 
9
  MatrixXf m = MatrixXf::Random(3,3);
 
10
  m = (m + MatrixXf::Constant(3,3,1.2)) * 50;
 
11
  cout << "m =" << endl << m << endl;
 
12
  VectorXf v(3);
 
13
  v << 1, 2, 3;
 
14
  cout << "m * v =" << endl << m * v << endl;
 
15
}