public void NonGaussianLocalDensity(double distanceThreshold)
{
int ncol = this.Segments.Count;
int nrow = this.Segments.Count;
this.Rho = new List<double>(nrow);
for (int iRho = 0; iRho < nrow; iRho++)
this.Rho.Add(0);
int i = 0;
for (int col = 0; col < ncol; col++)
{
for (int row = col + 1; row < nrow; row++)
{
if (this.Distance[i].HasValue)
{
if (this.Distance[i] < distanceThreshold)
{
this.Rho[row] += 1;
this.Rho[col] += 1;
}
}
i++;
}
}
}