Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.database
Class AssociationID<C>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.ConstantObject<AssociationID<C>>
      extended by de.lmu.ifi.dbs.elki.database.AssociationID<C>
Type Parameters:
C - the type of the class of the associated object
All Implemented Interfaces:
Comparable<AssociationID<C>>

public class AssociationID<C>
extends ConstantObject<AssociationID<C>>

An AssociationID is used by databases as a unique identifier for specific associations to single objects. Such as label, local similarity measure. There is no association possible without a specific AssociationID defined within this class.

An AssociationID provides also information concerning the class of the associated objects.

Author:
Arthur Zimek

Field Summary
static AssociationID<Matrix> CACHED_MATRIX
          The association id to associate an arbitrary matrix of an object.
static AssociationID<ClassLabel> CLASS
          The association id to associate a class (class label) to an object.
static AssociationID<DoubleDistance> DOUBLE_DISTANCE
          The association id to associate a DoubleDistance to an object.
static AssociationID<String> EXTERNAL_ID
          The association id to associate an external id to an object.
static AssociationID<KernelMatrix<?>> KERNEL_MATRIX
          The association id to associate a kernel matrix.
static AssociationID<String> LABEL
          The standard association id to associate a label to an object.
static AssociationID<Integer> LOCAL_DIMENSIONALITY
          The association id to associate a local dimensionality (e.g. the correlation dimensionality) to an object.
static AssociationID<PCAFilteredResult> LOCAL_PCA
          The association id to associate a correlation pca to an object.
static AssociationID<Matrix> LOCALLY_WEIGHTED_MATRIX
          The association id to associate the locally weighted matrix of an object for the locally weighted distance function.
static AssociationID<List<AttributeSettings>> META_SETTINGS
          Meta-data: algorithm settings
static AssociationID<List<Integer>> NEIGHBOR_IDS
          The association id to associate the neighbors of an object.
static AssociationID<BitSet> PREFERENCE_VECTOR
          The association id to associate a preference vector.
static AssociationID<List<Double>> PROBABILITY_CLUSTER_I_GIVEN_X
          AssociationID to associate the probabilities for the clusters for a single instance.
static AssociationID<Double> PROBABILITY_X
          AssociationID to associate the prior probability for an instance.
static AssociationID<List<Double>> PROBABILITY_X_GIVEN_CLUSTER_I
          AssociationID to associate the probabilities for an instance given a (set of) distribution(s).
static AssociationID<ArrayList<Integer>> RANKING_LIST
          The association id to associate a set of neighbors for use of the shared nearest neighbor similarity function.
static AssociationID<Integer> ROW_ID
          The association id to associate a row id to an object.
private static long serialVersionUID
          The serial version UID.
static AssociationID<SortedSet<Integer>> SHARED_NEAREST_NEIGHBORS_SET
          The association id to associate a set of neighbors for use of the shared nearest neighbor similarity function.
static AssociationID<Matrix> STRONG_EIGENVECTOR_MATRIX
          The association id to associate the strong eigenvector weighted matrix of an object.
private  Class<C> type
          The Class type related to this AssociationID.
 
Constructor Summary
private AssociationID(String name, Class<?> type)
          Provides a new AssociationID of the given name and type.
 
Method Summary
static AssociationID<?> getAssociationID(String name)
          Returns the AssociationID for the given name if it exists, null otherwise.
 String getLabel()
          Return the name formatted for use in text serialization
static
<C> AssociationID<C>
getOrCreateAssociationID(String name, Class<C> type)
          Gets or creates the AssociationID for the given name and given type.
static
<C> AssociationID<C>
getOrCreateAssociationIDGenerics(String name, Class<?> type)
          Gets or creates the AssociationID for the given name and given type.
 Class<C> getType()
          Returns the type of the AssociationID.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.ConstantObject
compareTo, equals, getName, hashCode, lookup, readResolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL

public static final AssociationID<String> LABEL
The standard association id to associate a label to an object.


CLASS

public static final AssociationID<ClassLabel> CLASS
The association id to associate a class (class label) to an object.


EXTERNAL_ID

public static final AssociationID<String> EXTERNAL_ID
The association id to associate an external id to an object.


ROW_ID

public static final AssociationID<Integer> ROW_ID
The association id to associate a row id to an object.


LOCAL_PCA

public static final AssociationID<PCAFilteredResult> LOCAL_PCA
The association id to associate a correlation pca to an object.


LOCAL_DIMENSIONALITY

public static final AssociationID<Integer> LOCAL_DIMENSIONALITY
The association id to associate a local dimensionality (e.g. the correlation dimensionality) to an object.


NEIGHBOR_IDS

public static final AssociationID<List<Integer>> NEIGHBOR_IDS
The association id to associate the neighbors of an object.


SHARED_NEAREST_NEIGHBORS_SET

public static final AssociationID<SortedSet<Integer>> SHARED_NEAREST_NEIGHBORS_SET
The association id to associate a set of neighbors for use of the shared nearest neighbor similarity function.


RANKING_LIST

public static final AssociationID<ArrayList<Integer>> RANKING_LIST
The association id to associate a set of neighbors for use of the shared nearest neighbor similarity function.


DOUBLE_DISTANCE

public static final AssociationID<DoubleDistance> DOUBLE_DISTANCE
The association id to associate a DoubleDistance to an object.


PROBABILITY_X_GIVEN_CLUSTER_I

public static final AssociationID<List<Double>> PROBABILITY_X_GIVEN_CLUSTER_I
AssociationID to associate the probabilities for an instance given a (set of) distribution(s).


PROBABILITY_X

public static final AssociationID<Double> PROBABILITY_X
AssociationID to associate the prior probability for an instance.


PROBABILITY_CLUSTER_I_GIVEN_X

public static final AssociationID<List<Double>> PROBABILITY_CLUSTER_I_GIVEN_X
AssociationID to associate the probabilities for the clusters for a single instance.


LOCALLY_WEIGHTED_MATRIX

public static final AssociationID<Matrix> LOCALLY_WEIGHTED_MATRIX
The association id to associate the locally weighted matrix of an object for the locally weighted distance function.


PREFERENCE_VECTOR

public static final AssociationID<BitSet> PREFERENCE_VECTOR
The association id to associate a preference vector.


STRONG_EIGENVECTOR_MATRIX

public static final AssociationID<Matrix> STRONG_EIGENVECTOR_MATRIX
The association id to associate the strong eigenvector weighted matrix of an object.


CACHED_MATRIX

public static final AssociationID<Matrix> CACHED_MATRIX
The association id to associate an arbitrary matrix of an object.


KERNEL_MATRIX

public static final AssociationID<KernelMatrix<?>> KERNEL_MATRIX
The association id to associate a kernel matrix.


META_SETTINGS

public static final AssociationID<List<AttributeSettings>> META_SETTINGS
Meta-data: algorithm settings


serialVersionUID

private static final long serialVersionUID
The serial version UID.

See Also:
Constant Field Values

type

private Class<C> type
The Class type related to this AssociationID.

Constructor Detail

AssociationID

private AssociationID(String name,
                      Class<?> type)
Provides a new AssociationID of the given name and type.

All AssociationIDs are unique w.r.t. their name. An AssociationID provides information of which class the associated objects are.

Parameters:
name - name of the association
type - class of the objects that are associated under this AssociationID
Method Detail

getType

public Class<C> getType()
Returns the type of the AssociationID.

Returns:
the type of the AssociationID

getAssociationID

public static AssociationID<?> getAssociationID(String name)
Returns the AssociationID for the given name if it exists, null otherwise.

Parameters:
name - the name of the desired AssociationID
Returns:
the AssociationID for the given name if it exists, null otherwise

getOrCreateAssociationID

public static <C> AssociationID<C> getOrCreateAssociationID(String name,
                                                            Class<C> type)
Gets or creates the AssociationID for the given name and given type.

Type Parameters:
C - association class
Parameters:
name - the name
type - the type of the association
Returns:
the AssociationID for the given name

getOrCreateAssociationIDGenerics

public static <C> AssociationID<C> getOrCreateAssociationIDGenerics(String name,
                                                                    Class<?> type)
Gets or creates the AssociationID for the given name and given type. Generics version, with relaxed typechecking.

Type Parameters:
C - association class
Parameters:
name - the name
type - the type of the association
Returns:
the AssociationID for the given name

getLabel

public String getLabel()
Return the name formatted for use in text serialization

Returns:
uppercased, no whitespace version of the association name.

Release 0.2 (2009-07-06_1820)