Elements  5.10
A C++ base framework for the Euclid Software.
EigenExample.cpp
Go to the documentation of this file.
1 
21 #include <iostream>
22 
23 #include <map> // for map
24 #include <string> // for string
25 #include <boost/program_options.hpp> // for program options from configuration file of command line arguments
26 
27 #include <Eigen/Dense>
28 
29 #include "ElementsKernel/ProgramHeaders.h" // for including all Program/related headers
30 #include "ElementsKernel/Unused.h" // for ELEMENTS_UNUSED
31 
32 using std::map;
33 using std::string;
34 using boost::program_options::variable_value;
35 
36 namespace Elements {
37 namespace Examples {
38 
39 class EigenExample: public Program {
40 
41 public:
42 
43 
45 
46  using Eigen::MatrixXd;
47 
48  auto log = Logging::getLogger("EigenExample");
49 
50  MatrixXd m(2, 2);
51  m(0, 0) = 3;
52  m(1, 0) = 2.5;
53  m(0, 1) = -1;
54  m(1, 1) = m(1, 0) + m(0, 1);
55  std::cout << m << std::endl;
56 
57  log.info() << "This is the end of the test";
58 
59  return ExitCode::OK;
60 
61  }
62 
63 };
64 
65 } // namespace Examples
66 } // namespace Elements
67 
68 
ExitCode
Strongly typed exit numbers.
Definition: Exit.h:98
Macro to silence unused variables warnings from the compiler.
Everything is OK.
T endl(T... args)
Abstract class for all Elements programs.
Definition: Program.h:51
STL class.
ExitCode mainMethod(ELEMENTS_UNUSED map< string, variable_value > &args) override
STL class.
constexpr double m
Definition: SystemOfUnits.h:79
#define MAIN_FOR(ELEMENTS_PROGRAM_NAME)
Definition: Main.h:117
#define ELEMENTS_UNUSED
Definition: Unused.h:39
static Logging getLogger(const std::string &name="")
Definition: Logging.cpp:63