/**
* compute cosine distance matrix for a given contact matrix and create a
* UPGMA tree
+ *
* @param cm
- * @param cosineOrDifference false - dot product : true - L1
+ * @param cosineOrDifference
+ * false - dot product : true - L1
*/
public AverageDistanceEngine(AlignmentViewport av, AlignmentAnnotation aa,
ContactMatrixI cm, boolean cosineOrDifference)
this.av = av;
this.aa = aa;
this.cm = cm;
- mode = (cosineOrDifference) ? 1 :0;
+ mode = (cosineOrDifference) ? 1 : 0;
calculate(cm);
}
-
public void calculate(ContactMatrixI cm)
{
this.cm = cm;
// compute distance matrix element
ContactListI ith = cm.getContactList(i);
distances.setValue(i, i, 0);
- if (ith==null)
+ if (ith == null)
{
continue;
}