docs: protected double getConnectionValue(CMMPoint cmmp, int clusterID){
          AutoExpandVector<Double> knnDist = new AutoExpandVector<Double>();
          AutoExpandVector<Integer> knnPointIndex = new AutoExpandVector<Integer>();
          
          //calculate the knn distance of the point to the cluster
          getKnnInCluster(cmmp, knnNeighbourhood, gt0Clusters.get(clusterID).points, knnDist, knnPointIndex);
  
          //TODO: What to do if we have less then k neighbors?
          double avgDist = 0;
          for (int i = 0; i < knnDist.size(); i++) {
              avgDist+= knnDist.get(i);
          }
          //what to do if we only have a single point???
          if(knnDist.size()!=0)
              avgDist/=knnDist.size();
          else
              return 0;
  
          //get the upper knn distance of the cluster
          double upperKnn = gt0Clusters.get(clusterID).knnMeanAvg + gt0Clusters.get(clusterID).knnDevAvg;
          
          /* calculate the connectivity based on knn distance of the point within the cluster
             and the upper knn distance of the cluster*/ 
          if(avgDist < upperKnn){
              return 1;
          }
          else{
              //value that should be reached at upperKnn distance
              //Choose connection formula
              double conn;
              if(useExpConnectivity)
                  conn = Math.pow(2,-lamdaConn*(avgDist-upperKnn)/upperKnn);
              else
                  conn = upperKnn/avgDist;
  
              if(Double.isNaN(conn))
                  System.out.println("Connectivity NaN at "+cmmp.p.getTimestamp());
  
              return conn;
          }
      }