5 #ifndef BPP_PHYL_LEGACY_OPTIMIZATIONTOOLS_H
6 #define BPP_PHYL_LEGACY_OPTIMIZATIONTOOLS_H
13 #include "../Parsimony/DRTreeParsimonyScore.h"
14 #include "../Tree/TreeTemplate.h"
58 std::shared_ptr<NNITopologySearch> ts,
61 std::shared_ptr<OutputStream> messenger,
62 std::shared_ptr<OutputStream> profiler,
64 const std::string& optMethod,
66 bool reparametrization) :
155 std::shared_ptr<NNITopologySearch> ts,
158 std::shared_ptr<OutputStream> messenger,
159 std::shared_ptr<OutputStream> profiler,
160 unsigned int verbose,
161 const std::string& optMethod,
162 bool reparametrization) :
256 std::shared_ptr<DiscreteRatesAcrossSitesTreeLikelihoodInterface> tl,
258 std::shared_ptr<OptimizationListener> listener =
nullptr,
259 unsigned int nstep = 1,
260 double tolerance = 0.000001,
261 unsigned int tlEvalMax = 1000000,
264 bool reparametrization =
false,
265 unsigned int verbose = 1,
292 std::shared_ptr<DiscreteRatesAcrossSitesTreeLikelihoodInterface> tl,
294 std::shared_ptr<OptimizationListener> listener =
nullptr,
295 double tolerance = 0.000001,
296 unsigned int tlEvalMax = 1000000,
299 bool reparametrization =
false,
300 bool useClock =
false,
301 unsigned int verbose = 1,
326 std::shared_ptr<DiscreteRatesAcrossSitesTreeLikelihoodInterface> tl,
328 std::shared_ptr<OptimizationListener> listener =
nullptr,
329 double tolerance = 0.000001,
330 unsigned int tlEvalMax = 1000000,
333 unsigned int verbose = 1,
342 std::shared_ptr<TreeLikelihoodInterface>
tl_;
372 if (name ==
"lambda")
return lambda_[0];
410 std::shared_ptr<TreeLikelihoodInterface> tl,
411 double tolerance = 0.000001,
412 unsigned int tlEvalMax = 1000000,
415 unsigned int verbose = 1);
458 std::shared_ptr<NNIHomogeneousTreeLikelihood> tl,
460 bool optimizeNumFirst =
true,
461 double tolBefore = 100,
462 double tolDuring = 100,
463 unsigned int tlEvalMax = 1000000,
464 unsigned int numStep = 1,
467 bool reparametrization =
false,
468 unsigned int verbose = 1,
470 unsigned int nStep = 1,
512 std::shared_ptr<NNIHomogeneousTreeLikelihood> tl,
514 bool optimizeNumFirst =
true,
515 double tolBefore = 100,
516 double tolDuring = 100,
517 unsigned int tlEvalMax = 1000000,
518 unsigned int numStep = 1,
521 bool reparametrization =
false,
522 unsigned int verbose = 1,
540 std::shared_ptr<DRTreeParsimonyScore> tp,
541 unsigned int verbose = 1);
Listener used internally by the optimizeTreeNNI2 method.
NNITopologyListener2 & operator=(const NNITopologyListener2 &tl)
ParameterList parameters_
NNITopologyListener2(const NNITopologyListener2 &tl)
std::shared_ptr< OutputStream > messenger_
NNITopologyListener2(std::shared_ptr< NNITopologySearch > ts, const ParameterList ¶meters, double tolerance, std::shared_ptr< OutputStream > messenger, std::shared_ptr< OutputStream > profiler, unsigned int verbose, const std::string &optMethod, bool reparametrization)
Build a new NNITopologyListener2 object.
unsigned int optimizeNumerical_
void topologyChangeTested(const TopologyChangeEvent &event)
Notify a topology change event.
std::shared_ptr< OutputStream > profiler_
std::shared_ptr< NNITopologySearch > topoSearch_
unsigned int optimizeCounter_
void setNumericalOptimizationCounter(unsigned int c)
void topologyChangeSuccessful(const TopologyChangeEvent &event)
Tell that a topology change is definitive.
virtual ~NNITopologyListener2()
NNITopologyListener2 * clone() const
Listener used internally by the optimizeTreeNNI method.
std::shared_ptr< OutputStream > messenger_
unsigned int optimizeNumerical_
NNITopologyListener * clone() const
void setNumericalOptimizationCounter(unsigned int c)
NNITopologyListener(std::shared_ptr< NNITopologySearch > ts, const ParameterList ¶meters, double tolerance, std::shared_ptr< OutputStream > messenger, std::shared_ptr< OutputStream > profiler, unsigned int verbose, const std::string &optMethod, unsigned int nStep, bool reparametrization)
Build a new NNITopologyListener object.
std::shared_ptr< OutputStream > profiler_
void topologyChangeSuccessful(const TopologyChangeEvent &event)
Tell that a topology change is definitive.
NNITopologyListener(const NNITopologyListener &tl)
NNITopologyListener & operator=(const NNITopologyListener &tl)
std::shared_ptr< NNITopologySearch > topoSearch_
virtual ~NNITopologyListener()
unsigned int optimizeCounter_
void topologyChangeTested(const TopologyChangeEvent &event)
Notify a topology change event.
ParameterList parameters_
static const std::string PHYML
virtual const Parameter & parameter(const std::string &name) const
virtual double getValue() const
Class for notifying new toplogy change events.
Implement this interface to be notified when the topology of a tree has changed during topology searc...
Defines the basic types of data flow nodes.