X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=dlibshuff.cpp;fp=dlibshuff.cpp;h=9db8872abfdab387ed6a71398e570442fee6022d;hp=0000000000000000000000000000000000000000;hb=197c6d3303439582502840980d6a85cf3aab2314;hpb=3329385a816a97bdde934d98a615865c29eaacad diff --git a/dlibshuff.cpp b/dlibshuff.cpp new file mode 100644 index 0000000..9db8872 --- /dev/null +++ b/dlibshuff.cpp @@ -0,0 +1,85 @@ +/* + * DLibshuff.cpp + * Mothur + * + * Created by Pat Schloss on 4/8/09. + * Copyright 2009 Patrick D. Schloss. All rights reserved. + * + */ + +#include "dlibshuff.h" + +/***********************************************************************/ + +DLibshuff::DLibshuff(FullMatrix* D, int it, float step, float co) : Libshuff(D, it, step, co){ + + numDXs = int(cutOff / stepSize); + +} + +/***********************************************************************/ + +float DLibshuff::evaluatePair(int i, int j){ + return dCalculate(i,j); +} + +/***********************************************************************/ + +vector > DLibshuff::evaluateAll(){ + savedMins.resize(numGroups); + vector > dCXYValues(numGroups); + + for(int i=0;i nx = calcN(minX); + vector nxy = calcN(minXY); + + double sum = 0; + + for(int i=0;i DLibshuff::calcN(vector minVector){ + + vector counts(numDXs,0); + + int precision = int(1 / stepSize); + + for(int i=0;i