public final class ModelUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
ModelUtil()
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
static NumberVector |
getPrototype(Model model,
Relation<? extends NumberVector> relation)
Get the representative vector for a cluster model.
|
static <V extends NumberVector> |
getPrototype(Model model,
Relation<? extends V> relation,
NumberVector.Factory<V> factory)
Get (and convert!)
|
static NumberVector |
getPrototypeOrCentroid(Model model,
Relation<? extends NumberVector> relation,
DBIDs ids)
Get the representative vector for a cluster model, or compute the centroid.
|
static <V extends NumberVector> |
getPrototypeOrCentroid(Model model,
Relation<? extends V> relation,
DBIDs ids,
NumberVector.Factory<V> factory)
Get the representative vector for a cluster model, or compute the centroid.
|
public static <V extends NumberVector> V getPrototype(Model model, Relation<? extends V> relation, NumberVector.Factory<V> factory)
null
is returned when the model is not supported!V
- desired vector typemodel
- Modelrelation
- Data relation (for representatives specified per DBID)factory
- Vector factory, for type conversion.null
if not supported.public static NumberVector getPrototype(Model model, Relation<? extends NumberVector> relation)
null
is returned when the model is not supported!model
- Modelrelation
- Data relation (for representatives specified per DBID)NumberVector
, null
if not supported.public static <V extends NumberVector> V getPrototypeOrCentroid(Model model, Relation<? extends V> relation, DBIDs ids, NumberVector.Factory<V> factory)
V
- desired vector typemodel
- Modelrelation
- Data relation (for representatives specified per DBID)ids
- Cluster ids (must not be empty.null
if not supported.public static NumberVector getPrototypeOrCentroid(Model model, Relation<? extends NumberVector> relation, DBIDs ids)
model
- Modelrelation
- Data relation (for representatives specified per DBID)ids
- Cluster ids (must not be empty.NumberVector
.Copyright © 2019 ELKI Development Team. License information.