private int findSplit(ArrayDBIDs order,DBIDArrayIter it,DoubleDataStore lambda){
  int split;
  if (minclusters > 0) {
    split=order.size() > minclusters ? order.size() - minclusters : 0;
    it.seek(split);
    final double stopdist=lambda.doubleValue(it);
    for (it.retract(); it.valid() && stopdist <= lambda.doubleValue(it); it.retract()) {
      split--;
    }
  }
 else   if (!Double.isNaN(threshold)) {
    split=order.size();
    it.seek(split - 1);
    while (it.valid() && threshold <= lambda.doubleValue(it)) {
      split--;
      it.retract();
    }
  }
 else {
    split=0;
  }
  return split;
}

private int findSplit ( ArrayDBIDs order , DBIDArrayIter it , DoubleDataStore lambda ) { int split ; if ( minclusters > 0 ) { split = order . size ( ) > minclusters ? order . size ( ) - minclusters : 0 ; it . seek ( split ) ; final double stopdist = lambda . doubleValue ( it ) ; for ( it . retract ( ) ; it . valid ( ) && stopdist <= lambda . doubleValue ( it ) ; it . retract ( ) ) { split -- ; } } else if ( ! Double . isNaN ( threshold ) ) { split = order . size ( ) ; it . seek ( split - 1 ) ; while ( it . valid ( ) && threshold <= lambda . doubleValue ( it ) ) { split -- ; it . retract ( ) ; } } else { split = 0 ; } return split ; }
find the splitting point in the ordered dbids list .
