code: protected static double calculateLrd(LofPoint basePoint, LofDataSet dataSet)
      {
          int countedData = 0;
          double totalAmount = 0.0d;
  
          for (String targetDataId : basePoint.getkDistanceNeighbor())
          {
              LofPoint targetPoint = dataSet.getDataMap().get(targetDataId);
  
              if (targetPoint == null)
              {
                  continue;
              }
  
              double reachDist = calculateReachDistance(basePoint, targetPoint);
              totalAmount = totalAmount + reachDist;
              countedData++;
          }
  
          if (totalAmount == 0.0d)
          {
              return totalAmount;
          }
  
          return (countedData) / totalAmount;
      }
docs: basePointに対する局所到達可能密度(Local reachability density)を算出する。
  
  @param basePoint 算出元対象点
  @param dataSet 全体データ
  @return 局所到達可能密度