de.lmu.ifi.dbs.elki.data.type
Class VectorTypeInformation<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>
Type Parameters:
V - Vector type
All Implemented Interfaces:
TypeInformation
Direct Known Subclasses:
VectorFieldTypeInformation

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

Construct a type information for vector spaces with fixed dimensionality.


Field Summary
protected  int maxdim
          Maximum dimensionality
protected  int mindim
          Minimum dimensionality
 
Constructor Summary
VectorTypeInformation(Class<? super V> cls)
          Constructor without size constraints.
VectorTypeInformation(Class<? super V> cls, int mindim, int maxdim)
          Constructor.
 
Method Summary
static
<T extends FeatureVector<?,?>>
VectorTypeInformation<T>
get(Class<T> cls)
          Pseudo constructor that is often convenient to use when T is not completely known.
static
<T extends FeatureVector<?,?>>
VectorTypeInformation<T>
get(Class<T> cls, int mindim, int maxdim)
          Pseudo constructor that is often convenient to use when T is not completely known.
 boolean isAssignableFrom(Object other)
          Test whether this type is assignable from a given object instance.
 boolean isAssignableFromType(TypeInformation type)
          Test whether this type is assignable from another type.
 int maxdim()
          Get the maximum dimensionality of the occurring vectors.
 int mindim()
          Get the minimum dimensionality of the occurring vectors.
 String toString()
           
 
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

mindim

protected final int mindim
Minimum dimensionality


maxdim

protected final int maxdim
Maximum dimensionality

Constructor Detail

VectorTypeInformation

public VectorTypeInformation(Class<? super V> cls,
                             int mindim,
                             int maxdim)
Constructor.

Parameters:
cls - base class
mindim - Minimum dimensionality
maxdim - Maximum dimensionality

VectorTypeInformation

public VectorTypeInformation(Class<? super V> cls)
Constructor without size constraints.

Parameters:
cls -
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 SimpleTypeInformation<V extends FeatureVector<?,?>>
Parameters:
type - Other type
Returns:
true when the other type is accepted as subtype.

isAssignableFrom

public boolean isAssignableFrom(Object other)
Description copied from interface: TypeInformation
Test whether this type is assignable from a given object instance.

Specified by:
isAssignableFrom in interface TypeInformation
Overrides:
isAssignableFrom in class SimpleTypeInformation<V extends FeatureVector<?,?>>
Parameters:
other - Other object
Returns:
true when the other type is an acceptable instance.

mindim

public int mindim()
Get the minimum dimensionality of the occurring vectors.

Returns:
dimensionality

maxdim

public int maxdim()
Get the maximum dimensionality of the occurring vectors.

Returns:
dimensionality

get

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

Type Parameters:
T - Type
Parameters:
cls - Class restriction
mindim - Minimum dimensionality
maxdim - Maximum dimensionality
Returns:
Type information

get

public static <T extends FeatureVector<?,?>> VectorTypeInformation<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 information

toString

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

Release 0.4.0 (2011-09-20_1324)