File: fromCountTableComponentToDistance2Codon.cpp

package info (click to toggle)
fastml 3.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,772 kB
  • sloc: cpp: 48,522; perl: 3,588; ansic: 819; makefile: 386; python: 83; sh: 55
file content (22 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// $Id: fromCountTableComponentToDistance2Codon.cpp 950 2006-10-19 12:12:34Z eyalprivman $

#include "fromCountTableComponentToDistance2Codon.h"
#include "likeDist2Codon.h"
#include "likeDist.h"
#include <cassert>

fromCountTableComponentToDistance2Codon::fromCountTableComponentToDistance2Codon(
		const countTableComponentGam& ctc,
		const vector<stochasticProcess> &spVec,
		const MDOUBLE toll,
		const MDOUBLE brLenIntialGuess ) : _spVec(spVec), _ctc(ctc) {
	_distance =brLenIntialGuess ;//0.03;
	_toll = toll;
}

void fromCountTableComponentToDistance2Codon::computeDistance() {
	likeDist2Codon likeDist1(_spVec,_toll);
	MDOUBLE initGuess = _distance;
	_distance = likeDist1.giveDistance(_ctc,_likeDistance,initGuess);
	assert(_distance>=0);
}