5 * Created by westcott on 12/15/10.
6 * Copyright 2010 Schloss Lab. All rights reserved.
12 /***********************************************************************/
13 EstOutput Hamming::getValues(vector<SharedRAbundVector*> shared) {
21 //calc the 2 denominators
22 for (int i = 0; i < shared[0]->getNumBins(); i++) {
23 int A = shared[0]->getAbundance(i);
24 int B = shared[1]->getAbundance(i);
26 if (A != 0) { numA++; }
27 if (B != 0) { numB++; }
28 if ((A != 0) && (B != 0)) { numShared++; }
31 data[0] = numA + numB - (2 * numShared);
33 if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
38 m->errorOut(e, "Hamming", "getValues");
42 /***********************************************************************/