protected void expandCluster(Relation<O> relation,RangeQuery<O> rangeQuery,DBIDRef startObjectID,ArrayModifiableDBIDs seeds,FiniteProgress objprog,IndefiniteProgress clusprog){
  DoubleDBIDList neighbors=rangeQuery.getRangeForDBID(startObjectID,epsilon);
  ncounter+=neighbors.size();
  if (neighbors.size() < minpts) {
    noise.add(startObjectID);
    processedIDs.add(startObjectID);
    if (objprog != null) {
      objprog.incrementProcessed(LOG);
    }
    return;
  }
  ModifiableDBIDs currentCluster=DBIDUtil.newArray();
  currentCluster.add(startObjectID);
  processedIDs.add(startObjectID);
  assert (seeds.size() == 0);
  seeds.clear();
  processNeighbors(neighbors.iter(),currentCluster,seeds);
  DBIDVar o=DBIDUtil.newVar();
  while (!seeds.isEmpty()) {
    neighbors=rangeQuery.getRangeForDBID(seeds.pop(o),epsilon);
    ncounter+=neighbors.size();
    if (neighbors.size() >= minpts) {
      processNeighbors(neighbors.iter(),currentCluster,seeds);
    }
    if (objprog != null) {
      objprog.incrementProcessed(LOG);
    }
  }
  resultList.add(currentCluster);
  if (clusprog != null) {
    clusprog.setProcessed(resultList.size(),LOG);
  }
}

protected void expandCluster ( Relation < O > relation , RangeQuery < O > rangeQuery , DBIDRef startObjectID , ArrayModifiableDBIDs seeds , FiniteProgress objprog , IndefiniteProgress clusprog ) { DoubleDBIDList neighbors = rangeQuery . getRangeForDBID ( startObjectID , epsilon ) ; ncounter += neighbors . size ( ) ; if ( neighbors . size ( ) < minpts ) { noise . add ( startObjectID ) ; processedIDs . add ( startObjectID ) ; if ( objprog != null ) { objprog . incrementProcessed ( LOG ) ; } return ; } ModifiableDBIDs currentCluster = DBIDUtil . newArray ( ) ; currentCluster . add ( startObjectID ) ; processedIDs . add ( startObjectID ) ; assert ( seeds . size ( ) == 0 ) ; seeds . clear ( ) ; processNeighbors ( neighbors . iter ( ) , currentCluster , seeds ) ; DBIDVar o = DBIDUtil . newVar ( ) ; while ( ! seeds . isEmpty ( ) ) { neighbors = rangeQuery . getRangeForDBID ( seeds . pop ( o ) , epsilon ) ; ncounter += neighbors . size ( ) ; if ( neighbors . size ( ) >= minpts ) { processNeighbors ( neighbors . iter ( ) , currentCluster , seeds ) ; } if ( objprog != null ) { objprog . incrementProcessed ( LOG ) ; } } resultList . add ( currentCluster ) ; if ( clusprog != null ) { clusprog . setProcessed ( resultList . size ( ) , LOG ) ; } }
dbscan - function expandcluster . border - objects become members of the first possible cluster .
