OGS
EigenMatrix.cpp
Go to the documentation of this file.
1
11
#include "
EigenMatrix.h
"
12
13
#include <fstream>
14
15
namespace
MathLib
16
{
17
19
void
EigenMatrix::write
(
const
std::string& filename)
const
20
{
21
std::ofstream of(filename);
22
if
(of)
23
{
24
write
(of);
25
}
26
}
27
29
void
EigenMatrix::write
(std::ostream& os)
const
30
{
31
for
(
int
k = 0; k <
mat_
.outerSize(); ++k)
32
{
33
for
(RawMatrixType::InnerIterator it(
mat_
, k); it; ++it)
34
{
35
os << it.row() <<
" "
<< it.col() <<
" "
<< it.value() <<
"\n"
;
36
}
37
}
38
os << std::endl;
39
}
40
}
// namespace MathLib
EigenMatrix.h
MathLib::EigenMatrix::write
void write(const std::string &filename) const
printout this matrix for debugging
Definition
EigenMatrix.cpp:19
MathLib::EigenMatrix::mat_
RawMatrixType mat_
Definition
EigenMatrix.h:149
MathLib
Definition
CreateComponent.h:32
MathLib
LinAlg
Eigen
EigenMatrix.cpp
Generated by
1.11.0