}
private LuvPoint getStepFromQeury(CircleList<LuvPoint> cc4, LuvPoint cur, LuvPoint pstep)
{
LuvPoint result = null;
Iterator<LuvPoint> iterator;
if (pstep == null)
{
iterator = cc4.iterator();
Iterable<LuvPoint> nearest4 = clustersMap.getPointsMap().get4Nearest(cur);
LuvPoint in4outer = null;
for (LuvPoint luvPoint : nearest4)
{
if (clustersMap.getAt(luvPoint) != cluster)
{
in4outer = luvPoint;
break;
}
}
if (in4outer != null)
{
iterator = cc4.iterator(in4outer);
}
} else
{
iterator = cc4.iterator(pstep);
}
LuvPoint first = iterator.next();
LuvPoint prev = first;
while (iterator.hasNext())
{
LuvPoint curr = iterator.next();
if (clustersMap.getAt(prev) != cluster && clustersMap.getAt(curr) == cluster)
{
result = curr;
break;
}