public class MetaObjectParametricArrayTotalMin extends MetaObjectParametricArray
MetaObjectArray
that implements the distance
as minimum of the distances between all pairs (from this object and the other
MetaObjectArray
object). Note that only objects that have the
same class are measured.LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
objects
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Modifier | Constructor and Description |
---|---|
|
MetaObjectParametricArrayTotalMin(AbstractObjectKey objectKey,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
LocalAbstractObject... objects)
Creates a new instance of MetaObjectParametricArrayTotalMin.
|
protected |
MetaObjectParametricArrayTotalMin(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of MetaObjectParametricArrayTotalMin loaded from binary input.
|
|
MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream)
Creates a new instance of MetaObjectParametricArrayTotalMin from the given text stream with header.
|
|
MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream,
java.lang.Class<? extends LocalAbstractObject>[] classes)
Creates a new instance of MetaObjectParametricArrayTotalMin from the given text stream.
|
|
MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
java.lang.Class<? extends LocalAbstractObject>[] classes)
Creates a new instance of MetaObjectParametricArrayTotalMin from the given text stream.
|
|
MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
int objectCount,
java.lang.Class<? extends LocalAbstractObject> objectClass)
Creates a new instance of MetaObjectParametricArrayTotalMin from the given text stream.
|
|
MetaObjectParametricArrayTotalMin(java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
LocalAbstractObject... objects)
Creates a new instance of MetaObjectParametricArrayTotalMin.
|
|
MetaObjectParametricArrayTotalMin(java.lang.String locatorURI,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
LocalAbstractObject... objects)
Creates a new instance of MetaObjectParametricArrayTotalMin.
|
|
MetaObjectParametricArrayTotalMin(java.lang.String locatorURI,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
java.util.Map<java.lang.String,? extends LocalAbstractObject> objects,
java.lang.String... objectNames)
Creates a new instance of MetaObjectParametricArrayTotalMin that takes the objects from the given map.
|
Modifier and Type | Method and Description |
---|---|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float[] metaDistances,
float distThreshold)
The actual implementation of the metric function.
|
float |
getMaxDistance()
Returns a maximal possible distance for this class.
|
protected static float |
getMinNormDistanceToArray(LocalAbstractObject o1,
LocalAbstractObject o2,
float distThreshold)
Returns the normalized distance between object
o1 and o2 . |
binarySerialize, getBinarySize, getObject, getObject, getObjectCount, getObjectMap, getObjectName, getObjectNames, getObjects, writeDataImpl
clearSurplusData, containsParameter, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, parseObjectComment, removeParameter, setParameter, writeData
containsObject, createMetaDistancesHolder, createSearchMetaObject, dataEquals, dataHashCode, fillMetaDistances, fillMetaDistances, getDistanceImpl, getObjectFromMap, getSize, implementationGetDistance, readObject, readObject, readObjects, readObjects, readObjectsHeader, toString, writeObjects, writeObjectsHeader
clone, clone, cloneRandomlyModify, create, create, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public MetaObjectParametricArrayTotalMin(java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, LocalAbstractObject... objects)
additionalParameters
- additional parameters for this meta objectobjects
- the encapsulated list of objectspublic MetaObjectParametricArrayTotalMin(AbstractObjectKey objectKey, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, LocalAbstractObject... objects)
objectKey
- the key to be associated with this objectadditionalParameters
- additional parameters for this meta objectobjects
- the encapsulated list of objectspublic MetaObjectParametricArrayTotalMin(java.lang.String locatorURI, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, LocalAbstractObject... objects)
AbstractObjectKey
is generated for
the specified locatorURI
.locatorURI
- the locator URI for the new objectadditionalParameters
- additional parameters for this meta objectobjects
- the encapsulated list of objectspublic MetaObjectParametricArrayTotalMin(java.lang.String locatorURI, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, java.util.Map<java.lang.String,? extends LocalAbstractObject> objects, java.lang.String... objectNames)
objectNames
array. Note that if the object of a given
name is not in the map, null is inserted into the array.
A new unique object ID is generated and a new AbstractObjectKey
is
generated for the specified locatorURI
.locatorURI
- the locator URI for the new objectadditionalParameters
- additional parameters for this meta objectobjects
- the map with named objects to encapsulateobjectNames
- the names of the objects to take from the given objects
mappublic MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream) throws java.io.IOException
stream
- the text stream to read the objects fromjava.io.IOException
- when an error appears during reading from given stream,
EOFException is returned if end of the given stream is reached.MetaObject.readObjectsHeader(java.io.BufferedReader)
public MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream, java.lang.Class<? extends LocalAbstractObject>[] classes) throws java.io.IOException
stream
- the text stream to read the objects fromclasses
- the classes of the objects to read from the streamjava.io.IOException
- when an error appears during reading from given stream,
EOFException is returned if end of the given stream is reached.public MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, java.lang.Class<? extends LocalAbstractObject>[] classes) throws java.io.IOException
stream
- the text stream to read the objects fromadditionalParameters
- additional parameters for this meta objectclasses
- the classes of the objects to read from the streamjava.io.IOException
- when an error appears during reading from given stream,
EOFException is returned if end of the given stream is reached.public MetaObjectParametricArrayTotalMin(java.io.BufferedReader stream, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, int objectCount, java.lang.Class<? extends LocalAbstractObject> objectClass) throws java.io.IOException
stream
- the text stream to read the objects fromadditionalParameters
- additional parameters for this meta objectobjectCount
- number of objects to readobjectClass
- the class of objects to read from the streamjava.io.IOException
- when an error appears during reading from given stream,
EOFException is returned if end of the given stream is reached.protected MetaObjectParametricArrayTotalMin(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the input to read the MetaObject fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the bufferpublic float getMaxDistance()
LocalAbstractObject
LocalAbstractObject.MAX_DISTANCE
.getMaxDistance
in class LocalAbstractObject
protected float getDistanceImpl(LocalAbstractObject obj, float[] metaDistances, float distThreshold)
obj
is returned as the resulting distance. If the
obj
is also MetaObjectParametricArray
, the distance
is computed to all compatible encapsulated objects.getDistanceImpl
in class MetaObjectParametricArray
obj
- the object to compute distance tometaDistances
- the array that is filled with the distances of the respective encapsulated objects, if it is not nulldistThreshold
- the threshold value on the distanceobj
if the distance is lower than distThreshold
LocalAbstractObject.getDistance
protected static float getMinNormDistanceToArray(LocalAbstractObject o1, LocalAbstractObject o2, float distThreshold)
o1
and o2
.
If object o2
is instance of MetaObjectParametricArray
,
the minimal distance between o1 and all non-null,
distance compatible
objects in o2
array is returned.o1
- the object from which to compute the distanceo2
- the object to which to compute the distance (special if o2 is MetaObjectParametricArray
)distThreshold
- the threshold value on the distance (should be normalized, i.e. 0 <= distThreshold <= 1
)o1
and (all) o2
;
if all encapsulated objects in o2
are null or not
compatible with the o1
, the LocalAbstractObject.MAX_DISTANCE
is returned