public final class RelationUtil
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RelationUtil.AscendingByDoubleRelation
Sort objects by a double relation 
 | 
static class  | 
RelationUtil.CollectionFromRelation<O>
Collection view on a database that retrieves the objects when needed. 
 | 
static class  | 
RelationUtil.DescendingByDoubleRelation
Sort objects by a double relation 
 | 
static class  | 
RelationUtil.RelationObjectIterator<O>
Iterator class that retrieves the given objects from the database. 
 | 
| Modifier | Constructor and Description | 
|---|---|
private  | 
RelationUtil()
Fake constructor: do not instantiate. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static <V extends FeatureVector<?>> | 
assumeVectorField(Relation<V> relation)
Get the vector field type information from a relation. 
 | 
static double[][] | 
computeMinMax(Relation<? extends NumberVector> relation)
Determines the minimum and maximum values in each dimension of all objects
 stored in the given database. 
 | 
static int | 
dimensionality(Relation<? extends SpatialComparable> relation)
Get the dimensionality of a database relation. 
 | 
static <V extends SpatialComparable> | 
getColumnLabel(Relation<? extends V> rel,
              int col)
Get the column name or produce a generic label "Column XY". 
 | 
static <V extends NumberVector> | 
getNumberVectorFactory(Relation<V> relation)
Get the number vector factory of a database relation. 
 | 
static double[][] | 
relationAsMatrix(Relation<? extends NumberVector> relation,
                ArrayDBIDs ids)
Copy a relation into a double matrix. 
 | 
static <V extends NumberVector,T extends NumberVector> | 
relationUglyVectorCast(Relation<T> database)
An ugly vector type cast unavoidable in some situations due to Generics. 
 | 
public static <V extends FeatureVector<?>> VectorFieldTypeInformation<V> assumeVectorField(Relation<V> relation)
V - Vector typerelation - relationpublic static <V extends NumberVector> NumberVector.Factory<V> getNumberVectorFactory(Relation<V> relation)
V - Vector typerelation - relationpublic static int dimensionality(Relation<? extends SpatialComparable> relation)
relation - relationpublic static double[][] computeMinMax(Relation<? extends NumberVector> relation)
relation - the database storing the objectspublic static double[][] relationAsMatrix(Relation<? extends NumberVector> relation, ArrayDBIDs ids)
This is not recommended unless you need to modify the data temporarily.
relation - Relationids - IDs, with well-defined order (i.e. array)public static <V extends SpatialComparable> java.lang.String getColumnLabel(Relation<? extends V> rel, int col)
V - Vector typerel - Relationcol - Columnpublic static <V extends NumberVector,T extends NumberVector> Relation<V> relationUglyVectorCast(Relation<T> database)
V - Base vector typeT - Derived vector type (is actually V, too)database - DatabaseCopyright © 2019 ELKI Development Team. License information.