Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
util
test
test_eigen2.cxx
Go to the documentation of this file.
1
#include "
WireCellUtil/Testing.h
"
2
#include "
WireCellUtil/ExecMon.h
"
3
4
#include <Eigen/Core>
5
#include <iostream>
6
7
using namespace
std
;
8
using namespace
Eigen
;
9
using
WireCell::ExecMon
;
10
11
void
test_matrix_by_array
(
ExecMon
& em)
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
}
26
27
int
main
()
28
{
29
ExecMon
em;
30
test_matrix_by_array
(em);
31
32
cerr << em.
summary
() <<
endl
;
33
34
return
0;
35
}
WireCell::ExecMon
Definition:
ExecMon.h:21
ExecMon.h
Eigen
std
STL namespace.
main
int main()
Definition:
test_eigen2.cxx:27
Testing.h
test_matrix_by_array
void test_matrix_by_array(ExecMon &em)
Definition:
test_eigen2.cxx:11
WireCell::ExecMon::summary
std::string summary() const
Return summary up to now.
Definition:
ExecMon.cxx:21
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11