view cpp/chourdakisreiss2016cpp/mapping.cpp @ 2:c87a9505f294 tip

Added LICENSE for code, removed .wav files
author Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk>
date Sat, 30 Sep 2017 13:25:50 +0100
parents 144fbd1d29c3
children
line wrap: on
line source
/*
 * mapping.cpp
 *
 *  Created on: Dec 14, 2016
 *      Author: Emmanouil Theofanis Chourdakis
 */

#include<iostream>
// #include<nlopt.hpp>
#include"Parameter.h"
#include <dlib/optimization.h>

using namespace dlib;


int main(int argc, char *argv[])
{
	std::cout << "Parameters:" << std::endl;
	Parameter p;

	std::cout << "Setting g1 to 0.3" << std::endl;
	p.setG1(0.3);
	std::cout << p << std::endl;

	std::cout << "Setting d1 to 0.04" << std::endl;
	p.setD1(0.04);
	std::cout << p << std::endl;

	std::cout << "Storing parameters:" << std::endl;
	double t60 = p.getT60(), ed = p.getEd(), sc = p.getSc(), tc = p.getTc(), c = p.getC();

	Parameter p2;

	std::cout << "New parameter object:" << std::endl;
	std::cout << p2 << std::endl;

	std::cout << "Setting the new parameters to the old object values: " << std::endl;
	p2.setT60(t60);
	p2.setEd(ed);
	p2.setSc(sc);
	p2.setTc(tc);
	p2.setC(c);
	std::cout << p2 << std::endl;


	return 0;
}