Functions
test_eigen2.cxx File Reference
#include "WireCellUtil/Testing.h"
#include "WireCellUtil/ExecMon.h"
#include <Eigen/Core>
#include <iostream>

Go to the source code of this file.

Functions

void test_matrix_by_array (ExecMon &em)
 
int main ()
 

Function Documentation

int main ( void  )

Definition at line 27 of file test_eigen2.cxx.

28 {
29  ExecMon em;
31 
32  cerr << em.summary() << endl;
33 
34  return 0;
35 }
void test_matrix_by_array(ExecMon &em)
Definition: test_eigen2.cxx:11
std::string summary() const
Return summary up to now.
Definition: ExecMon.cxx:21
QTextStream & endl(QTextStream &s)
void test_matrix_by_array ( ExecMon em)

Definition at line 11 of file test_eigen2.cxx.

12 {
13  em("mba: start");
14  Matrix3f mat1, mat2, mat3, mat4, mat5;
15  mat1 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
16  mat2 << 1, 1, 1, 1, 1, 1, 1, 1, 1;
17  mat3 = mat1.array() + mat2.array();
18  mat4 = mat1 * mat2;
19  // mat5 = mat1 * mat2.array(); compilation error, can't mix!
20 
21  cerr << "mat1:\n" << mat1 << endl;
22  cerr << "mat2:\n" << mat2 << endl;
23  cerr << "mat3:\n" << mat3 << endl;
24  cerr << "mat4:\n" << mat4 << endl;
25 }
QTextStream & endl(QTextStream &s)