File: likeDistPropEB.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 (21 lines) | stat: -rw-r--r-- 774 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// $Id: likeDistProp.cpp 962 2006-11-07 15:13:34Z privmane $

#include "likeDistPropEB.h"
#include "numRec.h"

const MDOUBLE likeDistPropEB::giveDistance(	const vector< vector<countTableComponentGamProportional> >& ctc,const int nodeID,
								MDOUBLE& resL,const MDOUBLE initialGuess) const {
	const MDOUBLE ax = _minPairwiseDistance;
	const MDOUBLE bx = initialGuess;
	const MDOUBLE cx = _maxPairwiseDistance;
	const MDOUBLE tol = _toll;
	MDOUBLE dist=-1.0;
	resL = -dbrent(ax,bx,cx,
		  C_evallikeDistPropEB(ctc,_msp,_pProportionDist,nodeID),
		  C_evallikeDistPropEB_d(ctc,_msp,_pProportionDist,nodeID),
		  tol,&dist);
	return dist;
}

// the minus resL = -dbrent because C_evalDist return - value, because it is computing the min not the max...