public double getDistance(Node a, Node b ) { if( a!=null && b!= null ) includeNodes( a, b ); double penalty = Math.max(0.0,1.0-((double) total)/((double) C)); double distance= penalty+(1.0-penalty)*((double) (mismatched))/((double) total); resetDistance(); return totalMismatch ? 1.0 : distance;
public double getDistance() { return getDistance(null,null);
  public double getDistance(Node a, Node b ) {    if( a!=null && b!= null )      includeNodes( a, b );    double penalty = Math.max(0.0,1.0-((double) total)/((double) C));    double distance= penalty+(1.0-penalty)*((double) (mismatched))/((double) total);    resetDistance();    return totalMismatch ? 1.0 : distance;  }