de.lmu.ifi.dbs.elki.data.type
Class VectorFieldTypeInformation<V extends FeatureVector<?,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.type.SimpleTypeInformation<V>
      extended by de.lmu.ifi.dbs.elki.data.type.VectorTypeInformation<V>
          extended by de.lmu.ifi.dbs.elki.data.type.VectorFieldTypeInformation<V>
Type Parameters:
V - Vector type
All Implemented Interfaces:
TypeInformation

public class VectorFieldTypeInformation<V extends FeatureVector<?,?>>
extends VectorTypeInformation<V>

Type information to specify that a type has a fixed dimensionality.


Field Summary
private  V factory
          Object factory for producing new instances
private  String[] labels
          Labels
 
Fields inherited from class de.lmu.ifi.dbs.elki.data.type.VectorTypeInformation
maxdim, mindim
 
Constructor Summary
VectorFieldTypeInformation(Class<? super V> cls)
          Constructor for a request without fixed dimensionality.
VectorFieldTypeInformation(Class<? super V> cls, int dim)
          Constructor for a request with fixed dimensionality.
VectorFieldTypeInformation(Class<? super V> cls, int mindim, int maxdim)
          Constructor for a request with minimum and maximum dimensionality.
VectorFieldTypeInformation(Class<? super V> cls, int dim, String[] labels, V factory)
          Constructor with given dimensionality and factory, so usually an instance.
VectorFieldTypeInformation(Class<? super V> cls, int dim, V factory)
          Constructor with given dimensionality and factory, so usually an instance.
 
Method Summary
 int dimensionality()
          Get the dimensionality of the type.
static
<T extends FeatureVector<?,?>>
VectorFieldTypeInformation<T>
get(Class<T> cls)
          Pseudo constructor that is often convenient to use when T is not completely known.
static
<T extends FeatureVector<?,?>>
VectorFieldTypeInformation<T>
get(Class<T> cls, int dim)
          Pseudo constructor that is often convenient to use when T is not completely known, but the dimensionality is fixed.
 V getFactory()
          Get the object type factory.
 String getLabel(int col)
          Get the column label
 boolean isAssignableFromType(TypeInformation type)
          Test whether this type is assignable from another type.
 String toString()
           
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.type.VectorTypeInformation
get, isAssignableFrom, maxdim, mindim
 
Methods inherited from class de.lmu.ifi.dbs.elki.data.type.SimpleTypeInformation
cast, getLabel, getRestrictionClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

factory

private final V extends FeatureVector<?,?> factory
Object factory for producing new instances


labels

private String[] labels
Labels

Constructor Detail

VectorFieldTypeInformation

public VectorFieldTypeInformation(Class<? super V> cls)
Constructor for a request without fixed dimensionality.

Parameters:
cls - Vector restriction class.

VectorFieldTypeInformation

public VectorFieldTypeInformation(Class<? super V> cls,
                                  int dim)
Constructor for a request with fixed dimensionality.

Parameters:
cls - Vector restriction class.
dim - Dimensionality request

VectorFieldTypeInformation

public VectorFieldTypeInformation(Class<? super V> cls,
                                  int mindim,
                                  int maxdim)
Constructor for a request with minimum and maximum dimensionality.

Parameters:
cls - Vector restriction class.
mindim - Minimum dimensionality request
maxdim - Maximum dimensionality request

VectorFieldTypeInformation

public VectorFieldTypeInformation(Class<? super V> cls,
                                  int dim,
                                  V factory)
Constructor with given dimensionality and factory, so usually an instance.

Parameters:
cls - Restriction java class
dim - Dimensionality
factory - Factory class

VectorFieldTypeInformation

public VectorFieldTypeInformation(Class<? super V> cls,
                                  int dim,
                                  String[] labels,
                                  V factory)
Constructor with given dimensionality and factory, so usually an instance.

Parameters:
cls - Restriction java class
dim - Dimensionality
labels - Labels
factory - Factory class
Method Detail

isAssignableFromType

public boolean isAssignableFromType(TypeInformation type)
Description copied from interface: TypeInformation
Test whether this type is assignable from another type.

Specified by:
isAssignableFromType in interface TypeInformation
Overrides:
isAssignableFromType in class VectorTypeInformation<V extends FeatureVector<?,?>>
Parameters:
type - Other type
Returns:
true when the other type is accepted as subtype.

dimensionality

public int dimensionality()
Get the dimensionality of the type.

Returns:
dimensionality

getFactory

public V getFactory()
Get the object type factory.

Returns:
the factory

get

public static <T extends FeatureVector<?,?>> VectorFieldTypeInformation<T> get(Class<T> cls)
Pseudo constructor that is often convenient to use when T is not completely known.

Type Parameters:
T - Type
Parameters:
cls - Class restriction
Returns:
Type

get

public static <T extends FeatureVector<?,?>> VectorFieldTypeInformation<T> get(Class<T> cls,
                                                                               int dim)
Pseudo constructor that is often convenient to use when T is not completely known, but the dimensionality is fixed.

Type Parameters:
T - Type
Parameters:
cls - Class restriction
dim - Dimensionality (exact)
Returns:
Type

toString

public String toString()
Overrides:
toString in class VectorTypeInformation<V extends FeatureVector<?,?>>

getLabel

public String getLabel(int col)
Get the column label

Parameters:
col - Column number
Returns:
Label

Release 0.4.0 (2011-09-20_1324)