src/main/java/pt/it/av/tnav/ml/clustering/cluster/Cluster.java
public double avgDistance(D dp) {
    double rv = 0.0;

    for (int i = 0; i < size(); i++) {
      rv += dp.distanceTo(get(i));
    }
    return rv / size();
  }
/**
   * Returns the average distance of a dp point to all the data points in the cluster.
   *
   * @param dp data point (input).
   * @return average distance of a dp point to all the data points in the cluster.
   */
Returns the average distance of a dp point to all the data points in the cluster.
@param dp data point (input).
@return average distance of a dp point to all the data points in the cluster.
Returns the average distance of a dp point to all the data points in the cluster . @param dp data point ( input ) . @return average distance of a dp point to all the data points in the cluster .
public double avgDistance(D dp) {
    double rv = 0.0;
    for (int i = 0; i < size(); i++) {
      rv += dp.distanceTo(get(i));
    }
    return rv / size();
  }
public double avgDistance ( D dp ) { double rv = 0.0 ; for ( int i = 0 ; i < size ( ) ; i ++ ) { rv += dp . distanceTo ( get ( i ) ) ; } return rv / size ( ) ; }
Returns the average distance of a dp point to all the data points in the cluster.
Returns the average distance of a dp point to all the data points in the cluster .