Skip to content

Commit

Permalink
merged with superdouble for large trees without the library
Browse files Browse the repository at this point in the history
  • Loading branch information
blackrim committed Mar 30, 2011
2 parents a8f10f7 + b7c4331 commit 72a2385
Show file tree
Hide file tree
Showing 19 changed files with 739 additions and 469 deletions.
22 changes: 4 additions & 18 deletions AncSplit.cpp
Expand Up @@ -16,16 +16,13 @@

#include "AncSplit.h"
#include "RateModel.h"

#include "superdouble.h"
#include <vector>
using namespace std;

#ifdef BIGTREE
#include "gmpfrxx/gmpfrxx.h"
#endif


AncSplit::AncSplit(RateModel * mod,int dist,int ldesc,int rdesc,double we):model(mod),weight(we),
AncSplit::AncSplit(RateModel * mod,int dist,int ldesc,int rdesc,Superdouble we):model(mod),weight(we),
likelihood(0),ancdistint(dist),ldescdistint(ldesc),rdescdistint(rdesc){}

RateModel * AncSplit::getModel(){
Expand All @@ -36,21 +33,10 @@ double AncSplit::getWeight(){
return weight;
}


#ifdef BIGTREE
mpfr_class AncSplit::getLikelihood(){
return likelihood;
}

void AncSplit::setLikelihood(mpfr_class li){
likelihood = li;
}
#else
double AncSplit::getLikelihood(){
Superdouble AncSplit::getLikelihood(){
return likelihood;
}

void AncSplit::setLikelihood(double li){
void AncSplit::setLikelihood(Superdouble li){
likelihood = li;
}
#endif
22 changes: 5 additions & 17 deletions AncSplit.h
Expand Up @@ -20,33 +20,21 @@
#include <vector>
//using namespace std;

#include "superdouble.h"
#include "RateModel.h"

#ifdef BIGTREE
#include "gmpfrxx/gmpfrxx.h"
#endif

class AncSplit{
private:
RateModel * model;
double weight;
#ifdef BIGTREE
mpfr_class likelihood;
#else
double likelihood;
#endif
Superdouble likelihood;

public:
AncSplit(RateModel * mod,int,int,int,double);
AncSplit(RateModel * mod,int,int,int,Superdouble);
RateModel * getModel();
double getWeight();
#ifdef BIGTREE
mpfr_class getLikelihood();
void setLikelihood(mpfr_class li);
#else
double getLikelihood();
void setLikelihood(double li);
#endif
Superdouble getLikelihood();
void setLikelihood(Superdouble li);
int ancdistint;
int ldescdistint;
int rdescdistint;
Expand Down

0 comments on commit 72a2385

Please sign in to comment.