Closed weifang1 closed 7 years ago
are SchedulerTests supposed to be deleted?
No. The Scheduler_Test.cpp that I'm going to delete locates in the Graph folder. That is created by mistake. The original one is still in the Scheduler folder.
https://github.com/blengerich/GenAMap/tree/shared_ptr/src/Scheduler
Ok, LGTM.
This commit tries to change Algorithm and Model in Job_t to shared_ptr\<Algorithm> and shared_ptr\<Model>. https://github.com/blengerich/GenAMap/blob/shared_ptr/src/Scheduler/Job.hpp#L30
To apply this modification, all run(Model*) interfaces in the Model folder are changed to run(shared_ptr\<Model>).
One more thing, in BrentSearch.hpp and GridSearch.hpp, the function run(shared_ptr) doesn't exist. So when call run(shared_ptr\<SparseLMM>) in Scheduler.cpp:
https://github.com/blengerich/GenAMap/blob/shared_ptr/src/Scheduler/Scheduler.cpp#L316
It is ambiguous for the compiler to indicate which function should be called, run(shared_ptr\<LinearMixtureModel>) or run(shared_ptr\<Model>). In this case, to avoid the ambiguty, I change all run() that take derived classes as the parameter to sub_run().
https://github.com/blengerich/GenAMap/blob/shared_ptr/src/Algorithms/BrentSearch.hpp#L73