de.lmu.ifi.dbs.elki.database.query.distance
Class PrimitiveDistanceSimilarityQuery<O,D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
      extended by de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
          extended by de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceQuery<O,D>
              extended by de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceSimilarityQuery<O,D>
Type Parameters:
O - Object type
D - Distance type
All Implemented Interfaces:
DatabaseQuery, DistanceQuery<O,D>, DistanceSimilarityQuery<O,D>, SimilarityQuery<O,D>

public class PrimitiveDistanceSimilarityQuery<O,D extends Distance<D>>
extends PrimitiveDistanceQuery<O,D>
implements DistanceSimilarityQuery<O,D>

Combination query class, for convenience.


Field Summary
private  PrimitiveSimilarityFunction<? super O,D> similarityFunction
          Typed reference to the similarity function (usually the same as the distance function!)
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceQuery
distanceFunction
 
Fields inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
relation
 
Fields inherited from interface de.lmu.ifi.dbs.elki.database.query.DatabaseQuery
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
 
Constructor Summary
PrimitiveDistanceSimilarityQuery(Relation<? extends O> relation, PrimitiveDistanceFunction<? super O,D> distanceFunction, PrimitiveSimilarityFunction<? super O,D> similarityFunction)
          Constructor.
 
Method Summary
 D similarity(DBID id1, DBID id2)
          Returns the similarity between the two objects specified by their object ids.
 D similarity(DBID id1, O o2)
          Returns the similarity between the two objects specified by their object ids.
 D similarity(O o1, DBID id2)
          Returns the similarity between the two objects specified by their object ids.
 D similarity(O o1, O o2)
          Returns the similarity between the two objects specified by their object ids.
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceQuery
distance, distance, distance, distance, getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance
 
Methods inherited from class de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery
getRelation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.database.query.distance.DistanceQuery
distance, distance, distance, distance, getDistanceFactory, getDistanceFunction, getRelation, infiniteDistance, nullDistance, undefinedDistance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.database.query.similarity.SimilarityQuery
getDistanceFactory, getRelation
 

Field Detail

similarityFunction

private PrimitiveSimilarityFunction<? super O,D extends Distance<D>> similarityFunction
Typed reference to the similarity function (usually the same as the distance function!)

Constructor Detail

PrimitiveDistanceSimilarityQuery

public PrimitiveDistanceSimilarityQuery(Relation<? extends O> relation,
                                        PrimitiveDistanceFunction<? super O,D> distanceFunction,
                                        PrimitiveSimilarityFunction<? super O,D> similarityFunction)
Constructor.

Parameters:
relation - Representation
distanceFunction - distance function
similarityFunction - similarity function (usually the same as the distance function!)
Method Detail

similarity

public D similarity(DBID id1,
                    DBID id2)
Description copied from interface: SimilarityQuery
Returns the similarity between the two objects specified by their object ids.

Specified by:
similarity in interface SimilarityQuery<O,D extends Distance<D>>
Parameters:
id1 - first object id
id2 - second object id
Returns:
the similarity between the two objects specified by their object ids

similarity

public D similarity(O o1,
                    DBID id2)
Description copied from interface: SimilarityQuery
Returns the similarity between the two objects specified by their object ids.

Specified by:
similarity in interface SimilarityQuery<O,D extends Distance<D>>
Parameters:
o1 - first object
id2 - second object id
Returns:
the similarity between the two objects specified by their object ids

similarity

public D similarity(DBID id1,
                    O o2)
Description copied from interface: SimilarityQuery
Returns the similarity between the two objects specified by their object ids.

Specified by:
similarity in interface SimilarityQuery<O,D extends Distance<D>>
Parameters:
id1 - first object id
o2 - second object
Returns:
the similarity between the two objects specified by their object ids

similarity

public D similarity(O o1,
                    O o2)
Description copied from interface: SimilarityQuery
Returns the similarity between the two objects specified by their object ids.

Specified by:
similarity in interface SimilarityQuery<O,D extends Distance<D>>
Parameters:
o1 - first object
o2 - second object
Returns:
the similarity between the two objects specified by their object ids

Release 0.4.0 (2011-09-20_1324)