src/main/java/pt/it/av/tnav/ml/clustering/density/DBSCAN.java
private <D extends Distance<D>> List<Integer> rangeQuery(final int idx, final List<D> dps,
                                                           final double eps) {
    List<Integer> rv = new ArrayList<>();
    D dp = dps.get(idx);

    for(int i = 0;  i < dps.size(); i++) {
      if(i != idx && dp.distanceTo(dps.get(i)) <= eps) {
        rv.add(i);
      }
    }

    return rv;
  }
/**
   * Returns a list with the indexes of the closest neighbors.
   * This method implements the sequencial search.
   *
   * @param idx
   * @param dps
   * @param eps
   * @param <D>
   * @return
   */
Returns a list with the indexes of the closest neighbors.
This method implements the sequencial search.


Returns a list with the indexes of the closest neighbors . This method implements the sequencial search .
private <D extends Distance<D>> List<Integer> rangeQuery(final int idx, final List<D> dps,
                                                           final double eps) {
    List<Integer> rv = new ArrayList<>();
    D dp = dps.get(idx);
    for(int i = 0;  i < dps.size(); i++) {
      if(i != idx && dp.distanceTo(dps.get(i)) <= eps) {
        rv.add(i);
      }
    }
    return rv;
  }
private < D extends Distance < D > > List < Integer > rangeQuery ( final int idx , final List < D > dps , final double eps ) { List < Integer > rv = new ArrayList < > ( ) ; D dp = dps . get ( idx ) ; for ( int i = 0 ; i < dps . size ( ) ; i ++ ) { if ( i != idx && dp . distanceTo ( dps . get ( i ) ) <= eps ) { rv . add ( i ) ; } } return rv ; }
Returns a list with the indexes of the closest neighbors.
Returns a list with the indexes of the closest neighbors .