comparison cpp/chourdakisreiss2016cpp/mapping.cpp @ 1:144fbd1d29c3

added c++ class Parameter
author Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk>
date Wed, 28 Dec 2016 17:22:49 +0000
parents
children
comparison
equal deleted inserted replaced
0:246d5546657c 1:144fbd1d29c3
1 /*
2 * mapping.cpp
3 *
4 * Created on: Dec 14, 2016
5 * Author: Emmanouil Theofanis Chourdakis
6 */
7
8 #include<iostream>
9 // #include<nlopt.hpp>
10 #include"Parameter.h"
11 #include <dlib/optimization.h>
12
13 using namespace dlib;
14
15
16 int main(int argc, char *argv[])
17 {
18 std::cout << "Parameters:" << std::endl;
19 Parameter p;
20
21 std::cout << "Setting g1 to 0.3" << std::endl;
22 p.setG1(0.3);
23 std::cout << p << std::endl;
24
25 std::cout << "Setting d1 to 0.04" << std::endl;
26 p.setD1(0.04);
27 std::cout << p << std::endl;
28
29 std::cout << "Storing parameters:" << std::endl;
30 double t60 = p.getT60(), ed = p.getEd(), sc = p.getSc(), tc = p.getTc(), c = p.getC();
31
32 Parameter p2;
33
34 std::cout << "New parameter object:" << std::endl;
35 std::cout << p2 << std::endl;
36
37 std::cout << "Setting the new parameters to the old object values: " << std::endl;
38 p2.setT60(t60);
39 p2.setEd(ed);
40 p2.setSc(sc);
41 p2.setTc(tc);
42 p2.setC(c);
43 std::cout << p2 << std::endl;
44
45
46 return 0;
47 }
48
49
50
51