use of de.lmu.ifi.dbs.elki.database.ids.ModifiableDoubleDBIDList in project elki by elki-project.
the class AbstractDistanceRangeQuery method getRangeForObject.
@Override
public DoubleDBIDList getRangeForObject(O obj, double range) {
ModifiableDoubleDBIDList ret = DBIDUtil.newDistanceDBIDList();
getRangeForObject(obj, range, ret);
ret.sort();
return ret;
}
use of de.lmu.ifi.dbs.elki.database.ids.ModifiableDoubleDBIDList in project elki by elki-project.
the class AbstractDistanceRangeQuery method getRangeForDBID.
@Override
public DoubleDBIDList getRangeForDBID(DBIDRef id, double range) {
ModifiableDoubleDBIDList ret = DBIDUtil.newDistanceDBIDList();
getRangeForObject(getRelation().get(id), range, ret);
ret.sort();
return ret;
}
use of de.lmu.ifi.dbs.elki.database.ids.ModifiableDoubleDBIDList in project elki by elki-project.
the class AbstractSimilarityRangeQuery method getRangeForDBID.
@Override
public DoubleDBIDList getRangeForDBID(DBIDRef id, double range) {
ModifiableDoubleDBIDList ret = DBIDUtil.newDistanceDBIDList();
getRangeForObject(relation.get(id), range, ret);
ret.sort();
return ret;
}
use of de.lmu.ifi.dbs.elki.database.ids.ModifiableDoubleDBIDList in project elki by elki-project.
the class LinearScanEuclideanDistanceRangeQuery method getRangeForObject.
@Override
public DoubleDBIDList getRangeForObject(O obj, double range) {
final Relation<? extends O> relation = getRelation();
ModifiableDoubleDBIDList result = DBIDUtil.newDistanceDBIDList();
linearScan(relation, relation.iterDBIDs(), obj, range, result);
result.sort();
return result;
}
use of de.lmu.ifi.dbs.elki.database.ids.ModifiableDoubleDBIDList in project elki by elki-project.
the class LinearScanEuclideanDistanceRangeQuery method getRangeForDBID.
@Override
public DoubleDBIDList getRangeForDBID(DBIDRef id, double range) {
final Relation<? extends O> relation = getRelation();
// Note: subtle optimization. Get "id" only once!
final O obj = relation.get(id);
ModifiableDoubleDBIDList result = DBIDUtil.newDistanceDBIDList();
linearScan(relation, relation.iterDBIDs(), obj, range, result);
result.sort();
return result;
}
Aggregations