Commit 8d2b452c authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Removing the dependancy to Qt in all plugins

parent 5c91268f
......@@ -130,10 +130,10 @@ void timer::print(std::ostream& out) const
unsigned int sec = tsec % 60 ;
unsigned int min = (tsec / 60) % 60 ;
unsigned int hour = (tsec / 360) ;
out << hour << "h " << min << "m " << sec << "s" << std::endl ;
out << hour << "h " << min << "m " << sec << "s" ;
}
std::ostream& operator<<(const timer& t, std::ostream& out)
std::ostream& operator<<(std::ostream& out, const timer& t)
{
t.print(out);
return out;
......
......@@ -320,7 +320,7 @@ class timer
void print(std::ostream& out) const;
//! \brief ostream compliant operator
friend std::ostream& operator<<(const timer& t, std::ostream& out);
friend std::ostream& operator<<(std::ostream& out, const timer& t);
private:
......
......@@ -2,6 +2,7 @@ TEMPLATE = lib
CONFIG *= static \
console \
eigen
CONFIG -= qt
DESTDIR = ../build
......
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
eigen
DESTDIR = ../../build
......
......@@ -10,8 +10,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......
TARGET = nonlinear_fitter_ceres
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
ceres \
eigen
......
......@@ -11,8 +11,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......
TARGET = nonlinear_fitter_eigen
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
eigen
DESTDIR = ../../build
......
......@@ -13,8 +13,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......
TARGET = nonlinear_fitter_ipopt
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
ipopt \
eigen
......
......@@ -9,8 +9,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......
TARGET = nonlinear_fitter_nlopt
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
nlopt \
eigen
......
......@@ -13,8 +13,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
typedef CGAL::MP_Float ET ;
typedef CGAL::Quadratic_program<ET> Program ;
typedef CGAL::Quadratic_program_solution<ET> Solution ;
......@@ -56,17 +54,14 @@ bool rational_fitter_cgal::fit_data(const data* dat, function* fit, const argume
int temp_np = _min_np, temp_nq = _min_nq ;
while(temp_np <= _max_np || temp_nq <= _max_nq)
{
QTime time ;
timer time ;
time.start() ;
if(fit_data(d, temp_np, temp_nq, r))
{
int msec = time.elapsed() ;
int sec = (msec / 1000) % 60 ;
int min = (msec / 60000) % 60 ;
int hour = (msec / 3600000) ;
time.stop();
std::cout << "<<INFO>> got a fit using np = " << temp_np << " & nq = " << temp_nq << " " << std::endl ;
std::cout << "<<INFO>> it took " << hour << "h " << min << "m " << sec << "s" << std::endl ;
std::cout << "<<INFO>> it took " << time << std::endl ;
return true ;
}
......
TEMPLATE = lib
CONFIG *= shared \
qt \
plugin \
eigen \
cgal
......
......@@ -10,8 +10,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......@@ -46,18 +44,15 @@ bool rational_fitter_eigen::fit_data(const data* dat, function* fit, const argum
std::cout << "<<INFO>> np =" << _np << "& nq =" << _nq << std::endl ;
r->setSize(_np, _nq);
QTime time ;
timer time ;
time.start() ;
if(fit_data(d, _np, _nq, r))
{
int msec = time.elapsed() ;
int sec = (msec / 1000) % 60 ;
int min = (msec / 60000) % 60 ;
int hour = (msec / 3600000) ;
time.stop();
std::cout << "<<INFO>> got a fit" << std::endl ;
std::cout << "<<INFO>> it took " << hour << "h " << min << "m " << sec << "s" << std::endl ;
std::cout << "<<INFO>> it took " << time << std::endl ;
return true ;
}
......
TARGET = rational_fitter_eigen
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
eigen
DESTDIR = ../../build
......
......@@ -10,8 +10,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#include <core/common.h>
ALTA_DLL_EXPORT fitter* provide_fitter()
......@@ -57,18 +55,15 @@ bool rational_fitter_leastsquare::fit_data(const data* dat, function* fit, const
std::cout << "<<INFO>> np =" << _np << "& nq =" << _nq << std::endl ;
QTime time ;
timer time ;
time.start() ;
if(fit_data(d, _np, _nq, r))
{
int msec = time.elapsed() ;
int sec = (msec / 1000) % 60 ;
int min = (msec / 60000) % 60 ;
int hour = (msec / 3600000) ;
time.stop();
std::cout << "<<INFO>> got a fit" << std::endl ;
std::cout << "<<INFO>> it took " << hour << "h " << min << "m " << sec << "s" << std::endl ;
std::cout << "<<INFO>> it took " << time << std::endl ;
return true ;
}
......
TARGET = rational_fitter_leastsquare
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
eigen
DESTDIR = ../../build
......
......@@ -10,8 +10,6 @@
#include <algorithm>
#include <cmath>
#include <QTime>
#define BUFFER_SIZE 10000
ALTA_DLL_EXPORT fitter* provide_fitter()
......@@ -55,19 +53,16 @@ bool rational_fitter_matlab::fit_data(const data* dat, function* fit, const argu
int temp_np = _min_np, temp_nq = _min_nq ;
while(temp_np <= _max_np || temp_nq <= _max_nq)
{
QTime time ;
timer time ;
time.start() ;
r->setSize(temp_np, temp_nq);
if(fit_data(d, temp_np, temp_nq, r))
{
int msec = time.elapsed() ;
int sec = (msec / 1000) % 60 ;
int min = (msec / 60000) % 60 ;
int hour = (msec / 3600000) ;
time.stop() ;
std::cout << "<<INFO>> got a fit using np = " << temp_np << " & nq = " << temp_nq << " " << std::endl ;
std::cout << "<<INFO>> it took " << hour << "h " << min << "m " << sec << "s" << std::endl ;
std::cout << "<<INFO>> it took " << time << std::endl ;
return true ;
}
......
TARGET = rational_fitter_matlab
TEMPLATE = lib
CONFIG *= qt \
plugin \
CONFIG *= plugin \
eigen \
matlab
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment