de.lmu.ifi.dbs.elki.distance.distancevalue
Class PCACorrelationDistance

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance<D>
      extended by de.lmu.ifi.dbs.elki.distance.distancevalue.CorrelationDistance<PCACorrelationDistance>
          extended by de.lmu.ifi.dbs.elki.distance.distancevalue.PCACorrelationDistance
All Implemented Interfaces:
Distance<PCACorrelationDistance>, Externalizable, Serializable, Comparable<PCACorrelationDistance>

public class PCACorrelationDistance
extends CorrelationDistance<PCACorrelationDistance>

The correlation distance is a special Distance that indicates the dissimilarity between correlation connected objects. The correlation distance between two points is a pair consisting of the correlation dimension of two points and the euclidean distance between the two points.

See Also:
Serialized Form

Field Summary
static PCACorrelationDistance FACTORY
          The static factory instance
private static long serialVersionUID
          Serial
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.CorrelationDistance
CORRELATION_DISTANCE_PATTERN, correlationValue, euclideanValue, SEPARATOR
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance
DOUBLE_PATTERN, INFINITY_PATTERN, INTEGER_PATTERN
 
Constructor Summary
PCACorrelationDistance()
          Empty constructor for serialization purposes.
PCACorrelationDistance(int correlationValue, double euclideanValue)
          Constructs a new CorrelationDistance object consisting of the specified correlation value and euclidean value.
 
Method Summary
 Pattern getPattern()
          Get the pattern accepted by this distance
 PCACorrelationDistance infiniteDistance()
          Provides an infinite distance.
 boolean isInfiniteDistance()
          Returns true, if the distance is an infinite distance, false otherwise.
 boolean isNullDistance()
          Returns true, if the distance is a null distance, false otherwise.
 boolean isUndefinedDistance()
          Returns true, if the distance is an undefined distance, false otherwise.
 PCACorrelationDistance minus(PCACorrelationDistance distance)
          Returns a new Distance by subtracting the given distance from this distance.
 PCACorrelationDistance nullDistance()
          Provides a null distance.
 PCACorrelationDistance parseString(String val)
          Provides a distance suitable to this DistanceFunction based on the given pattern.
 PCACorrelationDistance plus(PCACorrelationDistance distance)
          Returns a new distance as sum of this distance and the given distance.
 PCACorrelationDistance undefinedDistance()
          Provides an undefined distance.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.CorrelationDistance
compareTo, equals, externalizableSize, getCorrelationValue, getEuclideanValue, hashCode, readExternal, toString, writeExternal
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancevalue.AbstractDistance
requiredInputPattern, testInputPattern
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FACTORY

public static final PCACorrelationDistance FACTORY
The static factory instance


serialVersionUID

private static final long serialVersionUID
Serial

See Also:
Constant Field Values
Constructor Detail

PCACorrelationDistance

public PCACorrelationDistance()
Empty constructor for serialization purposes.


PCACorrelationDistance

public PCACorrelationDistance(int correlationValue,
                              double euclideanValue)
Constructs a new CorrelationDistance object consisting of the specified correlation value and euclidean value.

Parameters:
correlationValue - the correlation dimension to be represented by the CorrelationDistance
euclideanValue - the euclidean distance to be represented by the CorrelationDistance
Method Detail

parseString

public PCACorrelationDistance parseString(String val)
                                   throws IllegalArgumentException
Provides a distance suitable to this DistanceFunction based on the given pattern.

Parameters:
val - A pattern defining a distance suitable to this DistanceFunction
Returns:
a distance suitable to this DistanceFunction based on the given pattern
Throws:
IllegalArgumentException - if the given pattern is not compatible with the requirements of this DistanceFunction

getPattern

public Pattern getPattern()
Description copied from class: AbstractDistance
Get the pattern accepted by this distance

Specified by:
getPattern in class AbstractDistance<PCACorrelationDistance>
Returns:
Pattern

infiniteDistance

public PCACorrelationDistance infiniteDistance()
Provides an infinite distance.

Returns:
an infinite distance

nullDistance

public PCACorrelationDistance nullDistance()
Provides a null distance.

Returns:
a null distance

undefinedDistance

public PCACorrelationDistance undefinedDistance()
Provides an undefined distance.

Returns:
an undefined distance

plus

public PCACorrelationDistance plus(PCACorrelationDistance distance)
Description copied from interface: Distance
Returns a new distance as sum of this distance and the given distance.

Parameters:
distance - the distance to be added to this distance
Returns:
a new distance as sum of this distance and the given distance

minus

public PCACorrelationDistance minus(PCACorrelationDistance distance)
Description copied from interface: Distance
Returns a new Distance by subtracting the given distance from this distance.

Parameters:
distance - the distance to be subtracted from this distance
Returns:
a new Distance by subtracting the given distance from this distance

isInfiniteDistance

public boolean isInfiniteDistance()
Description copied from interface: Distance
Returns true, if the distance is an infinite distance, false otherwise.

Specified by:
isInfiniteDistance in interface Distance<PCACorrelationDistance>
Overrides:
isInfiniteDistance in class AbstractDistance<PCACorrelationDistance>
Returns:
true, if the distance is an infinite distance, false otherwise

isNullDistance

public boolean isNullDistance()
Description copied from interface: Distance
Returns true, if the distance is a null distance, false otherwise.

Specified by:
isNullDistance in interface Distance<PCACorrelationDistance>
Overrides:
isNullDistance in class AbstractDistance<PCACorrelationDistance>
Returns:
true, if the distance is a null distance, false otherwise

isUndefinedDistance

public boolean isUndefinedDistance()
Description copied from interface: Distance
Returns true, if the distance is an undefined distance, false otherwise.

Specified by:
isUndefinedDistance in interface Distance<PCACorrelationDistance>
Overrides:
isUndefinedDistance in class AbstractDistance<PCACorrelationDistance>
Returns:
true, if the distance is an undefined distance, false otherwise

Release 0.4.0 (2011-09-20_1324)