M
- Model object typepublic class Cluster<M extends Model> extends java.lang.Object implements TextWriteable
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<Cluster<?>> |
BY_NAME_SORTER
A partial comparator for Clusters, based on their name.
|
private DBIDs |
ids
Cluster data.
|
private M |
model
Cluster model.
|
protected java.lang.String |
name
Cluster name.
|
private boolean |
noise
Noise?
|
Constructor and Description |
---|
Cluster(DBIDs ids)
Constructor without hierarchy information and name and model
|
Cluster(DBIDs ids,
boolean noise)
Constructor without hierarchy information and name and model
|
Cluster(DBIDs ids,
boolean noise,
M model)
Constructor without hierarchy information and name
|
Cluster(DBIDs ids,
M model)
Constructor without hierarchy information and name
|
Cluster(java.lang.String name,
DBIDs ids)
Constructor without hierarchy information and model
|
Cluster(java.lang.String name,
DBIDs ids,
boolean noise)
Constructor without hierarchy information and model
|
Cluster(java.lang.String name,
DBIDs ids,
boolean noise,
M model)
Full constructor
|
Cluster(java.lang.String name,
DBIDs ids,
M model)
Constructor without hierarchy information.
|
Modifier and Type | Method and Description |
---|---|
DBIDs |
getIDs()
Access group object
|
M |
getModel()
Access model object
|
java.lang.String |
getName()
Get Cluster name.
|
java.lang.String |
getNameAutomatic()
Return either the assigned name or the suggested label
|
boolean |
isNoise()
Getter for noise flag.
|
void |
setIDs(DBIDs g)
Access group object
|
void |
setModel(M model)
Access model object
|
void |
setName(java.lang.String name)
Set Cluster name
|
void |
setNoise(boolean noise)
Setter for noise flag.
|
int |
size()
Delegate to database object group.
|
java.lang.String |
toString() |
void |
writeToText(TextWriterStream out,
java.lang.String label)
Write to a textual representation.
|
protected java.lang.String name
private DBIDs ids
private boolean noise
public static java.util.Comparator<Cluster<?>> BY_NAME_SORTER
public Cluster(java.lang.String name, DBIDs ids, boolean noise, M model)
name
- Cluster name. May be null.ids
- Object Groupnoise
- Noise flagmodel
- Model. May be null.public Cluster(java.lang.String name, DBIDs ids, M model)
name
- Cluster name. May be null.ids
- Object groupmodel
- Modelpublic Cluster(DBIDs ids, boolean noise, M model)
ids
- Object groupnoise
- Noise flagmodel
- Modelpublic Cluster(DBIDs ids, M model)
ids
- Object groupmodel
- Modelpublic Cluster(java.lang.String name, DBIDs ids, boolean noise)
name
- Cluster name. May be null.ids
- Object groupnoise
- Noise flagpublic Cluster(java.lang.String name, DBIDs ids)
name
- Cluster name. May be null.ids
- Object grouppublic Cluster(DBIDs ids, boolean noise)
ids
- Cluster name. May be null.noise
- Noise flagpublic Cluster(DBIDs ids)
ids
- Object grouppublic int size()
public java.lang.String getNameAutomatic()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- new cluster namepublic DBIDs getIDs()
public void setIDs(DBIDs g)
g
- set database object grouppublic M getModel()
public void setModel(M model)
model
- New cluster modelpublic void writeToText(TextWriterStream out, java.lang.String label)
writeToText
in interface TextWriteable
out
- output writer streamlabel
- Label to prefixpublic boolean isNoise()
public void setNoise(boolean noise)
noise
- new noise flag valuepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.