#ifndef COLLAPSED_EM_OPTIMIZER_HPP #define COLLAPSED_EM_OPTIMIZER_HPP #include #include #include "tbb/atomic.h" #include "tbb/task_scheduler_init.h" #include "ReadExperiment.hpp" #include "SalmonOpts.hpp" #include "Eigen/Dense" #include "cuckoohash_map.hh" class BootstrapWriter; class CollapsedEMOptimizer { public: using VecType = std::vector>; using SerialVecType = std::vector; CollapsedEMOptimizer(); template bool optimize( ExpT& readExp, SalmonOpts& sopt, double tolerance = 0.01, // A EM termination criteria, adopted from Bray et al. 2016 uint32_t maxIter = 1000); // A EM termination criteria, adopted from Bray et al. 2016 template bool gatherBootstraps( ExpT& readExp, SalmonOpts& sopt, std::function&)>& writeBootstrap, double relDiffTolerance, uint32_t maxIter); }; #endif // COLLAPSED_EM_OPTIMIZER_HPP