public class DistanceFunctionMultiObjectMetaAggregation extends java.lang.Object implements DistanceFunctionMultiObject<MetaObject>, java.io.Serializable
multi-object distance function
for MetaObject
s without their own metric function.
It computes a distances between the respective query objects and a given object
using AggregationFunction
. The resulting individual query-object distances
are then aggregated using DistanceFunctionMultiObjectAggregation
.Constructor and Description |
---|
DistanceFunctionMultiObjectMetaAggregation(DistanceFunctionMultiObjectAggregation multiObjectAggregation,
AggregationFunction metaObjectAggregationDistance)
Creates a new DistanceFunctionMultiObjectMetaAggregation with the given aggregation functions.
|
Modifier and Type | Method and Description |
---|---|
float |
getDistanceMultiObject(java.util.Collection<? extends MetaObject> objects,
MetaObject object,
float[] individualDistances)
Measures the distance between all the objects in set (the first argument) and
the specified object (the second argument).
|
java.lang.Class<? extends MetaObject> |
getDistanceObjectClass()
Returns the type of objects that this distance function accepts as arguments.
|
public DistanceFunctionMultiObjectMetaAggregation(DistanceFunctionMultiObjectAggregation multiObjectAggregation, AggregationFunction metaObjectAggregationDistance) throws java.lang.NullPointerException
multiObjectAggregation
- the distance aggregation for the distances to the respective query objectsmetaObjectAggregationDistance
- the distance function to compute single distance between one query object and the given objectjava.lang.NullPointerException
- if any of the two given aggregations is nullpublic float getDistanceMultiObject(java.util.Collection<? extends MetaObject> objects, MetaObject object, float[] individualDistances) throws java.lang.IndexOutOfBoundsException
DistanceFunctionMultiObject
individualDistances
will be filled with the
distances to the individual objects in the set.getDistanceMultiObject
in interface DistanceFunctionMultiObject<MetaObject>
objects
- the set of objects for which to measure the distance to the second parameterobject
- the object for which to measure the distanceindividualDistances
- the array to fill with the distances to the respective objects from the set;
if not null, it must have the same number of allocated elements as the number of the set of objectsobjects
and the object
java.lang.IndexOutOfBoundsException
- if the passed individualDistances
array is not big enoughpublic java.lang.Class<? extends MetaObject> getDistanceObjectClass()
DistanceFunctionMultiObject
getDistanceObjectClass
in interface DistanceFunctionMultiObject<MetaObject>