macroevolution / bamm

A program for multimodel inference on speciation and trait evolution
GNU General Public License v2.0
33 stars 10 forks source link

New class implementation for all prior calculations #63

Closed drabosky closed 10 years ago

drabosky commented 10 years ago

I implemented (and pushed) a new class. Sorry for not branching first but anyway….

The idea is that all calculations of prior probabilities and all generation of random variables from prior distributions should be handled by a special class, Prior. This makes it much easier to change the details of prior distributions etc without worrying about the details within class Model and TraitModel.

In Model, there is a reference to class prior called cprior.

I have not finished implementing this. Now, it only works for prior calculations in Model (not traitModel) and only in the following functions:

updateLambdaInitMH updateLambdaShiftMH updateMuInitMH updateMuShiftMH updateEventRateMH computeLogPrior

any calculations involving priors not in those fxns need updated

I tested it though fixing random seed and it gives identical results to the previous version

drabosky commented 10 years ago

I also updated cmake file. Should be able to build after pulling latest