// solver.cpp // // last-edit-by: J.A. de Jong // // Description: // ////////////////////////////////////////////////////////////////////// #include "tasmet_tracer.h" #include "solver.h" #include "tasmet_exception.h" #include template static void SolverThread(Solver* solver, system_T* system, progress_callback* callback); template Solver::Solver(const system_T& sys){ _sys = sys.copy(); if(!_sys) throw TaSMETBadAlloc(); } template Solver::~Solver(){ delete _sys; } template void Solver::start(progress_callback* callback){ TRACE(15,"Waiting for solver..."); start_implementation(*_sys,callback); } template result_T Solver::getSolution() { return _sys->getSolution(); } template void SolverThread(Solver* solver,system_T* system,progress_callback* callback) { assert(system); solver->_running = true; solver->start_implementation(*system,callback); solver->_running = false; } // Explicit instantiation for some types of systems and results template class Solver,vd>; template class Solver; template class Solver,d>; //////////////////////////////////////////////////////////////////////