EukPhylo/PTL2/Scripts-DEV/guidance.v2.02/libs/phylogeny/fromCountTableComponentToDistancefixRoot.h
Katzlab dd76ab1d12 Added PTL2 Scripts
These are PTL2 files from Auden 2/9
2023-02-14 11:20:52 -05:00

40 lines
1.3 KiB
C++

// $Id: fromCountTableComponentToDistance.h 4471 2008-07-17 15:38:50Z cohenofi $
#ifndef ___FROM_COUNT_TABLE_COMPONENT_TO_DISTANCE__FIX_ROOT
#define ___FROM_COUNT_TABLE_COMPONENT_TO_DISTANCE__FIX_ROOT
#include "definitions.h"
#include "countTableComponent.h"
#include "stochasticProcess.h"
#include "unObservableData.h"
static const MDOUBLE startingGuessForTreeBrLen = 0.029;
class fromCountTableComponentToDistancefixRoot {
public:
explicit fromCountTableComponentToDistancefixRoot(
const vector<countTableComponentGam>& ctc,
const stochasticProcess &sp,
const MDOUBLE toll,
const MDOUBLE brLenIntialGuess, // =startingGuessForTreeBrLen
unObservableData* unObservableData_p);
void computeDistance();// return the likelihood
MDOUBLE getDistance() { return _distance;} // return the distance.
MDOUBLE getLikeDistance() { return _likeDistance;} // return the distance.
private:
const stochasticProcess & _sp;
const vector<countTableComponentGam>& _ctc; //_ctc[letterAtRoot][rate][alph][alph]
MDOUBLE _toll;
MDOUBLE _distance;
MDOUBLE _likeDistance;
unObservableData* _unObservableData_p;
// int alphabetSize() {return _ctc.alphabetSize();}
int alphabetSize() {return _ctc[0].alphabetSize();}
};
#endif